Wildcards in services

hi!

can i use partial wildcards on hostnames in services.cfg?

i can read in nagios.sourceforge.net/docs/2_0/ … ricks.html that i can use a wildcard to match all hosts with this configuration:

define service{
	host_name		*
	service_description	SOMESERVICE
	other service directives ...
	}

but i want something like:

define service{
	host_name		switch_floor2*
	service_description	SOMESERVICE
	other service directives ...
	}

so it matches all switches with same prefix (switch_floor2_1, swithc_floor2_2, etc)

is this possible?

thx

According to the doc you pointed to, yes you can do that. I’ve never done it, so let us know if you can make it work.