Hi team,
wanted to monitor this command output using nagios,
PRODUCTION> root@eu2ddbu107: /root > mmlsconfig tiebreakerDisks
tiebreakerDisks tbnsd101;tbnsd102;tbnsd103
PRODUCTION> root@eu2ddbu107: /root >
To trigger an alert if the tiebreaker disk is set to undefined as below,
root@eu2ndbu365:/root $mmlsconfig tiebreakerDisks
tiebreakerDisks (undefined)
root@eu2ndbu365:/root $
Is this possible to monitor above command?
Unix command monitoring from Nagios
Unix command monitoring from Nagios
Thanks & Regards,
I2MP Team.
I2MP Team.
Re: Unix command monitoring from Nagios
Absolutely, you can monitor that. You will need to write a wrapper script, however. Nagios reads the exit code of a plugin to determine if the plugin is returning OK, WARNING, CRITICAL, or UNKNOWN. The exit codes are 0, 1, 2, anything else, respectively. So you could write a simple bash script to test the output of the command, and if it sees tbnsd101;tbnsd102;tbnsd103, it returns 0. This particular case seems like it's all or nothing, so if the script doesn't see that exact string, then it would return a 2.
This guide is incredibly detailed, and should help you along the way.
http://nagios-plugins.org/doc/guidelines.html
This guide is incredibly detailed, and should help you along the way.
http://nagios-plugins.org/doc/guidelines.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!