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
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.
Also check: How to Install Checkmk Agent on Windows Server