Total Hit Counter

Wednesday, April 10, 2013

Nagios Perl Plugin (Service Check did not exit properly) issue


Hi Friends,

In this post I will talk about solving perl plugin related issue. Sometimes we are facing issue when we are creating plugin for nagios in perl language. Sometimes what happens we executing plugin on command prompt then it is working fine and giving properl result but when we are deploying that plugin in to production nagios environment then we are getting error in output.

If we are getting following error in nagios then 
 (Service Check did not exit properly) 
Add following lines in to beginning of the your perl script.

########################################################
use strict;
require 5.6.0;
use lib qw( /usr/lib/nagios/plugins );
use utils qw(%ERRORS $TIMEOUT &print_revision &support &usage);
############################################################################