How to enable basic ping testing in LibreNMS

How to enable basic ping testing in LibreNMS

In a previous post I looked at how to install LibreNMS which is easily one of the most straightforward network monitoring tools around. It’s easy to use, works out of the box, and is really pretty to look at. In this post I’ll look at how to enable ping monitoring non-snmp devices.

Update: In a previous revision I stated that you could also enable alerting on services. Currently that doesn’t look like it is possible. I’d add that information back here if I can figure it out.

Whilst most devices now-a-days provide SNMP management there are still a tonne of devices which either don’t support SNMP or where you just don’t need to manage them. Those devices may still need monitoring though and a simple alert when a device goes offline is something that’s very straightforward to set up.

  1. LibreNMS has no inbuilt ping support, it only supports SNMP enabled devices, so we’re going to make use of the Nagios Plugin set to provide additional monitoring. SSH on to your LibreNMS server and lets install the plugins.
    sudo apt-get install nagios-plugins
  2. Once they are installed, you’ll need to enable support for the plugins in LibreNMS.
    sudo emacs /opt/librenms/config.php
  3. Add the following lines to the bottom of your LibreNMS config.php file and save.
    $config['show_services'] = 1;
    $config['nagios_plugins'] = "/usr/lib/nagios/plugins";
  4. Now you just need to ensure that the ICMP nagios check file is enabled for execution by LibreNMS. The command and output should look like this. You need to be able to see the x in the permission string at the start of the line.
    ls /usr/lib/nagios/plugins/check_icmp -l
    -rwsr-xr-x 1 root root 59440 Mar 12 2014 check_icmp
  5. Finally, you need to make sure that the services checks are run. Edit the /etc/cron.d/librenms file and make sure the following line is at the bottom before saving.
    */5 * * * * librenms /opt/librenms/check-services.php >> /dev/null 2>&1
  6. Pop over to your LibreNMS web portal and hit Refresh. You should see a services menu appear. This is where you will manage all the non-snmp checks.
    LibreNMS Services
  7. Click Add Service to add a new service check.
  8. The Device is the IP of the machine that *does* the check. In our case use your LibreNMS IP address. Set the type to ICMP and enter the IP address to be pinged in the IP Address box. Click Add Service. Note: You *MUST* enter a description otherwise managing multiple alerts becomes an absolute nightmare.
  9. Click on Services > All Services to see your list of services. You should now see your new ping test there.
    LibreNMS Services

Author

Oliver works as Head of Sales at a leading provider of IT services to the education sector. Out of hours he's a runner with a limp, has a board game addiction and a owns a dog that looks like a badger.
Show Buttons
Hide Buttons

Before you go...

or
Subscribe to my newsletter

If you enjoyed this article then why not let me know.