[Xymon] Xymon tests - changing case?

Henrik Størner henrik at hswn.dk
Wed Sep 5 07:48:25 CEST 2012


On 05-09-2012 01:38, Betsy Schwartz wrote:
> I've just been through a couple rounds of changing the *case* of
> tests. Xymon seems to have an odd mix of case-insensitivity and
> case-sensitivity.

Correct, in a way. Internally Xymon uses case-insensitive matching for 
host- and test-names, but since these names are included in the various 
history- and RRD-graph files it does become semi-difficult to change the 
case of a host or test. Because filesystems are case-sensitive.

To make matters slightly worse, xymond internally has a data-structure 
holding just the test names - and this one is searched 
case-insensitively. Which means that if your hosts.cfg file has two lines:
    10.0.0.1  myhost1 # mytest
    10.0.0.2  myhost2 # MyTest
then the all-lowercase version gets added first, and is found when the 
second host-definition is read - so both hosts end up with an 
all-lowercase testname.

The real fun then comes when one day you decide to swap those two hosts 
around and restart Xymon ...

It isn't the best solution, I agree. I've been bitten by this myself and 
would really like to change the code so *everything* is lower-case 
internally in Xymon, also when it comes to stuff stored on disk. But 
that would involve converting a lot of things in all of the existing 
history-files, so it is a bit tricky.


Regards,
Henrik

> If you create a test named MYTEST and decide later that it should be
> MyTest - it is rather hard to change. I am not sure if all these steps
> are necessary but I ended up doing this :
> a) rename the test to some temporary name (to keep it alive)
> b) drop the test
> c) turn xymon off
> d) blow away all references to the test in files in data/hist
> e) name the test to the new case
> f) restart xymon
> g) drop the temporary test name
>
> (I started with all lower-case test names. Lost that fight. Plus, it's
> kinda nice that naming a test with a capital letter keeps it prominent
> on the left)
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>




More information about the Xymon mailing list