check_snmp_storage.pl error: Service check did not exit properly

Chris atstake at gmail.com
Tue Feb 3 01:39:54 CET 2009


On Mon, Feb 2, 2009 at 3:54 PM, Chris <atstake at gmail.com> wrote:
> I can type the following
>
> ./check_snmp_storage.pl -H foo -C foo -m / -r -w 80% -c 90%
>
> and get the correct information. But I'm having trouble adding it to
> nagios configuration file.
>
> My partitions are not same for every host (eg. some hosts have a /tmp
> partition and some don't)
>
> In my commands.cfg I defined:
>
> define command{
>        command_name    check_snmp_storage
>        command_line    $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$
> -C $ARG1$ -m $ARG2$ -w 80% -c 90% -r
>        }
>
>
> And I define the service in my unix.cfg file as:
>
> define service{
>        use                             generic-service
>        host_name                       server_name
>        service_description             Disk /
>        check_command                   check_snmp_storage!foo!/
>        }
>
> When I restart Nagios, I get status critical in Nagios web interface
> for this service check. Status Information says: (Service check did
> not exit properly)

More update: if I run /usr/lib/nagios/plugins/check_snmp_storage.pl
while I am under /root, I get this error message:

Can't locate utils.pm in @INC (@INC contains:
/usr/local/nagios/libexec /usr/lib/perl5/5.8.8/i586-linux-thread-multi
/usr/lib/perl5/5.8.8
/usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at
/usr/lib/nagios/plugins/check_snmp_storage.pl line 21.
BEGIN failed--compilation aborted at
/usr/lib/nagios/plugins/check_snmp_storage.pl line 21

If I run it while I'm under /usr/lib/nagios/plugins/ directory, I
don't get any error message and it works.

I defined the command as $USER1$/check_snmp_storage.pl and also
/usr/lib/nagios/plugins/check_snmp_storage.pl - no luck.

check_snmp_storage.pl is owned by root and has read and execute for everyone.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list