Regex problem



I’m hoping someone can help me here. I’m trying to define a service that will should be available on all machines. Here’s my service definition:

define service{ use pnp-service host_name * service_description PING check_command check_ping!100.0,20%!500.0,60% }

When I run a verify against the nagios.cfg file it spits out an error:

[code]Reading configuration data…

Error: Could not expand hostgroups and/or hosts specified in service (config file ‘/usr/local/nagios/etc/objects/linux-services.cfg’, starting on line 10)[/code]

If I comment out the above service difinition everything checks out ok. According to the Nagios Time-Saving Tricks for Object Definitions page, this should work just fine.

We are using verion 3.0.3 and I have use_regexp_matching turned on. Any thoughts?

P.S. Using an expression like p* works just fine but that only grabs machines whose host name starts with “p”.


Nevermind, I figured it out.

I had to use [a-zA-Z]* for the host name to get it to work. I would have assumed * would work though.