Setting up OMD to get a working Nagios server is really simple, but what makes this monitoring setup really awesome is how easy Check___MK makes finding, configuring and running these checks. Setup the agent on your nodes, or just monitor SNMP/ping data, then tell Nagios/Check_MK which hosts to monitor and it will inventory and monitor all available checks it can find.

This should create a check-mk-agent config file for xinetd at /etc/xinetd.d/check-mk-agent. We can edit one option for security, I haven’t tried running this as a regular user instead of root, but I should look into that. Uncomment the following line and specify your Nagios servers IP or hostname.

Restart xinetd and set to start on boot.

Last step for the agent is opening port 6556 on your nodes at the firewall with iptables. I would also recommend limiting this port to your Nagios servers IP as the only source IP to hit port 6556 with -s. That should complete the agent setup, xinetd should be listening on 6556 for our Nagios servers connections and iptables should be allowing traffic on port 6556 from our Nagios servers IP only.

10.208.165.85 node1 162.242.244.184 db.server 10.0.0.1 pfSense su to your sites user to manage it.

Specify which hosts to check in the main.mk file.

If everything is working correctly we should now inventory the checks and it will find all available checks Check___MK can monitor. Note with my pfSense check I specify SNMP, pfSense has SNMP checks available and Check_MK can find those automatically. Following output was from only adding node1 to my main.mk file.

Now restart Nagios so we can see these checks/host in our GUIs.

You can add plugins to Check___MK to monitor additional services such as MySQL. Here’s a list of available plugins and check catalogue. Notifications are easy to setup, more info here. Some notes for integrating with OMD, and all other Check_MK documentation can he found here.

I still haven’t looked into a HA type setup for Nagios/OMD, if your Nagios server goes down then monitoring is down. SaltStack makes setting up the agent on new servers very simlple. Also need to look into automating this even further with SaltStack and possibly having Check_MK find, inventory and reload the config as new servers are built.