LibreNMS - snmp extend mysql

 

LibreNMS - snmp extend mysql


Verify that you have php-mysql installed:

dpkg -l | grep php-mysql

If needed, install it:

apt install -y php-cli php-mysql

 

 

for librenms Agent

https://docs.librenms.org/Extensions/Agent-Setup/

https://docs.librenms.org/Extensions/Applications/#mysql

MySQL LibreNMS script

Get the script and make it executable:

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

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 = 'librenms';

$mysql_pass = 'dbpassword';

$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

 

Comments

Popular posts from this blog

Installing NFSEN & NFDUMP on Ubuntu and Next integrate with LibreNMS

IP Core Networks | Your Education, Your Choice

How to Install & Integrate Oxidized Into LibreNMS