[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [xymon] Multiple regex on PAGE line of hobbit-alerts.cfg?
- To: <xymon (at) xymon.com>
- Subject: RE: [xymon] Multiple regex on PAGE line of hobbit-alerts.cfg?
- From: "Cade Robinson" <cade.robinson (at) gmail.com>
- Date: Tue, 5 Oct 2010 10:54:17 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:references :in-reply-to:subject:date:message-id:mime-version:content-type :x-mailer:thread-index:content-language; bh=9r6MAsRI8U6oB2WCpwJyLkyEC9z+12AwthGmUJltHFI=; b=BBGArzRvlxa0i/alk6POcU1W4j6kWPkkjhHTdAENaEV+zw0CD7n1nGvlBuNXXCv9RT bw6nAdv5dCpf4/4V9xGGmKn9hCMWCTeOF7MIRH7oREuzNx8fhxj98BPg4eOHRG40hXOH VPf805T5smwPNnRzohuR1ITHKP+QPzHAe6M4M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:x-mailer:thread-index:content-language; b=bsJBVxSB9O3Ni2oQFRi2g99FRGv+1vxvx5hGVYtn4CMqsBB8nS7wyBPBnfvDkePtbV Z60KBx+GIMZ7+WQzUycbqN/75SSvwKNIN+6qh/6w2c4I54JOnTvLfwxPawJopSituPYN /jozqUAsEoDCb0oskRjYMRBuFdin7eRyEBHps=
- References: <4cab3c6e.4f6fe60a.5ccd.ffffa66a (at) mx.google.com> <AANLkTimVPoYz0zGkatx10sGXhmgNzc4Nh2t5i+z48Mi3 (at) mail.gmail.com>
- Thread-index: ActknwEGT3XuNsypT8aLoOtbJqD8RAABnDXQ
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)