Page 1 of 1
Unattended install of Nagios-DevOps
Posted: Sat Feb 24, 2018 10:53 am
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.
Re: Unattended install of Nagios-DevOps
Posted: Mon Feb 26, 2018 9:41 am
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.
Re: Unattended install of Nagios-DevOps
Posted: Mon Feb 26, 2018 10:45 am
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.
Re: Unattended install of Nagios-DevOps
Posted: Tue Feb 27, 2018 1:43 am
by dfmco
Thanks! I will be sure to post modifications of the scripts back here to help others.
Re: Unattended install of Nagios-DevOps
Posted: Tue Feb 27, 2018 10:34 am
by scottwilkerson