CheckExternalScripts exit code

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
anish
Posts: 161
Joined: Tue Jul 19, 2016 5:29 am

CheckExternalScripts exit code

Post by anish »

Hello,

I have a batch script which checks the job status. If the job fails he script will echo ERROR: JOB FAILED and exit /B 2

I am using nrpe to run this.

The check status = OK
Output : ERROR: JOB FAILED.

How should I turn it to critical?
anish
Posts: 161
Joined: Tue Jul 19, 2016 5:29 am

Re: CheckExternalScripts exit code

Post by anish »

Fixed. It should be exit 2.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: CheckExternalScripts exit code

Post by rkennedy »

Ah, looks like you were able to get this solved before we had a chance to respond. For the record -

Code: Select all

Exit = 0 = OK
Exit = 1 = WARNING
Exit = 2 = CRITICAL
Exit = 3 = UNKNOWN
This link may be handy as well - https://nagios-plugins.org/doc/guidelines.html
Former Nagios Employee
anish
Posts: 161
Joined: Tue Jul 19, 2016 5:29 am

Re: CheckExternalScripts exit code

Post by anish »

Thank you! Please close this case.
Locked