summaryrefslogtreecommitdiff
path: root/examples/v3arch
diff options
context:
space:
mode:
authorelie <elie>2015-09-17 19:55:00 +0000
committerelie <elie>2015-09-17 19:55:00 +0000
commit9cabcd7b8143224e9b364cfedb6fa08753ec9115 (patch)
treeb0d681fd7e40ac33ad423e33bf95f05e53053afe /examples/v3arch
parent1344d9030f5dda0ac98506e90127c03a152eb64d (diff)
downloadpysnmp-git-9cabcd7b8143224e9b364cfedb6fa08753ec9115.tar.gz
proper markup and fixes
Diffstat (limited to 'examples/v3arch')
-rw-r--r--examples/v3arch/asyncore/agent/ntforg/send-trap-to-multiple-managers.py46
-rw-r--r--examples/v3arch/asyncore/agent/ntforg/v3-trap.py3
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