-
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 2, 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/adagios
sudo cp -r 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
# Add config directory to /etc/nagios/nagios.cfg
sudo chown -R nagios:nagios /etc/nagios
sudo pynag config --set cfg_dir=/etc/nagios/adagios
# Add broker module for mk-livestatus if not already configured
sudo pynag config --append "broker_module=/usr/lib64/mk-livestatus/livestatus.o /var/spool/nagios/cmd/livestatus"
pip install -e .
sudo setfacl -R -m d:g:nagios:rwx /etc/nagios
sudo setfacl -R -m g:nagios:rwx /etc/nagios
cd /etc/nagios
git init
git add .
git commit -a -m "Initial commit"
service httpd restart
service nagios restart
cd ~/adagios/adagios
python manage.py runserver
or
python manage.py runserver host_ip_address:8000
[http://localhost:8000]