If you wish to collect data from remote systems, then use LibreNMS in combination with check_mk. The agent can be extended to include information about applications on the remote system. let’s see how check_mk agent is setup.
Installation in Linux/ BSD
If you’re using the Distributed Polling setup, then allow access from the LibreNMS host and poller nodes on TCP-Port 6556. Check systemd or xinetd is installed on the host where the agent will run.
The following process is to be done on each host that you want to use the agent on:
1.Clone the repository for the librenms-agentcd /opt/git clone https://github.com/librenms/librenms-agent.gitcd librenms-agent
2. Now copy the proper check _mk_agent to /usr/bin.linux
cp check_mk_agent /usr/bin/check_mk_agent
freebsdcp check_mk_agent_freebsd /usr/bin/check_mk_agent
chmod +x /usr/bin/check_mk_agent
3. Place the service files thereby copying them.xinetd
cp check_mk_xinetd /etc/xinetd.d/check_mk
systemdcp check_mk@.service check_mk.socket /etc/systemd/system
4. Then make a required directories.mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local
5. Copy each script from agent-local/ that you want to graph into /usr/lib/check_mk_agent/local
6. By using the command chmod +x /usr/lib/check mk agent/local/$script make each one executable.
7. Allow the check_mk service to run in systemdxinetd
/etc/init.d/xinetd restart
systemdsystemctl enable check_mk.socket && systemctl start check_mk.socket
8. Log in to the LibreNMS web interface and select the device to monitor. Make sure unix-agent is enabled in the modules section. Also, select the apps from the applications that you want to monitor.
9. Now it will take around 10 minutes for data to appear in your graphs under Apps for the device.
Restrict the devices the agent uses to listen: Linux system
Follow these steps to restrict the network adapter on which the agent listens:
1. Modify /etc/systemd/system/check_mk.socket
2. Add a new line with BindToDevice= and the name of your network adapter to the [Socket] section.
3. In case the script has an enabled system then you must run systemctl daemon-reload followed by systemctl restart check_mk.socket.
If you need any assistance with check_mk agent setup you can get assistance here.
Frequently Asked Questions
Everything you need to know about Check_MK agent setup and LibreNMS integration.
1 What is the Check_MK agent and why is it used with LibreNMS?
2 What port does the Check_MK agent use, and do I need to open it in the firewall?
TCP port 6556. Yes, you must allow inbound access on this port from your LibreNMS host and any poller nodes. If you are using UFW or iptables, add a rule to allow traffic on port 6556 from trusted IPs only to keep the agent secure.
3 What is the difference between using xinetd and systemd for the Check_MK agent?
check_mk.socket method for better reliability and resource efficiency.
4 How do I verify that the Check_MK agent is running correctly?
telnet <host-ip> 6556or
nc -zv <host-ip> 6556If the agent is working, you will see raw monitoring data returned in plain text. If the connection is refused, check that the service is active and that port 6556 is open in the firewall.
5 How long does it take for data to appear in LibreNMS after installing the Check_MK agent?
6 Can I restrict which servers are allowed to connect to the Check_MK agent?
/etc/systemd/system/check_mk.socket and add a BindToDevice= line under the [Socket] section with your preferred network interface name. After saving, run:systemctl daemon-reloadsystemctl restart check_mk.socket
7 What should I do if the Check_MK agent is installed but LibreNMS shows no data?
- Confirm the unix-agent module is enabled for the device in LibreNMS
- Verify port 6556 is reachable from the LibreNMS host
- Ensure
/usr/bin/check_mk_agenthas executable permissions (chmod +x) - Confirm the systemd socket or xinetd service is actively running
- Check that the correct apps are selected under the Applications tab for the device
8 Is the Check_MK agent supported on FreeBSD as well as Linux?
check_mk_agent_freebsd instead of check_mk_agent to /usr/bin/check_mk_agent and follow the same remaining steps. Directory setup, plugin configuration, and LibreNMS web interface configuration are identical across both platforms.
Also check: How to Install Checkmk Agent on Windows Server
To get more updates you can follow us on Facebook, Twitter, LinkedIn
