Page 1 of 1
Possible to add host to hostgroup(s) at time of POST?
Posted: Thu Apr 13, 2017 2:28 pm
by MrWoodward
When POSTing a Host to NagiosXI, is it possible to specify which hostgroups to add the host to? Or does this need to happen later?
I see that it is possible to specify Contacts and ContactGroups...
Re: Possible to add host to hostgroup(s) at time of POST?
Posted: Thu Apr 13, 2017 2:38 pm
by dwhitfield
Are you having trouble with this? That's certainly the idea. See the quote below.
** All normal host directives are able to be used like normal core config definition files.
Re: Possible to add host to hostgroup(s) at time of POST?
Posted: Thu Apr 13, 2017 2:46 pm
by MrWoodward
Yeah, I saw that quote, but didn't know what it meant.
Is there a way to see a listing of all the optional parameters I can pass as well?
Thanks.
Re: Possible to add host to hostgroup(s) at time of POST?
Posted: Thu Apr 13, 2017 2:58 pm
by dwhitfield
https://assets.nagios.com/downloads/nag ... tions.html
Although I should ask, what version of XI are you running?
Re: Possible to add host to hostgroup(s) at time of POST?
Posted: Thu Apr 13, 2017 3:14 pm
by MrWoodward
We're on 5.4.0 for our Dev box.
Btw, thanks for that link. It's way more useful than the API Help menu on our NagiosXI box.
EDIT: Oh my, yes, this is very helpful... Thanks!
Re: Possible to add host to hostgroup(s) at time of POST?
Posted: Thu Apr 13, 2017 3:27 pm
by cdienger
Did you have any more questions or can this thread be closed?
Re: Possible to add host to hostgroup(s) at time of POST?
Posted: Fri Apr 14, 2017 9:32 am
by MrWoodward
I think this is good for now. Thanks.