nagios graph - Can't call method "unixdiskusage" without a package or object reference

Andreas Ericsson ae at op5.se
Mon Apr 4 22:56:15 CEST 2005


Michael Gale wrote:
> Hello,
> 
> I have tried updating my map file but now I keep getting this error in
> my log file:
> 
> Map error: eval error: Can't call method "unixdiskusage" without a
> package or object reference at (eval 4) line 254
> 

I have absolutely no idea what you're talking about, and I'm certain 
you're in the wrong forum. Nagios is written entirely in C. There are 
plugins written in perl, but none of them contain the shoddy code below, 
and none of them use anything that can be specified as a map file 
whether you're a programmer, cartographer or whatever.

> Here is the code that is causing the problem:
> --snip--
> m|output:.*DISK.*-.free.space:.*| and do {
> 
>         my @options = split(/:/,$_);
>         my $strout;
> 
>         splice(@options,0,1);
> 
>         foreach my $opt (@options) {
>                 $opt =~ /(\S+).*(\d+).MB.\((\d+)%\)/;
>                 if (length($1) > 0) {
>                 $strout .= ", [ $1, GAUGE, $3 ]";
>                 }
>         }
> 
> 
> push @s, [ unixdiskusage $strout ];
> 
> };
> --snip--
> 
> Why does the above not work ? I tested it in a perl script before hand
> and it prints out the proper out put I thought ?
> 

Ask in #perl on your favourite irc server. I'm sure they won't mind if 
you post the entire script there.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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