[hobbit] Re: Please Help
Tom Moore
Tom.Moore at sas.com
Fri Jul 20 16:32:55 CEST 2007
Hi Henrik,
I applied your patch and recompiled hobbit, but the "Metrics Report" for example still shows all of the servers in the main bb-hosts file, rather than the bb-hosts-cust file that the subpage uses to generate the /hobbit/custweb directory. (/hobbit-cgi/hobbit-hostgraphs.sh)
Here's the diff:
--- headfoot.c-orig 2007-07-20 09:58:48.000000000 -0400
+++ headfoot.c 2007-07-20 09:59:57.000000000 -0400
@@ -324,7 +324,7 @@
hname = gettok(buf, "|");
- if (hname && wanted_host(hname)) {
+ if (hname && wanted_host(hname) && hostinfo(hname)) {
newrec = (treerec_t *)malloc(sizeof(treerec_t));
newrec->name = strdup(hname);
newrec->flag = 0;
-----Original Message-----
From: Henrik Stoerner [mailto:henrik at hswn.dk]
Sent: Thursday, July 19, 2007 5:09 PM
To: hobbit at hswn.dk
Subject: Re: [hobbit] Re: Please Help
On Thu, Jul 19, 2007 at 04:48:59PM -0400, Tom Moore wrote:
> I guess my big question is where does a script such as hobbit-hostgraphs.sh
> grab its list of servers to show in the choice pane?
It grabs it from the Hobbit server, using the "hobbitdboard" command.
Done in the lib/headfoot.c "fetch_board()" code, which is eventually
used to build the "&HOSTLIST" output that is included into the
hostgraphs_form output.
I hadn't thought about the need to filter the hobbitdboard output
to include only the hosts included in a stripped-down version of the
bb-hosts file, but it's very easy to do that.
You need to make a small code-change. In the lib/headfoot.c file
there's a "fetch_board()" routine. Line 327 of that file (in the
4.2.0 version) looks like this:
if (hname && wanted_host(hname)) {
Change that to
if (hname && wanted_host(hname) && hostinfo(hname)) {
This will check that the hostname exists in the bb-hosts file,
and skip data from un-defined hosts.
Regards,
Henrik
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk
More information about the Xymon
mailing list