Monitoring of Custom scripts in NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tthomas
Posts: 39
Joined: Mon Jun 01, 2015 6:54 am

Monitoring of Custom scripts in NagiosXI

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Monitoring of Custom scripts in NagiosXI

Post 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
Former Nagios Employee.
me.
Locked