Page 1 of 1

How to make Perl Script to work with Nagios

Posted: Tue Mar 07, 2017 9:38 am
by satishvjadhav
Hi All,

Good morning !

I am curious to know how can I make my perl scripts to work with nagios?
is there any changes I need to do in perl script so that it will return output in terms of exit codes which nrpe will understand and provide result to nagios to display on UI or send email alerts. OR just plain working perl script will do ? if yes how should i go ahead ?

Thank you,
Sj

Re: How to make Perl Script to work with Nagios

Posted: Tue Mar 07, 2017 11:59 am
by dwhitfield
The most basic thing you need to know:
exit 0 - Whenever the status of the output of the executed script is "OK", Nagios Server would highlight the check with Green color.
exit 1 - Whenever the status of the output of the executed script is "WARNING", Nagios Server would highlight the check with Yellow color.
exit 2 - Whenever the status of the output of the executed script is "CRITICAL", Nagios Server would highlight the check with Red color.
exit 3 - Whenever the status of the output of the executed script is "UNKNOWN", Nagios Server would highlight the check with Grey color.

You'll find more detail at http://nagios-plugins.org/doc/guidelines.html

Please let us know if you have additional questions.

Re: How to make Perl Script to work with Nagios

Posted: Wed Apr 12, 2017 6:04 am
by satishvjadhav
dwhitfield wrote:The most basic thing you need to know:
exit 0 - Whenever the status of the output of the executed script is "OK", Nagios Server would highlight the check with Green color.
exit 1 - Whenever the status of the output of the executed script is "WARNING", Nagios Server would highlight the check with Yellow color.
exit 2 - Whenever the status of the output of the executed script is "CRITICAL", Nagios Server would highlight the check with Red color.
exit 3 - Whenever the status of the output of the executed script is "UNKNOWN", Nagios Server would highlight the check with Grey color.

You'll find more detail at http://nagios-plugins.org/doc/guidelines.html

Please let us know if you have additional questions.
Thank you.

Re: How to make Perl Script to work with Nagios

Posted: Wed Apr 12, 2017 9:34 am
by cdienger
Can this thread be locked or did you have any further questions?

Re: How to make Perl Script to work with Nagios

Posted: Wed Apr 12, 2017 11:26 am
by satishvjadhav
Yes, pls locked it.