[hobbit] Changing the default 48h,12d,48d,576d period for graph display ?

Kern, Thomas Thomas.Kern at hq.doe.gov
Tue Mar 6 16:49:54 CET 2007


In future releases, could this become a configuration option or must it stay hardcodes in the source code? 

--------------------------
Thomas Kern
301-903-2211
 

----- Original Message -----
From: henrik at hswn.dk <henrik at hswn.dk>
To: hobbit at hswn.dk <hobbit at hswn.dk>
Sent: Tue Mar 06 10:45:59 2007
Subject: Re: [hobbit] Changing the default 48h,12d,48d,576d period for graph display ?

On Tue, Mar 06, 2007 at 04:40:45PM +0100, Beau Olivier wrote:
> 
> I'ld like to change the default period for graph display: 
> by default hobbbit displays trends with 4 graphs (48h,12d,48d,576d
> periods)
> -> It is possible change it to 48h,7d,30d,365d for example ?

It isn't configurable, but in the hobbit-4.2.0/web/hobbitgraph.c file 
near the top of the file you'll find these lines:

  #define HOUR_GRAPH  "e-48h"
  #define DAY_GRAPH   "e-12d"
  #define WEEK_GRAPH  "e-48d"
  #define MONTH_GRAPH "e-576d"

Change them to suit you. Then search that same file for the HOUR_GRAPH
etc. further down; you'll find 1 place where each is used like this:

  period = HOUR_GRAPH;
  persecs = 48*60*60;

and you need to change that "persecs" calculation also for all 4 graph
types.

Then run "make" (from the hobbit-4.2.0 directory) and "make install" 
(or just copy the "web/hobbitgraph.cgi" file to your ~hobbit/server/bin/ 
directory).


Henrik


To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20070306/32c6ccb1/attachment.html>


More information about the Xymon mailing list