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]Code: Select all
ssh [email protected] '/usr/bin/smssend +91-xxxxxxxxxx " Infra says: $HOSTNAME$ with service $SERVICEDESC$ is $SERVICESTATE$ with the outptut: $SERVICEOUTPUT$"'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$"'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?