-
Notifications
You must be signed in to change notification settings - Fork 74
Install Adagios from source using virtualenv
Garðar Þorsteinsson edited this page Oct 4, 2017
·
10 revisions
For now, Adagios on SELinux enabled machines does not work.
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
sudo yum install nagios
useradd -G nagios,wheel adagios
su - adagios
sudo yum install git python-pip python-virtualenv
virtualenv adagios-virt
source adagios-virt/bin/activate
pip install django==1.6
pip install simplejson
git clone git://github.com/pynag/pynag.git
cd pynag
pip install -e .
$ pynag list where object_type=service
object_type shortname filename
--------------------------------------------------------------------------------
service None /etc/nagios/objects/templates.cfg
service None /etc/nagios/objects/templates.cfg
service localhost/PING /etc/nagios/objects/localhost.cfg
----------x objects matches search condition-----------------------------------
cd
git clone git://github.com/opinkerfi/adagios.git
cd adagios
sudo cp -r adagios/etc/adagios /etc/adagios
sudo chown -R nagios:nagios /etc/adagios
sudo chmod g+w -R /etc/adagios
sudo mkdir -p /var/lib/adagios/userdata
sudo chown nagios:nagios /var/lib/adagios
sudo mkdir /etc/nagios/adagios
pip install -e .
sudo setfacl -R -m d:g:nagios:rwx /etc/nagios
sudo setfacl -R -m g:nagios:rwx /etc/nagios
sudo chown -R nagios:nagios /etc/nagios
sudo pynag config --set cfg_dir=/etc/nagios/adagios
# Nagios 3 with mk-livestatus module
pynag config --append "broker_module=/usr/lib64/mk-livestatus/livestatus.o /var/spool/nagios/cmd/livestatus"
# Nagios 4 with check-mk-livestatus
pynag config --append "broker_module=/usr/lib64/check_mk/livestatus.o /var/spool/nagios/cmd/livestatus"
cd /etc/nagios
git init
git add .
git commit -a -m "Initial commit"
sudo service httpd restart
sudo service nagios restart
cd ~/adagios/adagios
python manage.py runserver
or
python manage.py runserver host_ip_address:8000
[http://localhost:8000]