summaryrefslogtreecommitdiff
path: root/examples/v3arch/trollius/agent
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/trollius/agent')
-rw-r--r--examples/v3arch/trollius/agent/ntforg/inform-v3.py38
-rw-r--r--examples/v3arch/trollius/agent/ntforg/trap-v1.py46
2 files changed, 48 insertions, 36 deletions
diff --git a/examples/v3arch/trollius/agent/ntforg/inform-v3.py b/examples/v3arch/trollius/agent/ntforg/inform-v3.py
index 93fe5df..e4e87c1 100644
--- a/examples/v3arch/trollius/agent/ntforg/inform-v3.py
+++ b/examples/v3arch/trollius/agent/ntforg/inform-v3.py
@@ -1,19 +1,25 @@
-#
-# Notification Originator
-#
-# Send SNMP INFORM notification using the following options:
-#
-# * SNMPv3
-# * with user 'usr-md5-none', auth: MD5, priv NONE
-# * over IPv4/UDP
-# * using Trollius framework for network transport
-# * to a Manager at 127.0.0.1:162
-# * send INFORM notification
-# * with TRAP ID 'warmStart' specified as an OID
-# * include managed object information 1.3.6.1.2.1.1.5.0 = 'system name'
-#
-# Requires Trollius framework!
-#
+"""
+SNMP INFORM notification
+++++++++++++++++++++++++
+
+Send SNMP INFORM notification using the following options:
+
+* SNMPv3
+* with user 'usr-md5-none', auth: MD5, priv NONE
+* over IPv4/UDP
+* using Trollius framework for network transport
+* to a Manager at 127.0.0.1:162
+* send INFORM notification
+* with TRAP ID 'warmStart' specified as an OID
+* include managed object information 1.3.6.1.2.1.1.5.0 = 'system name'
+
+Functionally similar to:
+
+| $ snmpinform -v3 -l authPriv -u usr-md5-none -A authkey1 127.0.0.1 0 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.5.0 s 'system name'
+
+Requires Trollius framework!
+
+"""#
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413 import context
from pysnmp.entity.rfc3413.asyncio import ntforg
diff --git a/examples/v3arch/trollius/agent/ntforg/trap-v1.py b/examples/v3arch/trollius/agent/ntforg/trap-v1.py
index b11b39f..50c26b8 100644
--- a/examples/v3arch/trollius/agent/ntforg/trap-v1.py
+++ b/examples/v3arch/trollius/agent/ntforg/trap-v1.py
@@ -1,23 +1,29 @@
-#
-# Notification Originator
-#
-# Send SNMP notification using the following options:
-#
-# * SNMPv1
-# * with community name 'public'
-# * over IPv4/UDP
-# * using Trollius framework for network transport
-# * to a Manager at 127.0.0.1:162
-# * send TRAP notification
-# * with TRAP ID 'coldStart' specified as an OID
-# * include managed objects information:
-# * overriding Uptime value with 12345
-# * overriding Agent Address with '127.0.0.1'
-# * overriding Enterprise OID with 1.3.6.1.4.1.20408.4.1.1.2
-# * include managed object information '1.3.6.1.2.1.1.1.0' = 'my system'
-#
-# Requires Trollius framework!
-#
+"""
+SNMPv1 TRAP
++++++++++++
+
+Send SNMP notification using the following options:
+
+* SNMPv1
+* with community name 'public'
+* over IPv4/UDP
+* using Trollius framework for network transport
+* to a Manager at 127.0.0.1:162
+* send TRAP notification
+* with TRAP ID 'coldStart' specified as an OID
+* include managed objects information:
+* overriding Uptime value with 12345
+* overriding Agent Address with '127.0.0.1'
+* overriding Enterprise OID with 1.3.6.1.4.1.20408.4.1.1.2
+* include managed object information '1.3.6.1.2.1.1.1.0' = 'my system'
+
+Functionally similar to:
+
+| $ snmptrap -v1 -c public demo.snmplabs.com 1.3.6.1.4.1.20408.4.1.1.2 127.0.0.1 6 432 12345 1.3.6.1.2.1.1.1.0 s 'my system'
+
+Requires Trollius framework!
+
+"""#
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413 import context
from pysnmp.entity.rfc3413.asyncio import ntforg