Unattended install of Nagios-DevOps

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Unattended install of Nagios-DevOps

Post by dfmco »

I am looking for a way to build a Nagios XI Server from scripts so that I can spin up a new instance with all installed components, configuration, users, custom time periods, etc. in one shot. I would like to do this to decrease the likelihood of errors and to streamline the process.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Unattended install of Nagios-DevOps

Post by mcapra »

Do you have current configuration automation tools you're using? (Chef, Ansible, Salt, etc) +1 for official playbooks/cookbooks/states because that'd be just so dang neat to have ;)

Initial setup shouldn't be much more complicated than spinning up a clean minimal CentOS/RHEL machine then running the fullinstall script included with Nagios XI.

Typically you can get the full set of all this stuff:
dfmco wrote:installed components, configuration, users, custom time periods, etc
By making a Nagios XI backup:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

So you'd essentially make a "clean" backup with all the bare minimum configuration elements. Then have your automation tools be responsible for pulling down that artifact and running restore_xi.sh against it.
Former Nagios employee
https://www.mcapra.com/
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unattended install of Nagios-DevOps

Post by tmcdonald »

Thanks for the assist, @mcapra!

I actually wrote a *very* basic Ansible script for installing the latest Nagios XI:

Code: Select all

---
- hosts: centos
  remote_user: root
  tasks:

  - name: Download latest XI source
    get_url:
      url: http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
      dest: "/tmp/xi-latest.tar.gz"
      force: yes
      validate_certs: no

  - name: Untar source tarball
    unarchive:
      src: "/tmp/xi-latest.tar.gz"
      dest: "/tmp/"
      copy: no

  - name: Run install
    shell: "./fullinstall -n"
    args:
      chdir: "/tmp/nagiosxi"
It's not something we can necessarily support/guarantee, but I have been using it in my testing workflow for weeks and it has been solid. Feel free to use it for the XI install portion - the rest is up to you, but Ansible has been my go-to for quite a while and I have had no complaints.
Former Nagios employee
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Re: Unattended install of Nagios-DevOps

Post by dfmco »

Thanks! I will be sure to post modifications of the scripts back here to help others.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unattended install of Nagios-DevOps

Post by scottwilkerson »

Thanks @dfmco!
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked