[xymon] Multiple regex on PAGE line of hobbit-alerts.cfg?
Cade Robinson
cade.robinson at gmail.com
Tue Oct 5 17:54:17 CEST 2010
Ahh - rainbows!
I was thinking each one was separate rather than as a whole.
Thanks!
From: sholmes42 at gmail.com [mailto:sholmes42 at gmail.com] On Behalf Of Steve
Holmes
Sent: Tuesday, October 05, 2010 10:05 AM
To: xymon at xymon.com
Subject: Re: [xymon] Multiple regex on PAGE line of hobbit-alerts.cfg?
On Tue, Oct 5, 2010 at 10:55 AM, Cade Robinson <cade.robinson at gmail.com>
wrote:
Is it possible to use multiple regex on a PAGE= line of hobbit-alerts.cfg?
EG bb-hosts
page prodlinux Linux Servers
...
subpage criticalprodlinux Critical Prod Linux Servers
...
subpage noncriticalprodlinux Non-Critical Prod Linux Servers
...
page prodwin Windows Servers
...
subpage criticalprodwin Critical Prod Windows Servers
...
subpage noncriticalprodwin Non-Critical Prod Windows Servers
...
So what I have is my "prod" servers and then a subpage of critical ones that
I want to get sms text pages on and then non-critical prod servers that I
don't really need a page at 3am on.
In my hobbit-alerts.cfg I want an email if any prodlinux or prodwin goes
yellow and a page if the critical ones go red
So in hobbit-alerts something like this:
PAGE=%prodlinux/.*,%prodwin/.*,someotherpage
...
COLOR=yellow
...
PAGE=prodlinux/criticalprodlinux,prodwin/criticalprodwin,someotherpage
...
COLOR=red
...
The red part works but the yellow doesn't.
Presumably because I am trying to do two regex in the PAGE line?
Thanks
Cade
To unsubscribe from the xymon list, send an e-mail to
xymon-unsubscribe at xymon.com
Since you are using the pcre on the first one, replace the commas with '|'
(or).
e.g.:
PAGE=%prodlinux/.*|prodwin/.*|someotherpage
Note you only need the % at the beginning of the string.
Steve
--
The test of a democracy is not the magnificence of buildings or the speed of
automobiles or the efficiency of air transportation, but rather the care
given to the welfare of all the people. -Helen Adams Keller, lecturer and
author (1880-1968)
Truth never damages a cause that is just. -Mohandas Karamchand Gandhi
(1869-1948)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20101005/1ea8f2a9/attachment.html>
More information about the Xymon
mailing list