Dit is een oude revisie van het document!
installer de nodige software door:
yum install net-snmp snmp-utils
Zet de firewall open:
firewall-cmd --permanent --add-port=161/udp
firewall-cmd --permanent --add-port=162/udp
firewall-cmd --reload
pas de configuratie aan:
vi /etc/snmp/snmpd.conf
Zet de betreffende regels als volgt:
rocommunity public #### # First, map the community name "public" into a "security name" # sec.name source community com2sec mynetwork 192.168.1.0/24 public #### # Second, map the security name into a group name: # group.name sec.model sec.name group MyROGroup v2c mynetwork #### # Third, create a view for us to let the group have rights to: # name incl/excl subtree mask(optional) view all included .1 #### # Finally, grant the group read-only access to the systemview view. # context sec.model sec.level prefix read write notif access MyROGroup "" any noauth exact all none none
Om een proces en een directory te monitoren voeg je nog toe:
# dit is om het http proces te monitoren met nagios via snmp, critical is >10 en <1 proc httpd 10 1 # dit is om de root partitie te bewaken critical is <100000 Mb vrij disk / 100000 #dit is om de load te bewaken load 12 14 14
test op de nagios server of de snmp waarden uit te lezen zijn:
snmpwalk -v 1 backup.auriel.nl -c public .1.3.6.1.4.1.2021.9.1.9
als het klopt krijg je output:
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 65