We use cookies to ensure that we give you the best experience on our website.  Visit our Privacy Policy to learn more. If you continue to use this site, we will assume that you are okay with it.

Your choices regarding cookies on this site.
Your preferences have been updated.
In order for the changes to take effect completely please clear your browser cookies and cache. Then reload the page.

Monitoring FreeBSD

Checkmk Manual

Search in the manual

This is the old documentation.
You can find the shiny new documentation here, which is replacing over time this one.
Thus, this article is obsolete and may be not valid anymore - however, the new one is not finished yet!

1. The FreeBSD Agent

Checkmk comes with a dedicated agent for FreeBSD: check_mk_agent.freebsd. Just as for the other Unices, the agent is implemented as a shell script. Currently there is no port available for the agent, but a manual installation is easy. You find the agent on your Nagios server in the same directory as the other agents:

  • /omd/sites/mysite/share/check_mk/agents for OMD users
  • /usr/share/check_mk/agents in manual installations with default paths

Before installing the agent you should install a few dependencies. If those are missing, the agent will not output all data. Install the following ports:

  • sysutils/muse
  • sysutils/ipmitool
  • devel/libstatgrab

Then we'll enable the internet daemon inetd in /etc/rc.conf:


Now we install the agent in /usr/local/bin/check_mk_agent. In the following example we assume that you are using OMD and the site-user mysite has a password:

root@linux# cd /usr/local/bin
root@linux# scp mysite@nagios:share/check_mk/agents/check_mk_agent.freebsd .
root@linux# mv check_mk_agent.freebsd check_mk_agent

Create an entry for the agent port in /etc/services:

check_mk        6556/tcp   #check_mk agent

An entry in /etc/inetd.conf will make the agent available via TCP at port 6556:

check_mk  stream  tcp nowait  root  /usr/local/bin/check_mk_agent check_mk_agent

And we set up minimum security in /etc/hosts.allow so that only the IP address of your monitoring server (let's assume has access:

# Allow nagios server to access us
check_mk_agent : : allow
check_mk_agent : ALL : deny

At last, we restart inetd to read in the new config and bring it up:

root@linux# /etc/rc.d/inetd start

If access doesn't work right away you can test the tcp wrapper settings using tcpdchk. Alternatively you can of course also use key-based ssh or any other more secure means of transportation.

1.1. Testing the agent

If everything works then you should be able to fetch the agent data from your monitoring server via telnet:

root@linux# telnet bsdhost 6556
Version: 1.1.13i1
AgentOS: freebsd