check_winmem ePN problem

Stanley Hopcroft stanleyhopcroft at gmail.com
Mon Nov 20 03:44:44 CET 2006


Dear Sir,

I am writing to thank you for your letter and say,

On 20/11/06, Matteo Mancini <whiterabbit at mand4la.info> wrote:
> Hi list..
>
> I've just upgrade a nagios box from 1.x to 2.5, I've got a problem with
> check_winmem, in nagios web interface I recive this error
>
> **ePN /usr/lib/nagios/plugins/check_winmem: "Use of uninitialized value
> in pattern match (m//) at (eval 15) line 52,".
>

This is pretty much of an FAQ.

ePN is intolerant of errors that running from the program from the CLI
doesn't care about (ePN converts the program into a subroutine run
with strict mode).

Your choices are

1 Correct the plugin and feed the corrections back to the author

Start by setting 'use strict' in the text, and add the -w option to
the hashbang line (eg #!/usr/bin/perl -w). Fix every complaint it
raises eg declare all vars with either my ($foo, @foo, %foo) or use
vars qw($foo @foo %foo).

2 Wrap the plugin in another shell script of C program that calls the program.

Search the archives for how to do this.

3 Use some recent advice and change the command in your config file to
be something like

command_line /usr/bin/perl check_winmem ....

4 Disable ePN (either compile it yourself and build a package or get a
package that doesn't use ePN. The Dag Wieers packages do use ePN).

>
> Status Information:     **ePN failed to compile
> /usr/lib/nagios/plugins/check_winmem: "Global symbol "$PROGNAME"
> requires explicit package name at (eval 9) line 21,
> Performance Data:       Global symbol "$IP" requires explicit package name at
> (eval 9) line 39.
>
>
> If I try to use the plugin from command line all work fine...
>
> How can I solve it???
>
>
> thanks
>
> MAtteo
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
>
> iD8DBQFFYHG+/TjXD9LUVswRAs+FAJ9Z+hla4R3ecbI25BCWD5Swsm3zPQCdHR6X
> O+EjhdaKRb7bR0gsVyt0DXw=
> =/3hL
> -----END PGP SIGNATURE-----
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> 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
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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