[Xymon] [Xymon-developer] PATCH: RRD Graph Colours

henrik at hswn.dk henrik at hswn.dk
Wed Feb 15 14:35:46 CET 2012


Hi Malcolm,

On Thu, 19 Jan 2012 16:41:44 +0100, "Malcolm Hunter"
<malcolm.hunter at gmx.com> wrote:
> Hi,
> 
> Attached is a patch that allows users to customise the colour of the RRD
> graphs (default is black on white). To change colours (e.g. to white on
> black), add the following to xymonserver.cfg:
> 
> RRDFONTCOLOR="#FFFFFF"
> RRDBACKCOLOR="#000000"

I'm not really happy with this. I would really prefer to avoid any more
hardcoded rrd-graph options in the code, especially when they are not
required for Xymon to just show the graphs. 

E.g. your patch provides settings for the font- and background-colors. But
what if you want to turn the grid off ? There's an rrdgraph option for that
- should we provide yet another Xymon setting for it ?

Instead, we should provide a simple way of adding whatever custom options
for rrdgraph that you would like. And it should be possible to have both a
global default, and a per-graph specific set of options.

So how about this patch instead ? Untested, but it compiles and should be
simple enough to "just work". You can either put the rrd_graph() options in
RRDGRAPHOPTS in xymonserver.cfg, or provide an OPTIONS line in the
graphs.cfg file for each graph. The per-graph setting takes precedence.


Regards,
Henrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphoptions.diff
Type: text/x-c
Size: 2425 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120215/52c0a39d/attachment.bin>


More information about the Xymon mailing list