Xymon Mailing List Archive search

Xymon tests - changing case?

4 messages in this thread

list Betsy Schwartz · Tue, 4 Sep 2012 19:38:03 -0400 ·
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.

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)
list Henrik Størner · Wed, 05 Sep 2012 07:48:25 +0200 ·
quoted from Betsy Schwartz
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
quoted from Betsy Schwartz
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)

list Marco Avvisano · Wed, 05 Sep 2012 12:08:07 +0200 ·
Hi,

it's possible to use content test (or soap test) in connect to httpstatus ?
For some tests i could have a value for http code (es. 500) that not 
always is a bad test,
but depend from the content of the answer

Marco
list Betsy Schwartz · Thu, 6 Sep 2012 13:32:04 -0400 ·
Thanks for the response!

I'd argue that everything should be case-sensitive, rather than all
lower-case, if you're going to change it. Ideally this wouldn't be an
issue, but in a big team you get different people using different
standards, and then there's always someone who comes along and wants
to change them all to match.