Use of uninitialized value in substitution

Charlie Grosvenor charlie at cgrosvenor.co.uk
Sun Oct 14 17:13:36 CEST 2007


Thank you that solved it :-) 

-----Original Message-----
From: Andreas Ericsson [mailto:ae at op5.se] 
Sent: 14 October 2007 15:08
To: Charlie Grosvenor
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Use of uninitialized value in substitution

Charlie Grosvenor wrote:
> I am have a perl script that I use as a nagios command to monitor
> temperature:
> 
> define command{
>         command_name    check_1wiretemp
>         command_line    /opt/owfs/bin/1wire_temp.pl -l $ARG1$ -L $ARG2$
> -w $ARG3$ -H $ARG4$
> }
> 
> Which has service defined as:
> 
> define service{
>         use                             generic-service         ; Name
> of service template to use
>         host_name                       Temperature
>         service_description             Check Temperature
>         check_command                   check_1wiretemp!22!24!30!35!
> }
> 
> If I run the script from the command line it works fine, however when I
> use it with nagios2 it gives message:
> 
> **ePN /opt/owfs/bin/1wire_temp.pl: "Use of uninitialized value in
> substitution (s///) at (eval 1) line 67,".
> 
> I am not sure why this is occurring as it worked with Nagios1. Any
> ideas?
> 

You have embedded perl compiled in, but the script is not adhering to the
strict rules that the embedded perl compiler requires. Either re-compile
your nagios without embedded perl, or prepend /usr/bin/perl to the
command_line variable value of your command object definition.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.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