[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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