**ePN failed to compile/usr/lib/nagios/plugins/check_snmp_cisco_memutil: "Globalsymbol "$script" requires explicit package name at (eval 1) line 29
rob.moss at uk.bnpparibas.com
rob.moss at uk.bnpparibas.com
Fri Sep 15 10:51:22 CEST 2006
nagios-users-bounces at lists.sourceforge.net wrote on 15/09/2006 09:11:01:
> 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' ;
Thanks for picking that one up Stanley.. I had to leave work before the
reply came in..
The core of the problem is the original coder didn't enable Strict syntax
checking, and probably didn't enable warnings. Nagios's ePN plugin does
the right thing and uses Strict syntax checking and gives warnings (this is
standard perl practice)..
You will need to contact the developer of the plugin to tidy up his code,
or you can go in yourself and declare the variables yourself like I showed
you, adding in the "my $var;" statement, or you could go the lazy route and
run the script through an external perl interpereter without warnings or
syntax checking, but losing lots of speed from launching an external
process to compile + run the script every 5 minutes instead of running the
internally compiled script..
There is apparently an ePN commandline util that you may be able to run
which should work exactly the same as the embedded perl interpereter, you
may need to check this in the docs or source..
And it looks like that Stanley has already said exactly the same thing :-)
Cheers
> > 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
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
**********************************************************************************************
BNP Paribas Private Bank London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in
the United Kingdom.
BNP Paribas Securities Services London Branch is authorised
by CECEI & AMF and is regulated by the Financial Services
Authority for the conduct of its investment business in
the United Kingdom.
BNP Paribas Fund Services UK Limited is authorised and
regulated by the Financial Services Authority
-------------------------------------------------------------------------
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