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 notConfigUser default public #### # Second, map the security name into a group name: # groupName securityModel securityName group notConfigGroup v1 notConfigUser group notConfigGroup v2c notConfigUser #### # Third, create a view for us to let the group have rights to: # name incl/excl subtree mask(optional) view allview included .1 #### # Finally, grant the group read-only access to the systemview view. # group context sec.model sec.level prefix read write notif access notConfigGroup "" any noauth exact allview none none ## sec.name source community com2sec mynetwork 192.168.1.0/24 public ## group.name sec.model sec.name group MyROGroup v2c mynetwork ## 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 proc httpd 10 1 # dit is om de root partitie te bewaken disk / 100000