Skip to main content

SNMP configuration

This sample snmpd.conf will cause SNMP to collect system information and send it to the receiver of the sample application discussed in SNMPParser.

rocommunity  public
# Default SNMPV3 user name
agentSecName disman
# Creating user, this user will be used by 'monitor' process to fetch system metrics.
createUser disman MD5 sercrt@1
# Setting user to have read only access to system metrics.
rouser disman auth
# SNMPV1 trap destination.
trapsink public
# Instruct agent to monitor disk space
disk / 50% 
# Instruct agent to monitor CPU load.
load 1 1 1
# Setting up monitoring job to send alert/trap message.
monitor -S -D -r 5 -i sysName.0 -i hrSystemDate.0 -i sysUpTime.0 -o ifIndex 
  -o ifSpeed -o ifHighSpeed  -o ifPhysAddress -o ifInOctets -o ifInUcastPkts -o ifInDiscards 
  -o ifInErrors -o ifOutOctets -o ifOutUcastPkts -o ifOutDiscards -o ifOutErrors 
  -o ifOperStatus "Interface Details" ifOutOctets 0 0

Multiple remote hosts may be configured to send to the same trap destination.