Version 1 (modified by jonmills, 8 years ago)

--

All paths relative to $OMD_ROOT:

~/local/bin

(place eventhandler scripts here)

~/etc/check_mk/main.mk

(see OMDconfiguration)

~/etc/check_mk/conf.d/*

(see OMDconfiguration)

~/etc/check_mk/multisite.mk

(edit starturl)

# URL to show as welcome page (in the 'main' frame).
# You can use relative URL or absolute URLs like 'http://server/url'
# Default is 'main.py'
start_url = 'view.py?view_name=hostsbygroup'

~/etc/nagios/conf.d/commands.cfg

(add email commands to top of file)

# 'notify-host-by-email' command definition
define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
        }

# 'notify-service-by-email' command definition
define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }

~/etc/apache/conf.d/omd.conf

(edit redirect at top)

#RedirectMatch ^/nagios$  /nagios/omd/
#RedirectMatch ^/nagios/$ /nagios/omd/
RedirectMatch ^/nagios$  /nagios/check_mk/
RedirectMatch ^/nagios/$ /nagios/check_mk/

~/etc/apache/conf.d/auth.conf

(custom edit, e.g. to provide LDAP auth)

~/share/check_mk/checks/qemu

Add this check so that you can use Check_MK to inventory the VMs hosted by the KVM hypervisor.

~/.euca/eucarc

(so omd user can run euca commands)

~/.profile

(source eucarc file using absolute path to file)

~/tmp

*Fix Group-Write Permissions

cd ~/tmp
chmod -R g+w .

* The 'apache' user is a member of the group with same name as $OMD_SITE. If you don't do this, then the webserver can't write to $OMD_ROOT/tmp, meaning that many, many things will break -- including the ability to create a PHP session -- meaning the whole site fails to work.