Install SNMP service on CentOS 7
Check if the package is already installed
rpm -qa | grep net-snmp*
install the package
yum install net-snmp net-snmp-utils –y
verify installation
rpm -qa | grep net-snmp*
display SNMP configuration file without comments
grep -v “^$” /etc/snmp/snmpd.conf | grep -v ‘^ *#’
Firewall Configuration – Open UDP Port
firewall-cmd –permanent –add-port=161/udp
Firewall Configuration – Reload
firewall-cmd –reload
Firewall Configuration – List
firewall-cmd –list-all
starts SNMP service
systemctl start snmpd
snmpwalk – localhost Query
snmpwalk -v 1 -c public -O e 127.0.0.1
snmpwalk – Remote Query
snmpwalk -v 1 -c public -O e 192.168.1.7
Enable the service to start at boot and start automatically
systemctl enable snmpd
fix cacti can’t get information from SNMP
The problem resides in the permissions for SNMP version 1 users in the /etc/snmp/snmpd.conf file
You need to change the following limits:
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
to:
view systemview included .1.3.6.1.2.1
view systemview included .1.3.6.1.2.1.25.1.1