Can anyone tell me how to get a graph onto a test status page?
I have a devmon template that monitors fan speed and creates a "fans" status page. Because the OIDs are leaf nodes, I have to construct a table myself. This is all working. Having added "fans=devmon" to "TEST2RRD", I now have RRD files named fans.FanSpeed1.rrd, fans.FanSpeed2.rrd and so on.
I've added "fans" to "GRAPHS", and created a graphs.cfg definition for "[fans]", and so the graphs appear on the trends page.
The man page for xymonserver.cfg describes TEST2RRD, and states:
"This is also used by the svcstatus.cgi(1) script to determine if the detailed status view of a test should include a graph."
So it would seem that by declaring "fans=devmon" in "TEST2RRD", I should now be getting the graphs of fan speed on the test status page. But I get nothing. There must be something else I'm missing.
Cheers Jeremy
Jeremy,
Can anyone tell me how to get a graph onto a test status page?
I have a devmon template that monitors fan speed and creates a "fans" status page. Because the OIDs are leaf nodes, I have to construct a table myself. This is all working. Having added "fans=devmon" to "TEST2RRD", I now have RRD files named fans.FanSpeed1.rrd, fans.FanSpeed2.rrd and so on.
I've added "fans" to "GRAPHS", and created a graphs.cfg definition for "[fans]", and so the graphs appear on the trends page.
The man page for xymonserver.cfg describes TEST2RRD, and states:
"This is also used by the svcstatus.cgi(1) script to determine if the detailed status view of a test should include a graph."
So it would seem that by declaring "fans=devmon" in "TEST2RRD", I should now be getting the graphs of fan speed on the test status page. But I get nothing. There must be something else I'm missing. It sounds like you're doing it all OK. I had a similar problem in the past with 4.2.3. I ended up solving it by copying hobbitserver.cfg (xymonserver.cfg) to a new file (hobbithostcgi.cfg) and changing the devmon entries in TEST2RRD - so fans=devmon becomes fans. Then in hobbitcgi.cfg (xymoncgi.cfg) I changed: CGI_SVC_OPTS="--env=/usr/lib/hobbit/server/etc/hobbithostcgi.cfg --no-svcid --history=top"
It only seemed to be the =devmon graphs that needed this - cpu=la, http=tcp, etc were OK.
David.
-- David Baldwin - Senior Systems Administrator (Datacentres + Networks) Information and Communication Technology Services Australian Sports Commission http://ausport.gov.au Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616 david.baldwin at ausport.gov.au Leverrier Street Bruce ACT 2617
Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au
This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.
On Thu, Jan 5, 2012 at 11:22 AM, David Baldwin <david.baldwin at ausport.gov.au> wrote:
It sounds like you're doing it all OK.
Thanks David.
The solution I came to was ever so simple. I just added "<!-- linecount=2-->" into my "message" file, and Xymon starting graphing the first two RRD files it could find.
Cheers Jeremy
On Thursday, 5 January 2012 03:19:27 Jeremy Laidman wrote:
On Thu, Jan 5, 2012 at 11:22 AM, David Baldwin
<david.baldwin at ausport.gov.au> wrote:
It sounds like you're doing it all OK.
Thanks David.
The solution I came to was ever so simple. I just added "<!-- linecount=2-->" into my "message" file, and Xymon starting graphing the first two RRD files it could find.
There is code in Xymon's lib/htmllog.c which generates the HTML for multiple graphs for certain service/test names. The default list is:
disk,inode,qtree,quotas,snapshot,TblSpace,if_load
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
or similar to the options environment variable for hobbitsvc.cgi (or svcstatus.cgi), CGI_SVC_OPTS.
(I should actually cover this in the devmon docs, otherwise the 'temp' test, and other tests which have graphs by default, won't show the graphs on the test page).
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. 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. I'd hate to lose this feature.
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. (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.)
Cheers Jeremy
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
On Fri, Jan 6, 2012 at 7:07 PM, Buchan Milne <bgmilne at staff.telkomsa.net> wrote:
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.
Well yes that would seem to work. But it just seems redundant to have to list "fans" in multigraphs and then also enable it with "TABLE:rrd()" where I want it. Why couldn't multigraphs just be the default for everything? Perhaps its a performance thing? Perhaps I'm missing something. I guess I'm still a bit confused by it all. I'm not proposing a change to the way Xymon/Devmon work, just trying to understand how they work.
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?
By specifying "linecount" in the template. If it's <= 0 it shows as a multi-graph. If it's >0, it shows several single-graphs. If by "graph definitions" you mean the contents of graphs.cfg, then I that's not what I'm referring to.
Which devmon templates have the same test name but different graphing methods?
Well, my new "fans" template that I'm developing has graphs because it shows fan speed, but all of the standard package of templates have no graphs for fans because most fan OIDs don't show fan speed.
(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.
Already mentioned on the devmon-devel list. I will submit a patch soon.
J
participants (3)
-
bgmilne@staff.telkomsa.net
-
david.baldwin@ausport.gov.au
-
jlaidman@rebel-it.com.au