Bug or feature request: Multiple host_name in a service

Ethan Galstad nagios at nagios.org
Sat Feb 24 18:30:14 CET 2007


chiel wrote:
> Hello,
>  
> I want to have mutiple host_name lines in a service object. Just like 
> "members" in a hostgroup object, so I will get a better overview and not 
> al my hosts have to be on 1 line.
> Something like this:
>  
> define service{
>         use                                  local-service    
>         host_name                       localhost
>         host_name                       server1
>         host_name                       server2
>         host_name                       server3
>         service_description             PING
>         check_command              check_ping!100.0,20%!500.0,60%
>         }
>  
> This is no problem when the hosts have multiple services atached to 
> them, but you wil get an error when this is the only check for a host
> "Warning: Host 'server2' has no services associated with it!"
>  
> Maybe a bug?
>  
> Michiel
>  

This will accomplish what you're looking for:

define service{
	use			local-service
	host_name		localhost,server1,server2,server3
	service_description	PING
	check_command		check_ping!100.0,20%!500.0,60%
	}


Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV




More information about the Developers mailing list