**ePN failed to compile/usr/lib/nagios/plugins/check_snmp_cisco_memutil: "Globalsymbol "$script" requires explicit package name at (eval 1) line 29
Stanley Hopcroft
stanleyhopcroft at gmail.com
Fri Sep 15 10:11:01 CEST 2006
Dear Hendro,
I am writing to thank you for your letter and say,
On 15/09/06, hendro budianto <he_anton at yahoo.com> wrote:
> Thx's Rob,
> for your help, but if i run the command manual is
> working fine.
Exactly, because what is run by ePN is not what you run.
ePN takes the script and turns it into another script in which the
original script is wrapped up as a subroutine (see
http://nagios.sourceforge.net/docs/2_0/embeddedperl.html for the gory
details).
This subroutine is compiled only once - compared with every time if a
shell was forked to run Perl - and the resulting Perl byte code
remains in memory as long as Nagios runs (that is why it is such a
memory pig).
Also, when its compiled, the strict pragma is used. This means that
each and every variable must be declared before use by
my $foo = 'bar' ;
> I wonder what wrong with my
> configurations ?
Nothing. This is simply part of the ePN tradeoff: better performance
for pickiness about what is run and lots of memory used.
> After added a new "my $script", the
> other error is occur "Global symbol "$timeout" or the
> other that begining with "$". Should i append the
> variable my $"XXXX" all manual ?
Yes.
To know when you are there without having ePN complain each time
1 add 'use strict' to the plugin
2 correct everything that perl -c plugin complains about
Either that or don't use ePN.
You can not use ePN by
1 changing the command definition (of the plugin) in commands.cfg to
add an explict path to Perl before the plugin path
eg command_line $USER1$/check_rootport -H $HOSTADDRESS$ -N $HOSTNAME
change to
command_line /usr/bin/perl $USER1$/check_rootport -H $HOSTADDRESS$
-N $HOSTNAME
This was discussed in the last week in this list.
2 calling the plugin from a shell or C wrapper (much harder).
>
> Thank you before.
>
> Best regards
Good luck.
Yours sincerely.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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