[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [hobbit] Changing the a-axis on the graphs



Kunal,
 
I asked the exact question a few days ago.  Here is the response I got.
Worked like a charm.
 
I don't know if that could be done in a config file, but it certainly can be
done by altering the source. Take a look at hobbitd/hobbitgraph.c. Near the
top there's a bunch of defines that tell rrdtool how to select the data:

#define HOUR_GRAPH "e-48h"

#define DAY_GRAPH "e-12d"

#define WEEK_GRAPH "e-48d"

#define MONTH_GRAPH "e-576d"

"e-48h" means "end-of-data minus 48 hours", which is the start of the range,
the end of the range being the end of the data. Change those numbers to
whatever suits you best - i.e. e-24h, e-7d, e-30d & e-365d.

You'll also want to look further down for blocks like this:

if (strcmp(val, "hourly") == 0) {

period = HOUR_GRAPH;

persecs = 48*60*60;

gtype = strdup(val);

glegend = "Last 48 Hours";

}

and fix those up. I guess that would be:

persecs = 24*60*60;

and

glegend = "Last 24 Hours";

for the 24 hour graph. Similarly for DAY_GRAPH, WEEK_GRAPH & MONTH_GRAPH. Go
back up to the main source directory and re-run make, then copy
hobbitd/hobbitgraph.cgi over to hobbit's server/bin directory.

Seems to work fine for me - I might even keep it like this... :)

Ralph Mitchell

 
Dave
 


  _____  

From: wizkaypee (at) gmail.com [mailto:wizkaypee (at) gmail.com] On Behalf Of Kunal
Parikh
Sent: Wednesday, February 08, 2006 9:48 PM
To: hobbit (at) hswn.dk
Subject: [hobbit] Changing the a-axis on the graphs


Hi all,

Currently, hobbit shows graph for the following time intervals
48hrs, 12days, 48days, 576days.

Is there a configuration property to change these intervals ?


TIA,

Kunal