[Xymon] Adding a graph to test status view

Buchan Milne bgmilne at staff.telkomsa.net
Fri Jan 6 09:07:38 CET 2012


On Friday, 6 January 2012 01:29:52 Jeremy Laidman wrote:
> On Thu, Jan 5, 2012 at 9:16 PM, Buchan Milne <bgmilne at staff.telkomsa.net> 
wrote:
> > I think the most correct way to do this is to edit hobbitcgi.cfg (or
> > cgioptions.cfg) and add the option:
> > 
> > --multigraphs=,disk,inode,qtree,quotas,snapshot,TblSpace,if_load,fans
> 
> Yes, but what if I want graphs on only some fans and not others.

Don't put the :rrd tag on the TABLE operator in the template.

> It's
> really useful to be able to decide whether to have a graph, and if so,
> the format (multi- or not), from the Devmon template that parses and
> reports the data.

Really? How do you handle the graph definitions?

Which devmon templates have the same test name but different graphing methods?

> I'd hate to lose this feature.

I only care about 'features' that are required for templates in devmon svn to 
work, but regardless, this 'feature' was designed in when I wrote the initial 
patch to add RRD support for devmon to Xymon.

> > From my reading of htmllog.c, I can't see why adding the linecount=2
> > works, it should only work for a test in multigraphs ...
> 
> And yet it works.  From reading the code, I came to the same
> conclusion as you.  But I doubted my ability to read code accurately,
> and so I tried it.  To my delight, it worked.
> 
> Also, I get graphs on my "if_err" status page, even though it's not
> defined in "multigraphs".  So obviously multigraphs is not required.
> Xymon seems to add "linecount" and this causes the graph(s) to appear.

The exact same code block that adds the graph links adds the linecount. The 
linecount is an effect, not a cause:

                if (may_have_rrd) {
                        fprintf(output, "<!-- linecount=%d -->\n", linecount);
                        fprintf(output, "%s\n", xymon_graph_data(hostname, 
displayname, service, color, graph, linecount, HG_WITHOUT_STALE_RRDS, 
HG_PLAIN_LINK, locatorbased, now-graphtime, now));
                }

>  (Actually, Xymon adds the wrong value for "linecount" in my case, so
> I get 3 broken if_err graphs after 9 good ones, but I'm not concerned
> about that right now.)

Well, if I saw your template modifications in a patch request on the devmon 
tracker, maybe I could take a look.

Regards,
Buchan



More information about the Xymon mailing list