Config report(critical) not working with critical systems (nkview.cfg), but NK tags
Buchan Milne
bgmilne at staff.telkomsa.net
Tue Feb 5 17:25:56 CET 2008
I am moving to the Critical Systems view, however, to ensure that all the
critical systems are in fact on the Critical Systems view, I was hoping to
use the Config report (critical), and refer teams to the reports for their
pages/servers. However, I always get empty reports, while the normal Config
report has the correct values (from nkview.cfg) in the NK column for the
correct host/test.
The source code for hobbit-confreport.c shows that it filters based on the NK
tag from bb-hosts when run with the --critical option.
This is quite a big issue, I can't give everyone edit access, and there's no
other really feasible way to audit this at present.
OK, it looks like there's something wrong here:
if (!nkalerts || (strcmp(nkval(hname, tname, nkalerts), "No") == 0)) wanted =
0;
This change (beware line breaks) seems to do what I need (at least on the dev
system I tested on):
--- web/hobbit-confreport.c.orig 2008-02-05 18:17:09.380998000 +0200
+++ web/hobbit-confreport.c 2008-02-05 18:17:29.161737419 +0200
@@ -742,7 +742,7 @@
namelist_t *hinfo = hostinfo(hname);
char *nkalerts = bbh_item(hinfo, BBH_NK);
- if (!nkalerts || (strcmp(nkval(hname, tname,
nkalerts), "No") == 0)) wanted = 0;
+ if (!nkalerts && (strcmp(nkval(hname, tname,
nkalerts), "No") == 0)) wanted = 0;
}
if (wanted && hname && tname && strcmp(hname, "summary") &&
strcmp(tname, xgetenv("INFOCOLUMN")) && strcmp(tname,
xgetenv("TRENDSCOLUMN"))) {
However, a host with NK tags in bb-hosts now appears in the report, with NK
columns displaying "No". I can live with this though ...
Regards,
Buchan
More information about the Xymon
mailing list