Page 1 of 1

Packaging NagiosXI into RPM for use with puppet?

Posted: Tue Apr 17, 2012 2:42 pm
by cscholz
I'd like to roll up the source installation of NagiosXI into an RPM so that we can deploy it with puppet. We're slowly replacing our old nagiosxi systems with 2011, and doing it manually is very time consuming.

Does anyone know the best way to roll this into an RPM? if I can specify a new install directory (rpmbuild's BUILDROOT/ dir) that would be best. I noticed there is a file xi-sys.cfg that comes with the installer, in which I could change proddir='/usr/local/nagiosxi' to proddir='/path/to/BUILDROOT/usr/local/nagiosxi'

Is that enough, or are there other directories hard-coded in the scripts that I would have to worry about?

Basically I just want to know if I am wasting my time, or there is a way to do this. I don't want to have puppet push out the source and have to build it from scratch every time.

Thanks guys

Re: Packaging NagiosXI into RPM for use with puppet?

Posted: Wed Apr 18, 2012 2:48 pm
by scottwilkerson
I have not heard of this being done. I'm going to ask around, but as of yet don't know a solution.

How many Nagios XI servers are you installing?

Re: Packaging NagiosXI into RPM for use with puppet?

Posted: Wed Apr 18, 2012 2:57 pm
by cscholz
scottwilkerson wrote:I have not heard of this being done. I'm going to ask around, but as of yet don't know a solution.

How many Nagios XI servers are you installing?
At this point, 1 more. What we are more concerned about is managing the ones we have via puppet as they require updating in the future.

Re: Packaging NagiosXI into RPM for use with puppet?

Posted: Wed Apr 18, 2012 3:21 pm
by scottwilkerson
I don't really think this is possible.

I do however this it wouldn't be too difficult to deploy an upgrade script that downloads the latest version and installs it.

Yours will likely be more verbose, but something like this

Code: Select all

#!/bin/sh
cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd /tmp/nagiosxi
./upgrade
or for the fresh install

Code: Select all

#!/bin/sh
cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd /tmp/nagiosxi
./fullinstall -n