Introduction
This page describes how Alexis Huxley installed and configured a Check_MK server. It is mostly take from the official documentation.
Installing the Check_MK server
- Visit this site and determine the link to the server software.
- Download it to the server. E.g. with:
wget https://mathias-kettner.de/support/1.4.0p24/check-mk-raw-1.4.0p24_0.xenial_amd64.deb
- Install that package and then correct any dependency errors:
dpkg -i *.deb apt-get install -f
- Decide upon a monitoring site name (e.g. ‘default’).
- Create the site. E.g. with:
omd create default
- Make the monitoring site’s web interface accessible on all interfaces:
- Start the monitoring site:
-
Start ... omd start default
- Note that the above commands modify /etc/fstab (this has implications for PCMS-based installs).
Proxying connections to the monitoring site
- Note the port number specified in /omd/sites/default/etc/apache/listen-port.conf
- Add the following stanza to the front-end web server:
<Location /default/> RewriteEngine On RewriteRule ^/.+/default/(.*) http://<check_MK-server-name>/default/$1 [P] </Location>
(I did not manage to get this working using ProxyPass or going to a URI like /check_mk/default/.)
- Reload the front-end web server configuration.
Adding users
- Log in to the web interfaces as cmkadmin, go to WATO (lower left area of screen), go to Users.
- Follow the prompts.
Adding hosts – server side
- In a terminal, generate a list of hosts, one per line (e.g. with Rocon). Copy this list with the mouse.
- Log in to the web interfaces as cmkadmin, go to WATO, go to Hosts, go to Bulk Import.
- From the pulldown menu select ‘Content of CSV File’, paste in the hostnames, select ‘Perform automatic service discovery’, click ‘Upload’.
- At the ‘Bulk host import’ page, in the preview area, select ‘Hostname’ from the pulldown menu and click ‘Import’
- What comes after this is not documented because I did it too quickly.
Adding hosts – client side
- Install check-mk-agent (links are provided at WATO–>Monitoring Agents–>Packaged Agents).
- Install xinetd.
Adding the auto-discovered services on hosts
Services get detectected automatically. You only need to decide if they should be monitored or not. This applies not only when adding hosts, but also later. As such there really is not a procedure for adding auto-discovered services on the hosts you have added.
Adding services: web services
- Define a host that is the public name of the host providing the webservices, but be sure to disable the use of the check_MK agent.
- For simple cases: add rules (WATO–>Hosts and Service Parameters–>Active Checks–>Check http service–>Create rule in folder), setting explicit hosts on which the check should executed.
- For more complex cases: create a check script in /opt/omd/sites/<site-instance>/local/lib/nagios/plugins/ and add a rule (WATO–>Hosts and Service Parameters–>Active Checks–>Classical checks and passive Monitoring checks–>Create rule in folder), setting explicit hosts on which the check should executed.
Changing thresholds of builtin checks on a per-host basis
- Go to WATO–>Hosts and Service Parameters–>Parameters for discovered services.
- Locate the service the parameters of which you wish to change and click it. (This is not straightforward as the names used in alerts do not correspond with the names listed here and I do not see how to map from one to the other.)
- Add the new thresholds. Note that any check for which you do not explicitly set a threshold or explicitly ignored the check will continue to work as before. For example, for two systems with SSDs, I stop monitoring committed memory and raise the warning and critical thresholds for total virtual memory used:
Monitoring Windows XP
Not written yet.
Outstanding issues and workarounds
- If the system is rebooted then check_MK shows a blank page. Get it working again by running:
omd stop default omd start default
(I suspect some service dependency ordering problem here.)