Hello!
Looking for some clarification on options for automating the management (CRUD) of resources in NXI.
I know about this doc - https://assets.nagios.com/downloads/nag ... I-2024.pdf and am familiar with the options there. Basically use the REST API or utilize built-in scripts + import directory when appropriate.
However I stumbled upon this page https://library.nagios.com/documentatio ... ion-guide/ , which suggests you can just edit the resource file directly (the example on this page is using Ansible, which is my tool of choice and why I stumbled upon this). This seems to be in conflict with what the Automated-Host-Management doc in the first link suggests. I am curious if this is an error. It would seem like that is a fine methodology for Nagios Core, but the page is about XI and the example Ansible code references XI as well.
Thank you!
Clarification on automating resource managment in XI
-
DoubleDoubleA
- Posts: 286
- Joined: Thu Feb 09, 2017 5:07 pm
Re: Clarification on automating resource managment in XI
Hi @tylerr,
Thank you for pointing out that the library article is not correct. We'll get to work correcting that.
In the mean time, many of us here at Nagios are big Ansible fans as well. You might check out some XI-related Ansible work we share on GitHub https://github.com/NagiosEnterprises/au ... /nagios_xi .
Aaron
Thank you for pointing out that the library article is not correct. We'll get to work correcting that.
In the mean time, many of us here at Nagios are big Ansible fans as well. You might check out some XI-related Ansible work we share on GitHub https://github.com/NagiosEnterprises/au ... /nagios_xi .
Aaron
Re: Clarification on automating resource managment in XI
To the OP, the 2nd link fails so I couldn't see what it says. I'm curious about what you're trying to do.
Using ansible is great but once a host is set up its of limited use other than to install/update plugins or add commands.
Using ansible is great but once a host is set up its of limited use other than to install/update plugins or add commands.
Re: Clarification on automating resource managment in XI
I think they already took the page at that second link down, since the information on it was incorrect
My initial goal is to manage my XI host/hostgroup/service/servicegroup config through some sort of IaC tooling (preferably Ansible). It would probably be more straightforward with Core, at least as far as doing it through Ansible is concerned, but my team prefers using XI from an interface perspective.
Re: Clarification on automating resource managment in XI
I think you just restated what you already said. One question is why automate something that's relatively static once set up? Also, ansible, etc. are good for setting up many hosts. Nagios doesn't manage the remote hosts.
If you want to automate the nagios hosts/services, etc. you can drop files in the import dir and run the reconfig script.
If you want to automate the nagios hosts/services, etc. you can drop files in the import dir and run the reconfig script.