[Xymon] xymondboard - can I get an exact match? (and writing xymon ACK script and opening tickets)

Gore, David W (David) david.gore at verizon.com
Wed Nov 14 15:36:24 CET 2012


Regular expressions work:

~/server/bin/xymon localhost 'xymondboard test=^disk$ host=foo.example.com fields=cookie'


~David

-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Betsy Schwartz
Sent: Tuesday, November 13, 2012 21:18
To: xymon at xymon.com
Subject: [Xymon] xymondboard - can I get an exact match? (and writing xymon ACK script and opening tickets)

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
_______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon



More information about the Xymon mailing list