Page 1 of 1

Best way to define "services"

Posted: Thu Mar 12, 2015 11:44 am
by lifelearner
Hi,

Which way would be the most efficient and common way?

1. Per service, add appropriate hosts: (For example, 10 hosts x 10 services = 100 services)
Apparently, this will result in a huge service list and appears not to be a desirable way but this is what we've been using on our Nagios Core server.

2. Per service, add appropriate hostgroups.
This seems to be the way to go.

3. Maybe, using servicegroups?


Thanks.


- Young

Re: Best way to define "services"

Posted: Thu Mar 12, 2015 11:50 am
by jdalrymple
You're on the right track for sure.

Using templates can significantly shorten your host and service definitions so that when you do create them they only need to be about 5 or 6 lines. You will define common settings such as check_interval, retry_interval, notification_options and such in a template the just apply the template to each host and service you create to save on the typing.

Using hostgroups will make it so you only need to define a service once then apply it to as many hosts as you like by just adding those hosts to the hostgroup. This scales to thousands of hosts and services easily.

You can use the servicegroups similarly, but usually it's more straightfoward and the logic follows better if you use the hostgroup construct.

Does this help answer your questions?