Page 1 of 1

Monitoring of Custom scripts in NagiosXI

Posted: Thu Feb 18, 2016 11:24 am
by tthomas
we have script on placed in the server /path/script.sh and output of the script is characters like
 ‘OK’  if we have >=30 days of time for the certificate to expire.
 ‘ERROR!’  if it is <30 days for the certificate to expire.
Can it be possible to monitor it in NagiosXI according to the above outputs/thresholds and if yes how to monitor it.

Re: Monitoring of Custom scripts in NagiosXI

Posted: Thu Feb 18, 2016 11:29 am
by hsmith
You could have NRPE run the script, and then it will send the results of the script back to you. You would need to modify the script a bit to exit with different codes depending on what the script found. If it exits with a 0, Nagios is going to think it's okay. Take a look at this writeup: https://www.digitalocean.com/community/ ... untu-12-10