Checking a service on all hosts _except_...
Andreas Ericsson
ae at op5.se
Tue Oct 18 08:57:20 CEST 2005
Ian Marlier wrote:
> Hey, all --
>
> This is one of those questions that I'm sure many people have asked before,
> but I haven't been able to find the answer if/when it was given...so sorry
> if I'm making someone repeat him/herself....
>
> Anyway.
>
> I've got an environment with about 65 linux servers, and about 5 windows
> servers. There's a base set of 6 or 7 services that I want to monitor on
> all of them: connectivity, ssh, cron, and a couple of others.
>
> I'm wondering whether it's possible to define a hostgroup (say,
> "windows-servers") with the non-linux boxes listed, and then define a
> service check for all hosts except those.
>
> Something like:
>
> define service {
> name SSH
> host_name *
> except_hostgroup windows-servers
> check_command check_ssh
> .
> .
> .
> }
>
> So, anyone have any thoughts? C'mon, make my life better ;-)
>
define service {
service_description SSH
host_name *
hostgroup_name !windows-servers
check_command check_ssh
}
I think that should work. If it doesn't you can always do it the other
way around and create a hostgroup with everything but the
windows-servers in them.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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