sms alerts for vmware monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: sms alerts for vmware monitoring

Post by jdalrymple »

venkitesh

Naigos plugins are simple in how they operate so that they can be flexible in how they're written. Nagios has no concept of what datastore you're checking unless you specify it. You can potentially use custom variables to achieve what you want but I think that goes beyond what is necessary to achieve your goal. Using Box293's sample output earlier, it has the data you want in it, you simply need to get that into your SMS:

Code: Select all

CRITICAL: Datastore 'VOL_02_03' {Free Space: 2,582.6 GB (CRITICAL <= 2,700)} {Used Space: 211.4 GB} {Capacity: 2,794 GB}|'Free Space'=2582.6GB;;2700 'Used Space'=211.4GB 'Capacity'=2794GB [Datastore_Usage]
If you concatenate $SERVICEOUTPUT$ and $LONGSERVICEOUTPUT$ you will always have all the data that is provided by the plugin back to Nagios. In this case it appears that the output that you want is on the first line so just using the $SERVICEOUTPUT$ macro should achieve your goal, as Box293 indicated:

Code: Select all

ssh [email protected] '/usr/bin/smssend +91-xxxxxxxxxx " Infra says: $HOSTNAME$ with service $SERVICEDESC$ is $SERVICESTATE$ with the outptut: $SERVICEOUTPUT$"'
If it is not, try adding in $LONGSERVICEOUTPUT$ then you have everything:

Code: Select all

ssh [email protected] '/usr/bin/smssend +91-xxxxxxxxxx " Infra says: $HOSTNAME$ with service $SERVICEDESC$ is $SERVICESTATE$ with the outptut: $SERVICEOUTPUT$ \n $LONGSERVICEOUTPUT$"'
If adding both of those in doesn't get the data to your SMS system, it almost certainly would be a shortcoming of the SMS system.

One thing that might be helpful would be if we knew exactly what data was coming through in the SMS alerts for datastores. Can you share that?
Locked