Page 1 of 1

Nagios XI fully automated installation

Posted: Tue Mar 05, 2019 8:15 am
by hbouma
We have been tasked with getting a fully automated installation of Nagios XI completed so that it can be rebuilt every 30 days on a Red Hat VM. By this I mean we would need to:

Install the Nagios XI software including rrdcached, snmptraps, ramdisk.
Configure and harden the XI install.
Point the Nagios XI instance to an external DB
Configure the nagiosadmin account password, creating a user and changing the API key of the created user and the nagiosadmin user.

Most of this I can script out myself, but I am seeing some issues with changing the API keys as well as the final setup of Nagios XI. I am hoping that someone may have some suggestions on how to complete the final setup of Nagios XI (specifically anything starting on page 4 of these instructions https://assets.nagios.com/downloads/nag ... -Linux.pdf)

Re: Nagios XI fully automated installation

Posted: Tue Mar 05, 2019 4:33 pm
by npolovenko
Hello, @hbouma. Have you thought about creating a snapshot of the VM with installed XI and just reverting to that snapshot every 30 days? This seems like the easiest solution.
But here is another suggestion. In the past, I used to work with test cafe scripts. These are javascript based scripts that can be preprogrammed to open web pages and interact with its elements, click on certain links in order and wait for the feedback. I made a few scripts that can automatically go through the initial XI set up process, create users and so on. This could be a way to achieve what you're looking for in automated fashion without hacking into php code.

Re: Nagios XI fully automated installation

Posted: Tue Mar 05, 2019 4:52 pm
by hbouma
Snapshota or JavaScript will not work. The idea we were given was that the build would be on a fresh copy of the OS fully updated instead of patching. Wlthe other part of the requirement is that we would need to have this completely scripted for no gui interaction, so the JavaScript is out unfortunately.

Personally, I do not think the installer is capable of this and am trying to justify that they just need to patch the server as opposed to rebuilding them. I was asked for an official recommendation on if the fully scripted install is possible from a command line on a server with no gui access.

Re: Nagios XI fully automated installation

Posted: Tue Mar 05, 2019 5:42 pm
by npolovenko
@hbouma, I talked to devs whether it's possible to set up a new install of Nagios XI from the command line and I was told that not at this point but that is something we have in plans for the future. XI 6 is scheduled for Q1 of 2020.
https://www.nagios.com/roadmaps/
For now, seems like you'd need to do in-place upgrades. Ideally, you'd take a snapshot of the VM before each update rollup. That way you could always revert if something goes unexpected.