The BMC TrueSight Pulse Shell plugin is a generic plugin that allows the use of any program or scripting language to produce metrics for TrueSight Pulse. The plugin expects a script or program to send metrics via standard output with the given format:
<METRIC_NAME> <METRIC_VALUE> <METRIC_SOURCE>
- METRIC_NAME is a previously defined metric
- METRIC_VALUE is the current value of the metric
- METRIC_SOURCE is the source of the metric
$echo "BOUNDARY_PROCESS_COUNT $(ps -e | egrep '^.*\d+' | wc -l | tr -d ' ') $(hostname)"
which yields this output:
BOUNDARY_PROCESS_COUNT 205 boundary-plugin-shell-demo
We can take this one-liner and then configure the Shell plugin to periodically report and display this metric:
In configuration form above, we have defined our metric be collected by setting the command field with the one-liner as an argument to the bash shell using the -c command:
bash -c "echo BOUNDARY_PROCESS_COUNT $(ps -e | egrep '^.*\d+' | wc -l | tr -d ' ') $(hostname)"
The Poll Time field is set to 5 so that the metric command is run every 5 seconds to provide an update of our metric.
We can now display our new metric in a dashboard as shown here:
If want to learn more about the Shell plugin and view more examples of its use, see the plugin documentation.