[xymon] Multiple regex on PAGE line of hobbit-alerts.cfg?

Steve Holmes sholmes42 at mac.com
Tue Oct 5 17:05:25 CEST 2010


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/cfbc94f1/attachment.html>


More information about the Xymon mailing list