Install Nagios Plugins to monitor services on remote servers

LibreNMS MySQL application works perfect. Nevertheless, as I need to monitor more services that LibreNMS applications do not cover, I’d like to try the Nagios Plugin on mysql to test LibreNMS service monitoring on remote servers.

On doc https://docs.librenms.org/#Extensions/Services/

"These services are tied into an existing device so you need at least one device that supports SNMP to be able to add it to LibreNMS"
Q1: may I add services to a device that does not support SNMP but is ICMP only?

"Firstly, install Nagios plugins…"
Q2: where Nagios plugins to install and the following setup steps to be done, on LIbreNMS server to monitor mysql on a remote server or remote server offering mysql service? Any help would be greatly appreciated.

Q1 Yes

Q2 Most nagios plugins cannot monitor remote servers.

I believe the mysql nagios plugin only supports localhost. You can use the the mysql application to monitor remote hosts.

nagios check_mysql should support remote mysql, you need to pass the correct args when creating the service check: https://www.monitoring-plugins.org/doc/man/check_mysql.html

Thanks murrant and laf. Greatly appreciated.

I followed steps on doc Home - LibreNMS Docs and installed Nagios plugins on LibreNMS server.

After checking the argument options, configured a test service check on a remote server ‘report’ with IP 172.16.9.76:
image
the error message on LibreNMS


Looks like that LibreNMS requires login credentials to the OS in additional to login credentials to MySQL.

Any where I can configure login credentials to the OS of the remote server on LibreNMS?

Any help would be greatly appreciated.

Are you sure that’s the Librenms DB username?

In the install docs it asks you to use Librenms.

Thanks Kevin!

This is a test for LibreNMS and Nagios plugins integration.
The credentials are for the MySQL DB on a remote server (server name: report, IP: 172.16.9.76), this configuration snapshot is from the dashboard of the LibreNMS server.

Which install docs you referring to?

Ahhh Never mind then I thought you were trying to connect your local DB. :slight_smile: I will see my self out of this convo.

You can run check_mysql_health from the command line to test.

I still would suggest this: https://docs.librenms.org/#Extensions/Applications/#mysql

Thanks very much murrant!

I ran the script check_mysql_health on the LibreNMS server to check mysql health on a remote server 172.16.9.76, but failed. Reason behind:

  • mysql on the remote server 172.16.9.76 only listens on 127.0.0.1:3306
  • nagios plugin check_mysql_health does not provide arguments to express check mysql health on a remote server but only listening on localhost port.

Thanks very much murran, laf and Kevin for all your help. Greatly appreciated.

1 Like