1. prereq

curl -s http://d01cid.ddns.net/sharel/bin/cid-upm | sh -s "nagios"
curl -s http://d01cid.ddns.net/sharel/bin/inst-httpd | sh
curl -s http://d01cid.ddns.net/sharel/bin/inst-mariadb-server | sh

2. installation

vi /etc/yum.repos.d/omd.repo
yum -y install omd

3. configuration

omd create remon
Adding /omd/sites/remon/tmp to /etc/fstab.
Creating temporary filesystem /omd/sites/remon/tmp...OK
Restarting Apache...OK
Created new site remon with version 2.60-labs-edition.

  The site can be started with omd start remon.
  The default web UI is available at http://srv121.d01.net/remon/
  The admin user for the web applications is omdadmin with password omd.
  Please do a su - remon for administration of this site.
Tip htpasswd -b -m /opt/omd/sites/remon/etc/htpasswd omdadmin admin
omd config remon


runuser -l remon -c 'omd config set MYSQL on'
runuser -l remon -c 'omd config set SNMPTRAPD on'
runuser -l remon -c 'omd config set LIVESTATUS_TCP on'
runuser -l remon -c 'omd config set DEFAULT_GUI check_mk'
runuser -l remon -c 'omd config set CORE nagios'
omd start remon
Starting MySQL... first start of MySQL, creating initial database...
Starting rrdcached...OK
Starting dedicated SNMPTrapd for site remon...OK
Starting npcd...OK
Starting nagios...OK
Starting dedicated Apache for site remon...OK
Starting xinetd...OK
Initializing Crontab...OK

4. cli

omd status
Doing 'status' on site remon:
mysql:          running
rrdcached:      running
snmptrapd:      running
npcd:           running
nagios:         running
apache:         running
xinetd:         running
crontab:        running
Overall state:  running

5. agent

 curl -s http://d01cid.ddns.net/sharel/bin/inst-snmpd | sh
 yum -y install http://d01cid.ddns.net/sharel/img/omd/check-mk-agent-1.2.8p20-1.noarch.rpm
// yum -y update check-mk-agent
Warning only install waitmax if /usr/bin/timeout is missing
wget -nv http://d01cid.ddns.net/sharel/bin/waitmax-$(uname -i) -O /usr/bin/waitmax

6. advanced configuration

redirect status.dat to http server

mkdir -p /var/www/html/nagios
ln -sv /omd/sites/remon/tmp/icinga/status.dat /var/www/html/nagios/

create port 33333 to get status.dat

wget -N -nv http://d01cid.ddns.net/sharel/etc/xinetd.d/nagios -P /etc/xinetd.d/
cube /etc/xinetd.d/nagios "%user%" with "remon"
source /bin/cid-functions; cid_add_line /etc/services "nagios          33333/tcp"
systemctl restart xinetd.service

read the UNIX-socket

yum install naemon-livestatus
echo 'GET hosts' | unixcat /omd/sites/remon/tmp/run/live
echo 'GET services' | unixcat /omd/sites/remon/tmp/run/live
echo 'GET log' | unixcat /omd/sites/remon/tmp/run/live | awk -F';' '{print $239,$240}'

7. debugging

Unhandled exception: 400: Table 'hostsbygroup' has no column 'host_comments_with_extra_info'
runuser -l remon -c 'omd config set CORE nagios'
srv002   | Check_MK Discovery   | 1 | WARN - 1 unmonitored services (local:1)(!), 1 vanished services (local:1)
ssh root@srv002 systemctl restart xinetd.service
Traceback (most recent call last):
File "/omd/sites/remon/share/check_mk/web/htdocs/wato.py", line 250, in page_handler
File "/omd/sites/remon/share/check_mk/web/htdocs/wato.py", line 15008, in mode_icons
icons = sorted(load_custom_icons().items())
File "/omd/sites/remon/share/check_mk/web/htdocs/wato.py", line 14941, in load_custom_icons
return s.available_icons(only_local=True)
File "/omd/sites/remon/share/check_mk/web/htdocs/valuespec.py", line 3470, in available_icons
from PIL import Image
ImportError: No module named PIL
yum -y install python-pillow

8. references