Assign services to hosts, instead of hosts to services

Christoph Maser cmr at financial.com
Wed Jun 4 09:47:18 CEST 2008


Tom

i think this is the wrong list. (Real answer below)

Am Mittwoch, den 04.06.2008, 09:26 +0200 schrieb Tom Sommer:
> Hi,
>
> I have a growing pain with Nagios that I thought I might share with you.
>
> I have a lot (!) of servers, and while some of them are generic and thus
> grouped, I also have a lot of servers to which I need set up custom
> monitoring per host.
>
> This means, correct me if I am wrong, I need to go to each service I want
> to apply to a host, and enter it into the "host_name" variable.

I think you are wrong. You can make a group per service. You can assign
the group to the host in the host definition. Define the service on the
group et voila problem solved.

example

define service{
        service_description             MYSERVICE
        use                             some-defaults
        hostgroup_name                  group-myservice
        check_command                   somecheck
}

define group{
        hostgroup_name                  group-mysqervice
        alias                           All hosts running MYSERVICE
}

define host[
        use                             some-host-defaults
        name                            MYHOST
        hostgroups                      +group-myservice

}




Chris


financial.com AG

Munich head office/Hauptsitz München: Maria-Probst-Str. 19 | 80939 München | Germany
Frankfurt branch office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327 Frankfurt | Germany
Management board/Vorstand: Dr. Steffen Boehnert (CEO/Vorsitzender) | Dr. Alexis Eisenhofer | Dr. Yann Samson | Matthias Wiederwach
Supervisory board/Aufsichtsrat: Dr. Dr. Ernst zur Linden (chairman/Vorsitzender)
Register court/Handelsregister: Munich – HRB 128 972 | Sales tax ID number/St.Nr.: DE205 370 553

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list