[hobbit] newbie: *.example.com

Henrik Stoerner henrik at hswn.dk
Thu Feb 1 16:26:42 CET 2007


On Thu, Feb 01, 2007 at 12:11:16PM +0100, Frédéric Mangeant wrote:
> Le 01/02/2007 12:05, Sabeer MZ a écrit :
> >How to add the entry on hobbit-clients.cfg in a single shot ?
> >Please find below lines. is it possible to do something like below ?
> >
> >HOST=*.example.com
> >       PROC cron 1 -1 yellow
> >       PROC hobbitlaunch
> >       PROC mysqld
> >       PROC sshd
> >       DIR %^/var/log TRACK
> >       PORT LOCAL=%[\.:](80|443) STATE=LISTEN min=2 TEXT=http
> >       PORT "LOCAL=%([.:]22)$" state=ESTABLISHED TRACK=ssh "TEXT=SSH 
> >logins"
> >       FILE /var/log/messages SIZE>0 MTIME<600 yellow
> 
> IMHO you have to use
> 
> HOST=%*.example.com

Watch out - regular expressions dont work like that. Asterisk means "0
or more of the previous character", so having an asterisk as the first
character of the regex is invalid.

If you *really* want it to match exactly any host in the "example.com" 
domain, you would have to use this:

  HOST=%^.+\.example\.com$


Regards,
Henrik




More information about the Xymon mailing list