[smokeping-users] smokeping and nagios

Peter Brunnengräber pbrunnen at bccglobal.com
Fri Mar 2 00:23:52 CET 2012


Hi all,
  Thought I would share my success... A coworker threw on Data::Dumper on the script and we output the unix second that were being passed off to the RRDs.pm library.  Interestingly...  the last update time reported from the RRD file looks right, the current time is right, but the RRDs.pm fetch function reports back a start time in the future when a computed timestamp of ($lastupdatetime - 120) is requested...  obviously rrd is not able to look into the future, so the results are undefined.

lastupdatetime=1330642128 ; lasttimestamp=1330642221 ; $start = 1330642200 ;

Until I get a chance to dig into the RRDs.pm, here is a quick fix for the "check_smokeping.pl"...

@@80
-- my ($start,$step,$ds_names,$data) = RRDs::fetch($rrd_file,"AVERAGE","-s",$lastupdatetime - 120,"-e","now");
++ my ($start,$step,$ds_names,$data) = RRDs::fetch($rrd_file,"AVERAGE","-s","-2m","-e","now");


Hope this helps someone...
With kind regards. -Peter

----- Original Message -----
From: "Lars Thegler" <lars at thegler.dk>
To: "Peter Brunnengräber" <pbrunnen at bccglobal.com>
Cc: smokeping-users at lists.oetiker.ch
Sent: Thursday, March 1, 2012 12:48:20 PM
Subject: Re: [smokeping-users] smokeping and nagios

Since your charts look fine, your RRD files are ok. The export/import
dance is needed because the binary format is different, so maybe the
version of the RRD library that the check script is using, is still
expecting the old format? just a guess.

/Lars

2012/3/1 Peter Brunnengräber <pbrunnen at bccglobal.com>:
> Hello all,
>  I recently upgraded from a 32-bit to 64-bit debian and I did the export and import of my RRD files.  All seemed ok and my smokeping charts are working fine.   But I also use the nagios extension "check_smokeping.pl" from Mr. Larry Low.   From the looks of the code, it seems to reference RRD perl library.  The check script is querying and getting no results and as a result is reporting "RRD file somefile.rrd has no data in last n seconds." with n being seconds since I went live on the 64-bit os.
>
>  My initial thoughts are that it is either a bug in the RRDs.pm library or possibly an issue with the time parameter.
>
>  Has anyone else had problems using RRDs.pm on 64-bit or any other thoughts/ideas on the matter?
>
> Thank you.
> With kind regards. -Peter
>
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users



More information about the smokeping-users mailing list