Custom Script on Linux

I want to run a custom script on a group of linux servers to evaluate the health of an application. For example, I have a script that interrogates the number of records in a RabbitMQ queue and if there are over 10,000 queued items, I want to set that state of an object to Critical. I’m not sure how to best implement the script in SCOM and set the state of the object, such that I can show the status of the application on our dashboard.

Ultimately, I’d like to not have this script change the status of the Server itself to critical. Rather, I’d like an independent object in SCOM to link to my dashboard that shows that the application (RabbitMQ) is unhealthy.

Another example is checking the health of a Redhat cluster, using the “clustat” command to report “all good” or something is wrong".

TIA

Check this guys articles on the topic: https://operatingquadrant.com/2013/07/30/unixlinux-mp-authoring-discovering-and-monitoring-failover-clusters/
So far I have managed to create a discovery based on if a file exists. The next step will be to create a discovery that finds a service for example, and attach a monitor. (Haven’t gotten this far yet)