Adding hosts via cli.
Adding hosts via cli.
How can I add a host and assign it to a hostgroup via the CLI?
Re: Adding hosts via cli.
You can use the static directory as explained in our documentation:
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
Note that the host will not appear in the CCM when done this way.
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
Note that the host will not appear in the CCM when done this way.
Former Nagios employee
Re: Adding hosts via cli.
So in there you have just .cfg files? In each of which, is ll your hosts and what not?
Also doesn't show in the CCM, hmm that is an issue. I thought I could use command.php with some options to inject what I wanted?
Also doesn't show in the CCM, hmm that is an issue. I thought I could use command.php with some options to inject what I wanted?
Re: Adding hosts via cli.
Why are you trying to add via the CLI instead of the Core Config Manager in the GUI? If you're trying to 'import' some old config files into XI, there's a document for that: http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
The config files should follow the same format as Nagios Core config files: http://nagios.sourceforge.net/docs/3_0/ ... tions.html
The config files should follow the same format as Nagios Core config files: http://nagios.sourceforge.net/docs/3_0/ ... tions.html
Re: Adding hosts via cli.
I am putting together a POC for what we need to do, prior to getting purchase approval, part of that will be adding in 1000+ hosts and being able to manage them via a puppet module. Mostly, I don't want to add 1000+ hosts in a gui and don't want to use an auto discovery plugin that'll do it in a mess.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Adding hosts via cli.
There is a substantial amount of documentation on the Internet about creating Nagios configs with Puppet. You then just dump the config into the import directory and call the Nagios reconfigure script.
Check this out:
https://groups.google.com/forum/#!msg/p ... lLForAhKwJ
Check this out:
https://groups.google.com/forum/#!msg/p ... lLForAhKwJ
Re: Adding hosts via cli.
In addition to jdalrymples doc, please note that we have an official doc for this as well: http://assets.nagios.com/downloads/nagi ... gement.pdf