LibreNMS - snmp extend mysql

From wiki.1001solutions.net
Revision as of 17:37, 1 May 2020 by Z (talk | contribs) (Created page with "Category:Post-It Verify that you have installed: <nowiki> apt install -y php-cli php-mysql</nowiki> = NginX LibreNMS script = Get the script: <nowiki> wget https:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)



Verify that you have installed:

apt install -y php-cli php-mysql


NginX LibreNMS script

Get the script:

wget https://github.com/librenms/librenms-agent/raw/master/snmp/mysql -O /etc/snmp/mysql

Unzip and copy it where you need. Make it executable.

Create the /var/cache/librenms directory and make sure that it is owned by the user running the SNMP daemon:

mkdir -p /var/cache/librenms/ && chown -R Debian-snmp:Debian-snmp /var/cache/librenms

Create /etc/snmp/mysql.cnf:

<?php
$mysql_user = 'root';
$mysql_pass = 'toor';
$mysql_host = 'localhost';
$mysql_port = 3306;


SNMP Configuration

Adapt your /etc/snmp/snmpd.conf with:

extend mysql /etc/snmp/mysql

Restart the service.


Check Command

Adapt the user and path to your configuration:

sudo -u Debian-snmp /etc/snmp/mysql


Sources