I'm trying to write a local ack script and hitting a small snag with xymondboard
The basic idea is to query the board to get the cookie like so: ~/server/bin/xymon localhost 'xymondboard test=disk host=foo.example.com fields=cookie'
and then I can call a custom script from alerts.cfg that will open a ticket, and then ack the alert like so:
~xymon/server/bin/xymon --debug --response localhost "xymondack 488277 1440 this is a test ack"
One problem I'm having - not insurmountable but annoying - is that "test" does a substring match, so if I have two tests with similar names I get both:
[xymon at xymon1 ~]$ ~/server/bin/xymon localhost 'xymondboard test=disk host=foo.example.com fields=hostname,line1'
foo.example.com|hp_disk|green Tue Nov 13 21:03:11 EST 2012 foo.example.com|disk|yellow Tue Nov 13 21:03:07 EST 2012 - Filesystems NOT ok
In the above example I have a "disk" and an "hp_disk" test and I only want the disk test.
In this case I could also filter to only grab the yellow:
~/server/bin/xymon localhost 'xymondboard test=disk color=yellow host=foo.example.com fields=hostname,testname,line1' foo.example.com|disk|yellow Tue Nov 13 21:03:07 EST 2012 - Filesystems NOT ok
but that's not always going to work.
I can code around this but if there's a way to get the exact test, it'd be handy
thanks Betsy