Re: [Nagios-users] Hostnames and regex

2009-04-09 Thread Niall O Broin
On 9 Apr 2009, at 13:14, Marc Powell wrote:

>
> On Apr 8, 2009, at 6:05 PM, Niall O Broin wrote:
>
>
>> 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?
>
> Yes, I expect the following will work. 
> http://nagios.sourceforge.net/docs/3_0/objecttricks.html#service

Sounds perfect Marc - but yet with this in the config

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

I get this error

Reading configuration data...

Error: Could not find any host matching '!host17' (config file '/etc/ 
nagios3/conf.d/MM-snmp-checks.cfg', starting on line 43)
Error: Could not expand hostgroups and/or hosts specified in service  
(config file '/etc/nagios3/conf.d/MM-snmp-checks.cfg', starting on  
line 43)

Any more ideas?





Kindest regards,



Niall  O Broin



--
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@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


Re: [Nagios-users] Hostnames and regex

2009-04-09 Thread Marc Powell

On Apr 8, 2009, at 6:05 PM, Niall O Broin wrote:


> 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?

Yes, I expect the following will work. 
http://nagios.sourceforge.net/docs/3_0/objecttricks.html#service 
  --

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

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

--
Marc


--
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@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


[Nagios-users] Hostnames and regex

2009-04-08 Thread Niall O Broin
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@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