diff options
Diffstat (limited to 'examples/v3arch')
-rw-r--r-- | examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py | 46 | ||||
-rw-r--r-- | examples/v3arch/asyncore/agent/ntforg/v3-trap.py | 3 |
2 files changed, 31 insertions, 18 deletions
diff --git a/examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py b/examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py index 65bb20d5..0f356697 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py @@ -1,19 +1,33 @@ -# -# Notification Originator -# -# Send SNMP TRAP notifications to multiple Managers using the -# following options: -# -# * SNMPv2c -# * with community name 'public' -# * over IPv4/UDP -# * send TRAP notification -# * to multiple Managers at 127.0.0.1:162, 127.0.0.2:162 -# * with TRAP ID 'coldStart' specified as an OID -# * include managed objects information: -# 1.3.6.1.2.1.1.1.0 = 'Example Notificator' -# 1.3.6.1.2.1.1.5.0 = 'Notificator Example' -# +""" +Notification to multiple SNMP managers +++++++++++++++++++++++++++++++++++++++ + +Send SNMP TRAP notifications to multiple Managers using the +following options: + +* SNMPv2c +* with community name 'public' +* over IPv4/UDP +* send TRAP notification +* to multiple Managers at 127.0.0.1:162, 127.0.0.2:162 +* with TRAP ID 'coldStart' specified as an OID +* include managed objects information: + 1.3.6.1.2.1.1.1.0 = 'Example Notificator' + 1.3.6.1.2.1.1.5.0 = 'Notificator Example' + +Functionally similar to: + +| $ snmptrap -v2c -c public 127.0.0.1 0 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.1.0 s 'Example notification' 1.3.6.1.2.1.1.5.0 s 'Notificator Example' + +and + +| $ snmptrap -v2c -c public 127.0.0.2 0 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.1.0 s 'Example notification' 1.3.6.1.2.1.1.5.0 s 'Notificator Example' + +and + +| $ snmptrap -v2c -c public 127.0.0.3 0 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.1.0 s 'Example notification' 1.3.6.1.2.1.1.5.0 s 'Notificator Example' + +"""# from pysnmp.entity import engine, config from pysnmp.carrier.asyncore.dgram import udp from pysnmp.entity.rfc3413 import ntforg diff --git a/examples/v3arch/asyncore/agent/ntforg/v3-trap.py b/examples/v3arch/asyncore/agent/ntforg/v3-trap.py index d43fe271..a97a975d 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v3-trap.py +++ b/examples/v3arch/asyncore/agent/ntforg/v3-trap.py @@ -14,8 +14,7 @@ Send SNMP TRAP notification using the following options: Functionally similar to: -| $ snmptrap -v3 -l authPriv -u usr-md5-des -A authkey1 -X privkey1 -e 800000000 -1020304 0 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.5.0 s 'my system' +| $ snmptrap -v3 -l authPriv -u usr-md5-des -A authkey1 -X privkey1 -e 8000000001020304 0 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.5.0 s 'my system' """# from pysnmp.entity import engine, config |