Skip to content

Instantly share code, notes, and snippets.

@axemann
Last active April 29, 2023 17:18
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save axemann/c649b2c478fac5a7cd1f5fa2f51edbd7 to your computer and use it in GitHub Desktop.
Save axemann/c649b2c478fac5a7cd1f5fa2f51edbd7 to your computer and use it in GitHub Desktop.
LibreNMS Linux server monitoring setup (Ubuntu)
sudo apt-get install snmpd -y
sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
sudo su -
sudo cat > /etc/snmp/snmpd.conf << EOF
# Change public below to your preferred SNMP community string
com2sec readonly default public
group MyROGroup v2c readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
sysLocation Rack, Room, Building, City, Country [GPSX,Y]
sysContact Your Name <your@email.address>
#Distro Detection
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro
EOF
exit
sudo curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
sudo chmod +x /usr/bin/distro
sudo service snmpd restart
#Edit sysLocation and sysContact if needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment