-
Notifications
You must be signed in to change notification settings - Fork 74
Installing Adagios from source on Debian
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"
pynag config --append cfg_dir=/etc/adagios
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
The okconfig plugin, which is required if you want to use adagios' REST API is installed as follows:
git clone git://github.com/opinkerfi/okconfig.git
cd okconfig
sudo pip install -r requirements.txt
sudo python setup.py install
Once installed restart Apache in order to load all the new modules:
service apache2 restart
Open your browser and go to http://127.0.0.1/adagios
, you should see a new item named "Okconfig" in the top toolbar.