Skip to content

Installing Adagios from source on Debian

andresriancho edited this page May 23, 2013 · 37 revisions

Install nagios3 and mk-livestatus if you don't already have it:

apt-get install nagios3 check-mk-livestatus

Install Dependencies:

apt-get install git apache2 libapache2-mod-wsgi python-django

Install pynag

apt-get install python-pip
pip install pynag

Get latest bleeding-edge source from github:

cd /opt/
git clone https://github.com/opinkerfi/adagios.git

Create a configuration directory for adagios and edit paths:

cp -r /opt/adagios/adagios/etc/adagios /etc/
chown -R nagios /etc/adagios/
cd /etc/adagios
sed -i 's|/etc/nagios/nagios.cfg|/etc/nagios3/nagios.cfg|;' adagios.conf
sed -i 's|sudo /etc/init.d/nagios|sudo /etc/init.d/nagios3|;' adagios.conf
sed -i 's|nagios_url = "/nagios"|nagios_url = "/nagios3"|;' adagios.conf

Enable mk-livestatus broker_module and restart nagios to load new configuration:

pynag config --append "broker_module=/usr/lib/check_mk/livestatus.o /var/lib/nagios3/rw/livestatus"
service nagios3 reload

Configure Apache to load Adagios in wsgi:

cat << EOF > /etc/apache2/conf.d/adagios.conf
WSGISocketPrefix /var/run/apache2/wsgi
WSGIDaemonProcess adagios user=nagios group=nagios processes=1 threads=25 python-path=/opt/adagios:/opt/adagios/adagios
WSGIProcessGroup adagios
WSGIScriptAlias /adagios /opt/adagios/adagios/apache/adagios.wsgi

Alias /adagios/media /opt/adagios/adagios/media

<Location /adagios>
   AuthName "Adagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios3/htpasswd.users
   Require valid-user
</Location>
EOF

Create your user, replace adagios with your username and securepassword with a randomly generated, secure password:

cd /etc/nagios3
htpasswd -b -c htpasswd.users adagios securepassword

Restart Apache:

service apache2 restart

Open your browser and go to http://127.0.0.1/adagios