Hi
i am trying to figure out how to add *easily* new hosts (and services) in nagios.
In fact adding hosts, then adding new services for this host is really a long process.
i have seen that in service definition, we have "manage hosts" button. here, defining only one service i can use that service for many hosts i want. is there any ups and downs for this use case?
I have also noticed that using host groups even better. because for every host added to this host group, service is automatically defined and activated.
One question here.. in service definition documentation, i always see that config name is an IP address (mostly the host for which service is defined). if i want to use one service and one or more hostgroup method, what should i put in the config name?
i really appreciate a way for easily adding hosts and services.
i also use bulk import. but later it is very difficult to manage..
TIA..
one service and many manage hosts entries
-
erkanerturk
- Posts: 53
- Joined: Wed Jan 16, 2019 4:35 am
-
erkanerturk
- Posts: 53
- Joined: Wed Jan 16, 2019 4:35 am
Re: one service and many manage hosts entries
My previous post may not be clear. here is, a clarification attempt.
i want to find a way to *easily* add host & services to my nagios server. i have seen 3 ways
1- bulk import tool: i create one server and using bulk import tool, i can create many of them. In this case, every host will have special service checks belongs to it. so after create, it will be difficult to manage service/host confguration because each of them will be independent of each other. bulk modification tool may be used here too.
2- templates
3- for service configuraion part, we may use "manage hosts" or "manage host groups" configurations. In that case we can relate a service with hosts/hostgroups. if we use hostgroups, member hosts wil automatically be added to service. i appreciated this one most.
My questions:
which method should i choose. what are the advanteges/disadvanteges of each method.
if i use manage hostgroups, what should be the name of the service config name? i see that nagios prefers host IP address as service config name. but if that host/IP deleted in a way, all the hosts will be disconnected from that service? how should i select the service config name
any other recommendations/warnings?
TIA
i want to find a way to *easily* add host & services to my nagios server. i have seen 3 ways
1- bulk import tool: i create one server and using bulk import tool, i can create many of them. In this case, every host will have special service checks belongs to it. so after create, it will be difficult to manage service/host confguration because each of them will be independent of each other. bulk modification tool may be used here too.
2- templates
3- for service configuraion part, we may use "manage hosts" or "manage host groups" configurations. In that case we can relate a service with hosts/hostgroups. if we use hostgroups, member hosts wil automatically be added to service. i appreciated this one most.
My questions:
which method should i choose. what are the advanteges/disadvanteges of each method.
if i use manage hostgroups, what should be the name of the service config name? i see that nagios prefers host IP address as service config name. but if that host/IP deleted in a way, all the hosts will be disconnected from that service? how should i select the service config name
any other recommendations/warnings?
TIA
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: one service and many manage hosts entries
Hi @erkanerturk,
It looks like you have a pretty good handle on this topic. If you're setting up a system from scratch, you might deploy a combination of the Bulk Cloning and Import Tool and long with using the add a service to a host or hostgroup trick to help with setup and administration.
You're correct, for any services deployed using the cloning option, then you'll want to use the Bulk Mods Tool to make changes across large numbers of hosts or services. However, this is really easy to use.
For adding services to a host or hostgroup, it's a good idea to use a very organized logical structure for the hostgroups and name your services accordingly to avoid any confusion with inheritance.
Another option, if you're comfortable with bash or python scripting, is to use the API to make changes across groups of hosts or services. The API is fully documented at Help > API Docs. Please note, not everything is available in the API as is the CCM.
In Nagios, a host must have an IP address, and service must be associated with a host. For a service, it's not necessary to use the ip address for the config name.
Here's a few good videos on this topic
Master assigning service checks by hostgroup - Pro Tip
Nagios XI - Hostgroup Inheritance
It looks like you have a pretty good handle on this topic. If you're setting up a system from scratch, you might deploy a combination of the Bulk Cloning and Import Tool and long with using the add a service to a host or hostgroup trick to help with setup and administration.
You're correct, for any services deployed using the cloning option, then you'll want to use the Bulk Mods Tool to make changes across large numbers of hosts or services. However, this is really easy to use.
For adding services to a host or hostgroup, it's a good idea to use a very organized logical structure for the hostgroups and name your services accordingly to avoid any confusion with inheritance.
Another option, if you're comfortable with bash or python scripting, is to use the API to make changes across groups of hosts or services. The API is fully documented at Help > API Docs. Please note, not everything is available in the API as is the CCM.
In Nagios, a host must have an IP address, and service must be associated with a host. For a service, it's not necessary to use the ip address for the config name.
Here's a few good videos on this topic
Master assigning service checks by hostgroup - Pro Tip
Nagios XI - Hostgroup Inheritance
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
erkanerturk
- Posts: 53
- Joined: Wed Jan 16, 2019 4:35 am
Re: one service and many manage hosts entries
thanks..
it was usefull..
it was usefull..
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: one service and many manage hosts entries
Hi,
We'll go ahead close this topic, but feel free to open a new one if you have any new questions.
Regards,
Benjamin
Great! Glad that helped.thanks..
it was usefull.
We'll go ahead close this topic, but feel free to open a new one if you have any new questions.
Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!