Xymon Mailing List Archive search

Case sensitivity in bb-hosts service name

2 messages in this thread

list Richard Burgess · Tue, 5 Dec 2006 13:51:06 -0000 ·
We're seeing the following behaviour in Hobbit version 4.1.2p1 on
OpenBSD 3.8 GENERIC.MP#298 i386:


A 'service' was created on an existing host using a lower case name, eg.
xyz, by sending a 'status' event to the hobbit server.

Subsequent status events are being sent using upper case 'XYZ', but
being assigned to the history for the lower case service, 'xyz'.  When
searching for Reports->Event Log Report->Tests to match=xyz, the
original (lower case) and subsequent (upper case) events are shown in
the resulting events with the lower case name.

A dot has been added to the bb-hosts config for a page using the service
name 'XYZ', but the dot does not appear.  When changing the name in the
bb-hosts config to be 'xyz', the dot does appear.  Unfortunately, for
cosmetic and consistency reasons, we would like it to be upper case.


It seems the case sensitivity is not being carried through to service
name parsing in the bb-hosts file.  Can someone advise if this is a bug
or a known 'feature'?

Also, suggestions are welcome for a workaround.  We've tried using
server/bin/bb 127.0.0.1 "rename HOST xyz XYZ", also ... "drop HOST xyz",
also ... "rename HOST xyz xyz-1".  None of these seem to get rid of the
'xyz' service and allow us to replace it with an 'XYZ' service.


thanks,

Richard
list Henrik Størner · Fri, 8 Dec 2006 23:12:23 +0100 ·
quoted from Richard Burgess
On Tue, Dec 05, 2006 at 01:51:06PM -0000, Burgess, Richard wrote:
It seems the case sensitivity is not being carried through to service
name parsing in the bb-hosts file.  Can someone advise if this is a bug
or a known 'feature'?
Yes, that is a bit tricky. Internally, Hobbit ignores upper/lower case
on all kinds of names - whether names of hosts or columns. But it does
preserve the case when building the status view.

The way to do this is to shut down Hobbit, and then edit the
~hobbit/server/tmp/hobbitd.chk file replacing the string "|xyz|" with
"|XYZ|" throughout the file. When you restart Hobbit it will pickup
these tests as having the name "XYZ", so regardless of whether your
tests send in a status for "xyz" or "XYZ" they will show up with the
upper-case setting that Hobbit picked up from the checkpoint file.

Note that this also affects the files and directories where the history
for these events are stored. Unix filesystems are generally
case-sensitive, so to implement this renaming fully you may need to manually
rename some of the files in the ~hobbit/data/hist/ directory as well as
the "xyz" directory in ~hobbit/data/histlogs/HOSTNAME/ .


Regards,
Henrik