Skip to content

Instantly share code, notes, and snippets.

@cluther
Created March 27, 2012 14:11
Show Gist options
  • Save cluther/2216206 to your computer and use it in GitHub Desktop.
Save cluther/2216206 to your computer and use it in GitHub Desktop.
Example SNMP Trap
# This sends an example trap from the NET-SNMP-EXAMPLES-MIB.
#
# Parameters are..
# -v2c = SNMP version.
# -c public = SNMP community
# 127.0.0.1 = Trap manager hostname or IP.
# 0 = System uptime.
# NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification = Trap OID
# netSnmpExampleHeartbeatRate i 60 = First (of optional many) variables bindings.
snmptrap -v2c -c public 127.0.0.1 0 NET-SNMP-EXAMPLES-MIB::netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatRate i 60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment