Xymon Mailing List Archive search

Wildcard/regexes for hostnames in client-local.cfg

3 messages in this thread

list Mike Burger · Fri, 4 Oct 2013 14:13:19 -0400 (EDT) ·
I've looked over the client-local.cfg man page, and don't see anything
either allowing or disallowing this, so I figured I'd ask before trying it
out.

I have a group of servers where I'm going to be doing file presence
monitoring (alarm if the file exists). These servers will have fairly
similar names, so I'd like to be able use a regex in the hostname field (
[hostname] ) rather than have to create a separate entry for each server.

Is this possible?

Failing that, could I list the hostnames in one [...] similar to the
alerts.cfg file?

Thank you.
-- 
Mike Burger
http://www.bubbanfriends.org

"It's always suicide-mission this, save-the-planet that. No one ever just
stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1
list Mike Burger · Fri, 4 Oct 2013 14:42:57 -0400 (EDT) ·
Similarly, can I do so in analysis.cfg?
-- 
Mike Burger
http://www.bubbanfriends.org

"Once word leaks out that a pirate's gone soft, people begin to disobey
you and then it's nothing but work, work, work, all the time."
--Westley/The Dread Pirate Roberts
quoted from Mike Burger
I've looked over the client-local.cfg man page, and don't see anything
either allowing or disallowing this, so I figured I'd ask before trying it
out.

I have a group of servers where I'm going to be doing file presence
monitoring (alarm if the file exists). These servers will have fairly
similar names, so I'd like to be able use a regex in the hostname field (
[hostname] ) rather than have to create a separate entry for each server.

Is this possible?

Failing that, could I list the hostnames in one [...] similar to the
alerts.cfg file?

Thank you.
--
Mike Burger
http://www.bubbanfriends.org

"It's always suicide-mission this, save-the-planet that. No one ever just
stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1

list Japheth Cleaver · Fri, 4 Oct 2013 13:51:00 -0700 ·
You can do that in analysis.cfg, but unfortunately not in
client-local.cfg. Client-local is doing simple textual matching first on
hostname, then hostclass, then hostos.

For analysis.cfg (and alerts.cfg), you'd use PCRE strings in a HOST= line,
like:

              HOST=%db.*.foo.com TIME=W:0800:1600
                   LOAD 8.0 12.0
                   DISK /db  98 100
                   PROC mysqld 1

Regards,

-jc
quoted from Mike Burger


On Fri, October 4, 2013 11:42 am, Mike Burger wrote:
Similarly, can I do so in analysis.cfg?
--
Mike Burger
http://www.bubbanfriends.org

"Once word leaks out that a pirate's gone soft, people begin to disobey
you and then it's nothing but work, work, work, all the time."
--Westley/The Dread Pirate Roberts
I've looked over the client-local.cfg man page, and don't see anything
either allowing or disallowing this, so I figured I'd ask before trying
it
out.

I have a group of servers where I'm going to be doing file presence
monitoring (alarm if the file exists). These servers will have fairly
similar names, so I'd like to be able use a regex in the hostname field
(
[hostname] ) rather than have to create a separate entry for each
server.

Is this possible?

Failing that, could I list the hostnames in one [...] similar to the
alerts.cfg file?

Thank you.
--
Mike Burger
http://www.bubbanfriends.org

"It's always suicide-mission this, save-the-planet that. No one ever
just
stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1