Hi, Support Team:
We have 300+ Linux hosts to import into Nagios XI, all with the same services to be monitored. I read with interest the earlier "Bulk Add Hosts" post as well as the "Automated Host Management in Nagios XI" white paper. It appears to me that the most direct and safest way to create these 300 monitors is to:
1. create a single *.cfg file that defines a host and the services for that host
2. place the *.cfg file into /usr/local/nagios/etc/import
3. ensure that it passes the reconfigure verification
4. if so, then clone that file 300+ times by simply altering the hostname and IP address
5. import all at once with the reconfigure_nagios.sh script.
Could you please confirm or offer an alternative approach?
Thanks,
Bill Yoder, Clinipace Worldwide
Importing 300 Linux hosts
Re: Importing 300 Linux hosts
Hey Wyoder,
This seems like an excellent approach. You could also make one host manually and then use the bulk host cloning wizard. (I've been using it for a long time and it works excellent) If I can give you one more advice, try to make use of service templates for the linked services.
Grtz
WIllem
This seems like an excellent approach. You could also make one host manually and then use the bulk host cloning wizard. (I've been using it for a long time and it works excellent) If I can give you one more advice, try to make use of service templates for the linked services.
Grtz
WIllem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Importing 300 Linux hosts
Don't forget hostgroups! Not strictly related to your issue, but with a hostgroup you can have a set of, say, 8 services, and instead of manually attaching them to each host you add, you attach them to a hostgroup. Then when you create a new host that needs those services, you add it to the hostgroup and it picks up the services automatically.
Former Nagios employee
Re: Importing 300 Linux hosts
Post #1 is how I did this. My host definitions have little in them that isn't required.
I have boilerplate host and search and replace values, write files in import and run reconfigure. I can change monitoring by adding the host to hostgroups, and modifying the template.
define host {
host_name hostname
use default_host
alias alias
display_name display_name
address 10.136.243.208
register 1
}
I use templates and hostgroups to keep info out of the host definitions.
I'm not certain this is a good way, but its what I did.
I have boilerplate host and search and replace values, write files in import and run reconfigure. I can change monitoring by adding the host to hostgroups, and modifying the template.
define host {
host_name hostname
use default_host
alias alias
display_name display_name
address 10.136.243.208
register 1
}
I use templates and hostgroups to keep info out of the host definitions.
I'm not certain this is a good way, but its what I did.
Re: Importing 300 Linux hosts
This seems like a good way to import these hosts. Do you have any issues/concerns at the moment? Is it safe to mark this thread as resolved?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Importing 300 Linux hosts
In the space of a few hours, I've heard a passel of good ideas from various folks on this topic. Could you therefore leave this case open for a few more days as a way to collect other helpful advice? Close by Friday afternoon should be fine.
Thanks!
--Bill
Thanks!
--Bill
Re: Importing 300 Linux hosts
No problem, Bill. We will keep this topic open.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Importing 300 Linux hosts
It's Friday afternoon, so feel free to close this discussion. I may have additional questions, (like, is there easy-to-understand documentation on how to create service templates?), but I've got enough to go on from this thread to make some progress.
Thanks for everybody's help!
--Bill
Thanks for everybody's help!
--Bill
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Importing 300 Linux hosts
What specifically are you wondering? There is only one way to create a service template....wyoder wrote:like, is there easy-to-understand documentation on how to create service templates?
Code: Select all
register 0Re: Importing 300 Linux hosts
Thank you for your response regarding service templates. "Experience is a great teacher" plus your response have worked well together.
Please close/lock this post at your convenience.
--Bill Yoder
Please close/lock this post at your convenience.
--Bill Yoder