[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: Steve Holmes <sholmes42 (at) mac.com>
- Date: Tue, 5 Oct 2010 11:05:25 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=5y3ekWnBpusXohPHkCw78LKb2hPlm2Ha/4j5Hy3BdmI=; b=XTOD7RVZS1wfW9e4C5NIJ9pTG16zXjRMiuoTbbODOPLAKrKNLVmhm6h0r27CqLPxqT wMPbBeBqHo28RJDmXak3JEblbNXZGmhp/+WT3arAMSyN97lhRTGa7+kwzQLhoaLs7vRf N9EpnlwiUrXeX6VPbkN8GhKncjYwMDEPWbkVo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=wej4+MQSqW/TPB2xiIjOVSGAr7ULI3QysdB5oJvRRvvKO2h+zXOcBal686u2tMi3ek Se9rA+2IPMDtfmYGMjl19E4znGkLm1VtNdQbYBqFuPpEqJA0nIB7qZjBYKk06aqy3uOH 8G3/w4zUNKCoUF5EUYGVZz8nDKcoEn55HbjWU=
- References: <4cab3c6e.4f6fe60a.5ccd.ffffa66a (at) mx.google.com>
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)