Re: Cricket Not Displaying HTML Summaries
"Thomas Garner" <[email protected]> Wed, 12 Sep 2007 00:49:54 -0400
| Newsgroups | gmane.network.cricket.user |
|---|---|
| Message-ID | <[email protected]> |
This is my crazy ugly, but working hack. Your mileage may vary. Looking at it now, the my($value) line I left in might be able to be removed, but it works enough for me, so I won't investigate any more. :) It's probably worth noting that the 300 is a magic number, corresponding to the normal polling interval 300 seconds aka 5 minutes. Sorry it could be a prettier hack, Thomas On 9/10/07, Richman, Marc <[email protected]> wrote: > > I have noticed the same behavior on my cricket box (debian 4.0) but > haven't had time to track it down yet > > Marc > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Garwin > Liu > Sent: Monday, September 10, 2007 7:16 AM > To: [email protected] > Subject: [cricket-users] Cricket Not Displaying HTML Summaries > > Hi > > I created some new entries in Cricket 1.0.5, and the RRD files that > were created are version 3. Cricket seems to be saving the data > properly, but the summaries are not being displayed properly on the > > corresponding cricket html pages. I think due to getDSCurrentValue > not returning an actual value. Is this a known issue? Has anyone > else seen this problem? This is not a fatal error on Cricket's part, > but a major annoyance. Does anyone have a patch for getDSCurrentValue > > to work across RRD versions? > > Thanks, > > Garwin > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > cricket-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cricket-users > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > cricket-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cricket-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ cricket-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cricket-users
grapher.cgi.diff
(text/plain, 743 B)
*** grapher.cgi 2007-06-06 13:35:04.000000000 -0400
--- /tmp/grapher.cgi 2007-09-12 00:39:16.301346237 -0400
***************
*** 984,989 ****
--- 984,994 ----
# get and scale the value (if necessary)
my($value) = $rrd->getDSCurrentValue($dsnum);
+ my($last) = RRDs::last($rrd->file());
+ my($start,$step,$names,$data) = RRDs::fetch($rrd->file(), 'AVERAGE', '--start', ($last - 300), '--end', $last);
+ my($line) = @{$data}[0];
+ $value = @{$line}[$dsnum];
+
if (defined($value) && !isNaN($value) && defined($scale)) {
my($rpn) = new RPN;
my($res) = $rpn->run("$value,$scale");