Page 1 of 1

Clarification on automating resource managment in XI

Posted: Mon Oct 20, 2025 12:40 pm
by tylerr
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!

Re: Clarification on automating resource managment in XI

Posted: Mon Oct 20, 2025 3:23 pm
by DoubleDoubleA
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

Re: Clarification on automating resource managment in XI

Posted: Mon Oct 20, 2025 11:42 pm
by kg2857
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.

Re: Clarification on automating resource managment in XI

Posted: Wed Oct 22, 2025 5:38 pm
by tylerr
kg2857 wrote: Mon Oct 20, 2025 11:42 pm 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.
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

Posted: Thu Oct 23, 2025 5:21 pm
by kg2857
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.