LibreNMS - snmp extend mysql: Difference between revisions
From Wiki.IT-Arts.net
imported>Z No edit summary |
imported>Z No edit summary |
||
Line 13: | Line 13: | ||
Get the script: | Get the script: | ||
<nowiki> | <nowiki> | ||
wget https://github.com/librenms/librenms-agent/raw/master/snmp/mysql -O /etc/snmp/mysql</nowiki> | wget https://github.com/librenms/librenms-agent/raw/master/snmp/mysql -O /etc/snmp/mysql && chmod +x /etc/snmp/mysql</nowiki> | ||
Create the ''/var/cache/librenms'' directory and make sure that it is owned by the user running the SNMP daemon: | Create the ''/var/cache/librenms'' directory and make sure that it is owned by the user running the SNMP daemon: |
Revision as of 07:14, 3 May 2020
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 && 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 = '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