[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [nagios] killer config



On 07/07/2005, at 4:57 AM, Ted Cabeen wrote:
One thing that it took me a while to notice is that you can specify
multiple hostnames for each entry in your services.cfg file.  I have
some services with over 50 separate hostnames defined for them.
Combine that with the inheritance in services from the use directive,
and you should be able to keep your config pretty small.

Another way to make the config even smaller is to create hostgroups in the configs, then set the services on the hostgroups instead of on individual hosts. To do this you just use hostgroup_name instead of host_name in your service definitions. This also means less editing when you add new hosts, since you then just add hosts to the hostgroup.

For example, I have two host groups defined called mail_servers and web_servers. There are services defined for each of these hostgroups to check smtp/pop3/imap for mail_servers and http/https for web_servers. The cool thing here is that hosts may be in more than one hostgroup, so servers which run both mail and web are in both hostgroups.

Cheers
Corey



Reply to: