Xymon Mailing List Archive search

multiple hobbit servers with different bb-hosts files: BBDISPLAYS troubles

8 messages in this thread

list Stef Coene · Wed, 13 Aug 2008 11:30:58 +0200 ·
Hi,

I have (don't ask why) 2 hobbit servers.  Each hobbit servers reports all information to the other.  So BBDISP=0.0.0.0 and BBDISPLAYS = "<hobbit A> <hobbit B>"

But some clients are only listed in the bb-hosts of 1 of the 2 hobbit servers.  The client only reports to the hobbit server where they are listed in the bb-hosts file.  I can see the incoming messages and I see the files under the data directory.  But no status is displayed on the html pages.

After comparing the 2 servers, I found that the first entry in BBDISPLAYS is used by the html generator to check if the client exists in the bb-hosts files.  If the client is not found, no status is displayed on the html pages.
So, in my case, I had to make sure that the first entry in BBDISPLAYS is the local hobbit server.  And of course, this wasn't and it took my 3 days to figure out why the status was not displayed on my hobbit server.

It's only the page generator that has this problem.  The network tests are done, clients can send information, all files in the data directory are created.


Stef
list Sebastian Auriol · Wed, 13 Aug 2008 20:26:12 +0100 ·
quoted from Stef Coene
Stef Coene <mailto:user-dbffe946c0f4@xymon.invalid> wrote:
But some clients are only listed in the bb-hosts of 1 of the 2 hobbit
servers. The client only reports to the hobbit server where they are
listed in the bb-hosts file.  I can see the incoming messages and I
see the files under the data directory.  But no status is displayed
on the html pages. 
Did you see the "--ghosts={allow|drop|log}" setting for hobbitd? "allow"
seems to be what you want.

SebA
list Sebastian Auriol · Thu, 14 Aug 2008 19:19:01 +0100 ·
quoted from Sebastian Auriol
Sebastian <mailto:user-7b2156f36779@xymon.invalid> wrote:
Stef Coene <mailto:user-dbffe946c0f4@xymon.invalid> wrote:
But some clients are only listed in the bb-hosts of 1 of the 2 hobbit
servers. The client only reports to the hobbit server where they are
listed in the bb-hosts file.  I can see the incoming messages and I
see the files under the data directory.  But no status is displayed
on the html pages.
Did you see the "--ghosts={allow|drop|log}" setting for hobbitd?
"allow" seems to be what you want.
Actually you can also use BBGHOSTS in hobbitserver.cfg, which is more
convenient I think. The man page unhelpfully doesn't list what BBGHOSTS of 0
does, but the cfg file does, so... you want a BBGHOSTS of 0.  Or make sure
the bb-hosts file are the same on both servers...  It is designed so that
they can be.

SebA
list Stef Coene · Thu, 14 Aug 2008 20:47:23 +0200 ·
quoted from Sebastian Auriol
On Thursday 14 August 2008, Sebastian wrote:
Sebastian <mailto:user-7b2156f36779@xymon.invalid> wrote:
Stef Coene <mailto:user-dbffe946c0f4@xymon.invalid> wrote:
But some clients are only listed in the bb-hosts of 1 of the 2 hobbit
servers. The client only reports to the hobbit server where they are
listed in the bb-hosts file.  I can see the incoming messages and I
see the files under the data directory.  But no status is displayed
on the html pages.
Did you see the "--ghosts={allow|drop|log}" setting for hobbitd?
"allow" seems to be what you want.
Actually you can also use BBGHOSTS in hobbitserver.cfg, which is more
convenient I think. The man page unhelpfully doesn't list what BBGHOSTS of
0 does, but the cfg file does, so... you want a BBGHOSTS of 0.  Or make
sure the bb-hosts file are the same on both servers...  It is designed so
that they can be.
It is not a ghost problem.  I was expecting that the information will be send 
to both BBDISPLAY servers and that they will decide what to do with the 
information.
But that's not the case, it talks to the first BBDISPLAY server and only if 
that server is accepting the information it is also send to the second 
BBDISPLAY server.


Stef
list Sebastian Auriol · Thu, 14 Aug 2008 21:10:01 +0100 ·
quoted from Stef Coene
Stef Coene <mailto:user-dbffe946c0f4@xymon.invalid> wrote:
On Thursday 14 August 2008, Sebastian wrote:
Sebastian <mailto:user-7b2156f36779@xymon.invalid> wrote:
Stef Coene <mailto:user-dbffe946c0f4@xymon.invalid> wrote:
But some clients are only listed in the bb-hosts of 1 of the 2
hobbit servers. The client only reports to the hobbit server where
they are listed in the bb-hosts file.  I can see the incoming
messages and I see the files under the data directory.  But no
status is displayed on the html pages.
Did you see the "--ghosts={allow|drop|log}" setting for hobbitd?
"allow" seems to be what you want.
Actually you can also use BBGHOSTS in hobbitserver.cfg, which is more
convenient I think. The man page unhelpfully doesn't list what
BBGHOSTS of 0 does, but the cfg file does, so... you want a BBGHOSTS
of 0.  Or make sure the bb-hosts file are the same on both
servers...  It is designed so that they can be.
It is not a ghost problem.  I was expecting that the information will
be send to both BBDISPLAY servers and that they will decide what to
do with the information.
But that's not the case, it talks to the first BBDISPLAY server and
only if that server is accepting the information it is also send to
the second BBDISPLAY server.
Well your situation / original message is not very clear then.  What is the
big picture you are trying to achieve here?  Have you checked your
http://xxx/hobbit-cgi/bb-hostsvc.sh?HOST=xxx&SERVICE=hobbitd
and
http://yyy/hobbit-cgi/bb-hostsvc.sh?HOST=yyy&SERVICE=hobbitd
pages?  Are there are errors, warnings, ghosts or multi-source statuses?
Maybe you can post them?

SebA
list Stef Coene · Thu, 14 Aug 2008 22:28:46 +0200 ·
quoted from Sebastian Auriol
On Thursday 14 August 2008, Sebastian wrote:
Well your situation / original message is not very clear then.  What is the
big picture you are trying to achieve here?  Have you checked your
http://xxx/hobbit-cgi/bb-hostsvc.sh?HOST=xxx&SERVICE=hobbitd
and
http://yyy/hobbit-cgi/bb-hostsvc.sh?HOST=yyy&SERVICE=hobbitd
pages?  Are there are errors, warnings, ghosts or multi-source statuses?
Maybe you can post them?
Nop, no error.
And the problem is solved.  It was just a remark that if you have multiple hobbit servers, the first hobbit server in BBDISPLAYS is checked to make sure it has an entry for the client.  If it has no entry for the client, no information is send to the other BBDISPLAYS servers.


Stef
list Sebastian Auriol · Fri, 15 Aug 2008 19:38:59 +0100 ·
quoted from Stef Coene
Stef Coene <mailto:user-dbffe946c0f4@xymon.invalid> wrote:
And the problem is solved.  It was just a remark that if you have
multiple hobbit servers, the first hobbit server in BBDISPLAYS is
checked to make sure it has an entry for the client.  If it has no
entry for the client, no information is send to the other BBDISPLAYS
servers. 
Oh, I hadn't realised you were just posting an FYI about the problem and
your workaround rather than trying to really solve the issue.  Appreciate
the heads-up.

SebA
list Henrik Størner · Mon, 25 Aug 2008 20:47:29 +0000 (UTC) ·
quoted from Stef Coene
In <user-89fe6a7605b8@xymon.invalid> Stef Coene <user-dbffe946c0f4@xymon.invalid> writes:
I have (don't ask why) 2 hobbit servers.  Each hobbit servers reports all information to the other.  So BBDISP=0.0.0.0 and BBDISPLAYS = "<hobbit A> <hobbit B>"
But some clients are only listed in the bb-hosts of 1 of the 2 hobbit servers.  The client only reports to the hobbit server where they are listed in the bb-hosts file.  I can see the incoming messages and I see the files under the data directory.  But no status is displayed on the html pages.
After comparing the 2 servers, I found that the first entry in BBDISPLAYS is used by the html generator to check if the client exists in the bb-hosts files.  If the client is not found, no status is displayed on the html pages.
So, in my case, I had to make sure that the first entry in BBDISPLAYS is the local hobbit server.  And of course, this wasn't and it took my 3 days to figure out why the status was not displayed on my hobbit server.
It's only the page generator that has this problem.  The network tests are done, clients can send information, all files in the data directory are created.

Your setup is a bit unusual, but there's nothing wrong in doing what you're
doing. The webpage generator just wasn't designed with this in mind. What happens is that the webpage generator contacts hobbitd to retrieve the list
of statuses to build the webpages, and it uses (surprise!) the BBDISPLAYS
setting to do that. But it only queries one of the servers - the first one,
as You've found out.

So your solution is really the easiest workaround for this behaviour. I think this should be documented. I've added this to the bbgen(1) man-page:

Note: The data for the webpages is retrieved from the
.I hobbitd(8)
daemon, and bbgen uses the values of the BBDISPLAY / BBDISPLAYS environment
variables to determine the network address where hobbitd can be reached. If
you have more than one server listed in BBDISPLAYS, make sure the first one
is the local hobbitd server - this is the one that bbgen will query for data.


Regards,
Henrik