[Nagiosplug-help] Trouble with Nagiosgraph

Ralph.Grothe at itdz-berlin.de Ralph.Grothe at itdz-berlin.de
Mon Oct 15 16:34:10 CEST 2007


Hi Peter et al.,

sorry for the late reply.

But I have a good excuse because I attended this year's
Nagios-Konferenz at Nürnberg last Thursday and Friday.
http://www.netways.de/de/nagios_konferenz/

It was great meeting the Nagios experts there and even a few I
already knew from this mailing list.

But as for my problem with Nagiosgraph.

It looks as though I defined an incorrect data template (only
four fields instead of five)
and forgot the $SERVICEOUTPUT$ field.
Thus my map regex never matched the perfdata: string why no RRD
file has been generated at all.

I could easily verify this in a Perl Debugger session.


  DB<5> p $data
1192456552||arno||icmp-host-alive||rta=2.098ms;1000.000;10000.000
;0; pl=0%;50;80;;

  DB<6> l
52==>     my @d = split( /\|\|/, $data);
53:       return ( lastcheck    => $d[0],
54                 hostname     => $d[1],
55                 servicedescr => $d[2],
56                 output       => $d[3],
57                 perfdata     => $d[4],
58               );
59      }
60 
61      # Write debug information to log file
  DB<6> .
main::parseinput(/usr/lib/nagios/nagiosgraph/insert.pl:52):
52:       my @d = split( /\|\|/, $data);

  DB<6> n
main::parseinput(/usr/lib/nagios/nagiosgraph/insert.pl:53):
53:       return ( lastcheck    => $d[0],
54:                hostname     => $d[1],
55:                servicedescr => $d[2],
56:                output       => $d[3],
57:                perfdata     => $d[4],
58:              );
  DB<6> x @d
0  1192456552
1  'arno'
2  'icmp-host-alive'
3  'rta=2.098ms;1000.000;10000.000;0; pl=0%;50;80;;
'



And here is my wrong template definition in nagios.cfg


# grep \|\| /etc/nagios/nagios.cfg
service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$S
ERVICEDESC$||$SERVICEPERFDATA$

So changing to

# grep -n \|\| /etc/nagios/nagios.cfg
694:service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$
||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$

and restarting nagios almost immediately created the RRD files.


Nevertheless, I got so many inspirations from the conference.
So I am yet not sure whether to shift to PNP.
The only thing I would consider a degradation with this
was that it is based on PHP and I daresay that any Perl hack is
far superior to any PHP candy.
Also because of custom regex one can put in the map file,
with Nagiosgraph I don't even need a plug-in to conform to the
official guidelines how to 
display perfdata but can match any sort of output easily.
But that's my own bias.

Rgds.
Ralph





> -----Original Message-----
> From: Peter.Ringe at web.de [mailto:Peter.Ringe at web.de]
> Sent: Wednesday, October 10, 2007 10:49 PM
> To: Grothe, Ralph
> Subject: Re: [Nagiosplug-help] Trouble with Nagiosgraph
> 
> 
> Hi Ralph,
> 
> one first question,
> 
> what's about naghiosgraph.log
> 
>  > -rw-rw-r-- 1 nagios nagios 16905 Oct  3 00:07
>  > /var/log/nagios/nagiosgraph.log
> 
> What's in there ....
> 
> 
> Peter
> 
> Ralph.Grothe at itdz-berlin.de schrieb:
> > Hello List Subscribers,
> > 
> > first I need to apologize for my stupid question regarding
the
> 
> ...
> 
> 
> >  
> > # perl -cw /usr/lib/nagios/nagiosgraph/map
> > /usr/lib/nagios/nagiosgraph/map syntax OK
> > 
> > 
> > 
> > 
> --------------------------------------------------------------
> -----------
> > 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/
> > _______________________________________________
> > Nagiosplug-help mailing list
> > Nagiosplug-help at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> > ::: Please include plugins version (-v) and OS when 
> reporting any issue. 
> > ::: Messages without supporting info will risk being sent 
> to /dev/null
> > 
> 
> 




More information about the Help mailing list