[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [hobbit] Clarification: Change graphing on Trends link
- To: <hobbit (at) hswn.dk>
- Subject: RE: [hobbit] Clarification: Change graphing on Trends link
- From: "David Gilmore" <david (at) stenhouseconsulting.com>
- Date: Wed, 1 Feb 2006 16:25:01 -0500
- Thread-index: AcYmNfFLUptFeJS1Q8KUwkIHxF0X3ABP2ikg
Ralph,
I gave your suggestion a shot today, and just when I think I am making
progress learning Linux, I get slapped in the face. I found the
hobbitgraph.c and made the changes as you outlined below. I then went to
the parent directory (hobbit-4.1.2p1) and ran make, but it errored out with
error:2. I checked the mod date on the hobbitgraph.cgi file and it was
still set to the date that I originally compiled the program. I am running
Hobbit on FC4. Any suggestions?
Thanks,
Dave
> -----Original Message-----
> From:
> hobbit-return-5463-david=stenhouseconsulting.com (at) hswn.dk
> [mailto:hobbit-return-5463-david=stenhouseconsulting.com (at) hswn.
> dk] On Behalf Of Ralph Mitchell
> Sent: Tuesday, January 31, 2006 2:13 AM
> To: hobbit (at) hswn.dk
> Subject: Re: [hobbit] Clarification: Change graphing on Trends link
>
> 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
>
>
> On 1/30/06, David Gilmore <david (at) stenhouseconsulting.com> wrote:
> >
> > I should have been a clearer in my post here. When clicking on the
> > graph in the Trends page, is there a way to change the
> default historical times?
> > Instead of 48 hrs, 12 days, 48 days, and 576 days, can the
> graphs be
> > set to
> > 24 hrs, 7 days, 30 days, 365 days?
> >
> > Thanks,
> >
> > Dave
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe (at) hswn.dk
>
>
>