How to setup server for monitoring Tipărire

  • monitorizare, monitoring, snmp, librenms, graphs, grafice
  • 47

All our clients can monitor their servers with LibreNMS like in the picture below:

LibreNMS Example

First you need to install SNMP on the server and do the required settings.

For RHEL / CentOS     OR     Ubuntu (almost the same thing with few differences marked in this color):

yum install net-snmp -y
apt-get install snmpd -y
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
chmod +x /usr/bin/distro

nano /etc/snmp/snmpd.conf

Add these lines below:

# Change RANDOMSTRINGGOESHERE to your preferred SNMP community string
com2sec readonly  default         dedicat_AR

group MyROGroup v2c        readonly
view all    included  .1                               80
access MyROGroup ""      any       noauth    exact  all    none   none

syslocation dedicatserver
syscontact Alex <office@dedicatserver.ro>

#Distro Detection
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro

#Hardware Detection (uncomment to enable)
extend .1.3.6.1.4.1.2021.7890.2 hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name'
extend .1.3.6.1.4.1.2021.7890.3 manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
extend .1.3.6.1.4.1.2021.7890.4 serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'



and save with CTRL+X.


Restart and Autostart SNMP service:

service snmpd restart
chkconfig snmpd on

OR (CentOS 7 and UBUNTU)

systemctl start snmpd
systemctl enable snmpd



Enable port 161 in your firewall:

iptables –A INPUT –p udp –-dport 161 -j ACCEPT
service iptables restart

OR (CentOS 7)

firewall-cmd --zone=public --permanent --add-port=161/udp
firewall-cmd --reload


That's it. Open a ticket and tell us what what IP you need to be monitored and we'll create a Username and Password.


Răspunsul a fost util?

« înapoi

Powered by WHMCompleteSolution