diff options
Diffstat (limited to 'examples/v3arch/twisted/agent/ntforg/trap-v2c-multiple-targets.py')
-rw-r--r-- | examples/v3arch/twisted/agent/ntforg/trap-v2c-multiple-targets.py | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/examples/v3arch/twisted/agent/ntforg/trap-v2c-multiple-targets.py b/examples/v3arch/twisted/agent/ntforg/trap-v2c-multiple-targets.py index c63dc37..f1e95bf 100644 --- a/examples/v3arch/twisted/agent/ntforg/trap-v2c-multiple-targets.py +++ b/examples/v3arch/twisted/agent/ntforg/trap-v2c-multiple-targets.py @@ -1,20 +1,34 @@ -# -# Notification Originator -# -# Send SNMP TRAP notifications to multiple Managers using the -# following options: -# -# * SNMPv2c -# * with community name 'public' -# * over IPv4/UDP -# * using Twisted framework for network transport -# * 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 addresses +++++++++++++++++++++++++++++++++++ + +Send SNMP TRAP notifications to multiple Managers using the +following options: + +* SNMPv2c +* with community name 'public' +* over IPv4/UDP +* using Twisted framework for network transport +* send TRAP notification +* to multiple Managers at 127.0.0.1:162, 127.0.0.2:162 and 127.0.0.3: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 twisted.internet import reactor from pysnmp.entity import engine, config from pysnmp.carrier.twisted.dgram import udp |