9.81.6.5 MIM Agent Example
This section provides an example of how you can use the MIM agent to display Couchbase statistics for a Couchbase profile in System Insight using InfluxDB and Grafana.
For the purposes of this example, you have not set the property mz.mimagent.update.enable
and have therefore retained the default behavior of not allowing the selection of Couchbase profiles from the MIM agent configuration, and you have started your instances of InfluxDB and Grafana, in accordance with the first two steps of 9.81.6.1 MIM Agent Preparations.
Couchbase Profile
In the Advanced tab of the Couchbase profile, you set the property mz.cb.statistics.class toÂ
com.digitalroute.mimexposer.statistics.MemDbStatistics.
Couchbase profile for MIM agent example - Advanced tab
Workflow with MIM Agent
You configure a workflow with the MIM agent routing statistics for the Couchbase profile to an Analysis agent.
In the MIM agent configuration, you can see that the Couchbase profile that you configured in the Advanced tab is the only profile selected. When you click OK, you save your MIM agent configuration.Â
MIM agent configuration example
In the Analysis agent you can enter simple code as the purpose of this agent is for the MIM agent to have an agent to send data to in order to run the workflow. You set the input to bytearray.
Analysis agent in MIM agent example
When you have finished configuring your workflow and saved it, run it in the Workflow Monitor.
System Insight Profile
Ensure that the System Insight service is running before you create a System Insight profile.
Create a System Insight profile and create a filter using the Detected Metrics tab. The filter created from the selected detected metrics shown below is mim\.realtime\.collection\.mim
.
Detected metrics for the MIM agent in the System Insight profile
For further information on configuring a System Insight profile, see 9.81.2 System Insight Profile.
Grafana
To visualize the Couchbase statistics in Grafana, you create a new dashboard. You click the panel title on the graph and then select Edit. You can then add the metrics that you want to visualize, for example in a graph, from the metrics available.
Panel in Grafana showing some example metrics that can visualize
Grafana graph showing example Couchbase statistics