Xymon Mailing List Archive search

Get status from command line?

4 messages in this thread

list Johan Sjöberg · Wed, 7 Sep 2011 12:46:11 +0000 ·
Hi.

Is it possible to get the current status for specified/all hosts from command line? I want to create a client-side script on the server that checks for purple statuses. We don't want to configure alerts for purple, since there are often multiple tests or hosts that go purple at the same time, and we don't want to be flooded with alerts.
We are currently doing this by checking the nongreen.html file, but that's not a pretty solution.

Best Regards,
Johan Sjöberg
list David W David Gore · Wed, 7 Sep 2011 09:21:17 -0400 ·
~/bin/xymon 0 "xymondboard host=* test=* color=purple"


~David
quoted from Johan Sjöberg

From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Johan Sjöberg
Sent: Wednesday, September 07, 2011 12:46
To: xymon at xymon.com
Subject: [Xymon] Get status from command line?

Hi.

Is it possible to get the current status for specified/all hosts from command line? I want to create a client-side script on the server that checks for purple statuses. We don't want to configure alerts for purple, since there are often multiple tests or hosts that go purple at the same time, and we don't want to be flooded with alerts.
We are currently doing this by checking the nongreen.html file, but that's not a pretty solution.

Best Regards,
Johan Sjöberg
list Johan Sjöberg · Wed, 7 Sep 2011 13:56:19 +0000 ·
Thanks a lot, that looks like exactly what I want. Thanks to Larry Barber as well for pointing me in the right direction.

/Johan
quoted from David W David Gore

From: Gore, David W (David) [mailto:user-368fd67cc6bd@xymon.invalid]
Sent: den 7 september 2011 15:21
To: Johan Sjöberg; xymon at xymon.com
Subject: RE: Get status from command line?

~/bin/xymon 0 "xymondboard host=* test=* color=purple"


~David

From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com]<mailto:[mailto:xymon-bounces at xymon.com]> On Behalf Of Johan Sjöberg
Sent: Wednesday, September 07, 2011 12:46
To: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: [Xymon] Get status from command line?

Hi.

Is it possible to get the current status for specified/all hosts from command line? I want to create a client-side script on the server that checks for purple statuses. We don't want to configure alerts for purple, since there are often multiple tests or hosts that go purple at the same time, and we don't want to be flooded with alerts.
We are currently doing this by checking the nongreen.html file, but that's not a pretty solution.

Best Regards,
Johan Sjöberg
list Johan Sjöberg · Wed, 7 Sep 2011 14:42:20 +0000 ·
Actually, it seems like it is better to skip the "host=* test=*" section, since that is implicit. If they are specified, there are errors logged in the xymond.log:

2011-09-07 16:38:23 pcre compile '*' failed (offset 0): nothing to repeat
2011-09-07 16:38:23 pcre compile '*' failed (offset 0): nothing to repeat

So the command is just ~/bin/xymon 0 "xymondboard color=purple"

/Johan
quoted from Johan Sjöberg

From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Johan Sjöberg
Sent: den 7 september 2011 15:56
To: xymon at xymon.com
Subject: Re: [Xymon] Get status from command line?

Thanks a lot, that looks like exactly what I want. Thanks to Larry Barber as well for pointing me in the right direction.

/Johan

From: Gore, David W (David) [mailto:user-368fd67cc6bd@xymon.invalid]<mailto:[mailto:user-368fd67cc6bd@xymon.invalid]>
Sent: den 7 september 2011 15:21
To: Johan Sjöberg; xymon at xymon.com<mailto:xymon at xymon.com>
Subject: RE: Get status from command line?

~/bin/xymon 0 "xymondboard host=* test=* color=purple"


~David

From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com]<mailto:[mailto:xymon-bounces at xymon.com]> On Behalf Of Johan Sjöberg
Sent: Wednesday, September 07, 2011 12:46
To: xymon at xymon.com<mailto:xymon at xymon.com>
Subject: [Xymon] Get status from command line?

Hi.

Is it possible to get the current status for specified/all hosts from command line? I want to create a client-side script on the server that checks for purple statuses. We don't want to configure alerts for purple, since there are often multiple tests or hosts that go purple at the same time, and we don't want to be flooded with alerts.
We are currently doing this by checking the nongreen.html file, but that's not a pretty solution.

Best Regards,
Johan Sjöberg