Hostnames and regex

Niall O Broin niall at makalumedia.com
Thu Apr 9 01:05:35 CEST 2009


I recently changed a Nagios configuration to use a regex with  
hostnames but it hasn't been entirely satisfactory. I have e.g.

define service{
         use generic-service
         host_name host*
         service_description Total Processes
         check_command snmp_procs!120!150

but for some hosts, I need to use different thresholds. I tried to use

define service{
         use generic-service
         host_name hostNN
         service_description Total Processes
         check_command snmp_procs!200!250

but hostNN still alerts based on the host* thresholds. I tried placing  
the definition for host NN before AND after the host* definition - it  
made no difference. From what I read of Nagios regex, they're not full  
regex so it wouldn't be possible to write one which matched host* but  
didn't match hostNN.

Is there a way of doing what I want, apart from the obvious one of  
renaming the hosts which I don't want to match the regex?


__
Kindest regards,


Niall  O Broin
MakaluMedia Group | http://makalumedia.com


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list