Follow the steps below to add a host to libreNMS:
1. Install SNMP on the server to be monitored
[root@dev ~]# yum -y install net-snmp
2. Backup the snmpd configuration file then edit the / etc / snmpd / snmpd file and add the command line below.
[root@dev ~]# mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.backup
[root@dev ~]# nano /etc/snmp/snmpd.conf
com2sec readonly default libre
group MyROGroup v2c readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
syslocation Location [lon,lat]
syscontact technotes <sysadmin@technotes.id>
#Distro Detection
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro
group MyROGroup v2c readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
syslocation Location [lon,lat]
syscontact technotes <sysadmin@technotes.id>
#Distro Detection
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro
3. Install distro script
[root@dev ~]# curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
[root@dev ~]# chmod +x /usr/bin/distro
4. The next step is to open port 161
[root@dev ~]# firewall-cmd --permanent --add-port=161/udp
5. Reload firewall
[root@dev ~]# firewall-cmd --reload
6. Restart snmpd service
[root@dev ~]# systemctl restart snmpd
7. Enable snmpd service
[root@dev ~]# systemctl enable snmpd
8. Go to libreNMS monitoring and click menu Device->Add Device
Add Device |
Tags:
Linux