9.81.3.4 System Insight Collection Agent Example
This section provides an example of a scenario where the System Insight collection agent collects data from the System Insight service that is running, and sends the data to an Analysis agent. The Analysis agent receives and analyses the Measurement
UDRs.
Example workflow with a System Insight collection agent
In this scenario, the System Insight service is running, and it is required that when a new metric is added to the System Insight service, the information is logged. For example, when you start running a new real-time workflow, and add a new metric by adding a new filter using the mzsh systeminsight
command:
Example - Adding a new filter using the mzsh systeminsight command
$ mzsh systeminsight profile addFilter -profile Default.siprofile1 -e "mim\.realtime\.processing\.workflow_bridge*"
To collect this data, you include the System Insight collection agent in the workflow and connect the agent to an Analysis agent. The configuration of the Analysis agent may be configured as shown below:
Example - Analysis agent configuration for new measurements added to System Insight
list<string> measurementNames; initialize { measurementNames = listCreate(string); } consume { int loc = listFindIndex(measurementNames,i,i == input.name); if (loc == -1) { addMeasurement(input.name); } } synchronized void addMeasurement(string m) { logInformation("New measurement found: " + m); listAdd(measurementNames, m); }
When a new metric is added, a message is then sent to the System Log with the information that a new measurement has been found and the measurement name is provided.
Output in the System Log