[Xymon] How to query all red systems ignoring nopropred hosts

J.C. Cleaver cleaver at terabithia.org
Wed Jan 27 19:42:04 CET 2016


On Wed, January 27, 2016 9:35 am, thorsten.erdmann at daimler.com wrote:
> Hi
>
> for creating an interface to another monitoring system I want to query the
> xymon server for a list of all currently red systems.
> I can do this with the xymon utility:
>
> xymon 127.0.0.1 "xymondboard color=RED"
>
> But this lists also hosts which have the nopropred tag set and I want to
> ignore these. The only way I found was querying the config for each red
> host and search for the tag myself. This can result in very much queries
> to the xymon server if there are currently much red states.
>
> Is there a nicer way to realize this? Maybe I have missed a filter option.
> Or maybe I can see the tag in some field supported by the xymondboard's
> output.

There's no direct way to do a != on XMH_* fields (although this is
something that should be added, to be honest), however you can either
check for the contents of the tag itself, or use the old filter pipeline
approach.

Unfortunately, the actual *calculation* of the NOPROP.* effects is done
entirely within xymongen, not xymond, so matching tests, wildcards,
includes and excludes would have to be done by hand.


This one will give you all those with any values there at all:

xymon localhost 'xymondboard color=red XMH_NOPROPRED=.'


This works for any xymon-xmh(5) tag; these can also be used in field
output, so you can also just examine the entire (parsed) config line:

xymon localhost 'xymondboard color=red fields=hostname,test,XMH_RAW' |
grep -i -v noprop


HTH,
-jc




More information about the Xymon mailing list