Page 1 of 1
CCM and /usr/local/nagios/etc/hosts
Posted: Mon Sep 15, 2014 9:58 pm
by mmacpuguy
Using CCM I've now got a bunch of xxx.cfg files. It's a pain to create these one at a time via the CCM web interface so I tried to copy some and give them an edit. CCM deleted them after not adding them.
I'm missing something pretty important in this process.
Does CCM take these files and write them to someplace else?
What's a faster way to add 200 more hosts than one at a time via CCM?
Thanks!
Re: CCM and /usr/local/nagios/etc/hosts
Posted: Tue Sep 16, 2014 9:20 am
by slansing
Yes, as the config files say:
###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2014-05-23 13:54:59
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
You have to do it in the CCM, or import these follow the importing guidelines. There are a number of ways to add 200 hosts, you can run a wizard against one host, then use the "Bulk Host Cloning Wizard" to clone that host and it's services out to multiple new addresses. You can also click the copy button in the CCM on a host, and it will duplicate it's configuration, then you can re-name it, and change it's address in the CCM.
Re: CCM and /usr/local/nagios/etc/hosts
Posted: Mon Sep 29, 2014 2:44 pm
by mmacpuguy
The only bulk wizard I've been able to find is for the XI
http://exchange.nagios.org/directory/Ad ... rd/details
Is there one for Nagio Core?
Thanks!
Re: CCM and /usr/local/nagios/etc/hosts
Posted: Mon Sep 29, 2014 4:01 pm
by eloyd
What's a faster way to add 200 more hosts than one at a time via CCM?
CCM is Nagios XI, not Nagios Core, so you're in the wrong topic. But that's not my problem.
My suggestion is to write a script that creates a valid Nagios hosts.cfg file, and then you can dump that into /usr/local/nagios/etc/import on your XI host. The next time your reload config, it will be imported. Details are at
http://assets.nagios.com/downloads/nagi ... gement.pdf
Re: CCM and /usr/local/nagios/etc/hosts
Posted: Mon Sep 29, 2014 5:08 pm
by tmcdonald
To be clear, are you using something like the Student Core or Pro Core versions with the CCM?
And are you saying you made the changes by hand (or otherwise modified them) and then did an Apply Config which deleted the files? If so you will want to look into the import doc that eloyd posted.
Re: CCM and /usr/local/nagios/etc/hosts
Posted: Tue Sep 30, 2014 8:53 am
by mmacpuguy
eloyd wrote:
What's a faster way to add 200 more hosts than one at a time via CCM?
CCM is Nagios XI, not Nagios Core, so you're in the wrong topic. But that's not my problem.
My suggestion is to write a script that creates a valid Nagios hosts.cfg file, and then you can dump that into /usr/local/nagios/etc/import on your XI host. The next time your reload config, it will be imported. Details are at
http://assets.nagios.com/downloads/nagi ... gement.pdf
The topic I see at that top is General Support >> Nagios Core and Core Config Manager came with my install of Nagios Core - so I don't know where I need to be I guess.

Re: CCM and /usr/local/nagios/etc/hosts
Posted: Tue Sep 30, 2014 8:58 am
by eloyd
I forgot that CCM comes with the two intermediate levels, as tmcdonald wrote:
To be clear, are you using something like the Student Core or Pro Core versions with the CCM?
So to further help you, we'd need to know if you're running Student Core, Pro Core, or Nagios XI.
Re: CCM and /usr/local/nagios/etc/hosts
Posted: Tue Sep 30, 2014 9:59 am
by mmacpuguy
eloyd wrote:I forgot that CCM comes with the two intermediate levels, as tmcdonald wrote:
To be clear, are you using something like the Student Core or Pro Core versions with the CCM?
So to further help you, we'd need to know if you're running Student Core, Pro Core, or Nagios XI.
I'm using Pro Core. Thanks!
Re: CCM and /usr/local/nagios/etc/hosts
Posted: Tue Sep 30, 2014 11:00 am
by slansing
Yeah unfortunately there are no real "bulk" tools in the Core VM's, pro or student. You would have to stick to templating, or applying one service across multiple hosts, to get the same sort of effect (with a bit more limitation because any alteration done to said service would effect that service on all hosts it is attached to, which has downsides). Otherwise as was mentioned you can use an importation/static style method.