diff options
author | elie <elie> | 2015-12-13 12:05:03 +0000 |
---|---|---|
committer | elie <elie> | 2015-12-13 12:05:03 +0000 |
commit | 1090a68028c88f05bd02b567c5d45e9bd753d9ee (patch) | |
tree | f2978bed8f5e26b1eeb6d05e54d531786b13d889 /examples/v3arch | |
parent | 1244961c3fb0c76289bc94c6b66da7474838c556 (diff) | |
download | pysnmp-git-1090a68028c88f05bd02b567c5d45e9bd753d9ee.tar.gz |
notification originator examples re-pointed to Notification Receiver
at demo.snmplabs.com
Diffstat (limited to 'examples/v3arch')
12 files changed, 44 insertions, 44 deletions
diff --git a/examples/v3arch/asyncore/agent/ntforg/multiple-different-notifications-at-once.py b/examples/v3arch/asyncore/agent/ntforg/multiple-different-notifications-at-once.py index ab5f6413..45e2d82f 100644 --- a/examples/v3arch/asyncore/agent/ntforg/multiple-different-notifications-at-once.py +++ b/examples/v3arch/asyncore/agent/ntforg/multiple-different-notifications-at-once.py @@ -12,18 +12,18 @@ security settings: * with user 'usr-md5-none', auth: MD5, priv NONE * over IPv4/UDP * send INFORM notification -* to multiple Managers at 127.0.0.1:162, 127.0.0.2:162 +* to multiple Managers at 195.218.195.228:162, 195.218.195.228:162 * with TRAP ID 'coldStart' specified as an OID * include managed objects information: 1.3.6.1.2.1.1.1.0 = 'Example Notificator' 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.1.0 s 'Example notification' +| $ snmpinform -v3 -l authPriv -u usr-md5-none -A authkey1 195.218.195.228 0 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.1.0 s 'Example notification' and -| $ snmpinform -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' +| $ snmpinform -v2c -c public 195.218.195.228 0 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.1.0 s 'Example notification' """# from pysnmp.entity import engine, config @@ -60,14 +60,14 @@ config.addTransport( # First target config.addTargetAddr( snmpEngine, 'my-nms-1', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds-1', tagList='all-my-managers' ) # Second target config.addTargetAddr( snmpEngine, 'my-nms-2', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds-2', tagList='all-my-managers' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/send-custom-pdu.py b/examples/v3arch/asyncore/agent/ntforg/send-custom-pdu.py index 10517547..0219b1d1 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-custom-pdu.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-custom-pdu.py @@ -15,7 +15,7 @@ framework for further treatment. Functionally similar to: -| $ snmptrap -v1 -c public 127.0.0.1 1.3.6.1.6.3.1.1.5.1 0.0.0.0 1 0 123 +| $ snmptrap -v1 -c public 195.218.195.228 1.3.6.1.6.3.1.1.5.1 0.0.0.0 1 0 123 """# from pysnmp.entity import engine, config @@ -43,7 +43,7 @@ config.addTransport( # Create named target config.addTargetAddr( snmpEngine, 'my-nms', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/send-inform-to-multiple-managers.py b/examples/v3arch/asyncore/agent/ntforg/send-inform-to-multiple-managers.py index ce82f60c..6faf8d44 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-inform-to-multiple-managers.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-inform-to-multiple-managers.py @@ -9,7 +9,7 @@ security settings: * with community name 'public' * over IPv4/UDP * send TRAP notification -* to multiple Managers at 127.0.0.1:162, 127.0.0.2:162 +* to multiple Managers at 195.218.195.228:162, 195.218.195.228:162 * with TRAP ID 'coldStart' specified as an OID * include managed objects information: 1.3.6.1.2.1.1.1.0 = 'Example Notificator' @@ -17,15 +17,15 @@ security settings: 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' +| $ snmptrap -v2c -c public 195.218.195.228 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' +| $ snmptrap -v2c -c public 195.218.195.228 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' +| $ snmptrap -v2c -c public 195.218.195.228 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 @@ -52,21 +52,21 @@ config.addTransport( # First target config.addTargetAddr( snmpEngine, 'my-nms-1', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) # Second target config.addTargetAddr( snmpEngine, 'my-nms-2', - udp.domainName, ('127.0.0.2', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) # Third target config.addTargetAddr( snmpEngine, 'my-nms-3', - udp.domainName, ('127.0.0.3', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/send-notification-over-ipv4-and-ipv6.py b/examples/v3arch/asyncore/agent/ntforg/send-notification-over-ipv4-and-ipv6.py index 1c93e620..b1bb9fb6 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-notification-over-ipv4-and-ipv6.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-notification-over-ipv4-and-ipv6.py @@ -17,7 +17,7 @@ network protocols: Functionally similar to: -| $ snmptrap -v2c -c public udp: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' +| $ snmptrap -v2c -c public udp:195.218.195.228 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 @@ -49,7 +49,7 @@ config.addTransport( ) config.addTargetAddr( snmpEngine, 'my-nms-1', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/send-packet-from-specific-address.py b/examples/v3arch/asyncore/agent/ntforg/send-packet-from-specific-address.py index c7dfedb4..2577aaed 100644 --- a/examples/v3arch/asyncore/agent/ntforg/send-packet-from-specific-address.py +++ b/examples/v3arch/asyncore/agent/ntforg/send-packet-from-specific-address.py @@ -7,14 +7,14 @@ Send SNMP notification using the following options: * SNMPv1 * with community name 'public' * over IPv4/UDP -* to a Manager at 127.0.0.1 UDP port 162 -* from local address 127.0.0.1, UDP port 61024 +* to a Manager at 195.218.195.228 UDP port 162 +* from local address 0.0.0.0, UDP port 61024 * send TRAP notification * with TRAP ID 'coldStart' specified as an OID Functionally similar to: -| $ snmptrap -v1 -c public 127.0.0.1 1.3.6.1.6.3.1.1.5.1 0.0.0.0 1 0 0 +| $ snmptrap -v1 -c public 195.218.195.228 1.3.6.1.6.3.1.1.5.1 0.0.0.0 1 0 0 """# from pysnmp.entity import engine, config @@ -38,11 +38,11 @@ config.addTargetParams(snmpEngine, 'my-creds', 'my-area', 'noAuthNoPriv', 0) config.addTransport( snmpEngine, udp.domainName, - udp.UdpSocketTransport().openClientMode(iface=('127.0.0.1', 61024)) + udp.UdpSocketTransport().openClientMode(iface=('0.0.0.0', 61024)) ) config.addTargetAddr( snmpEngine, 'my-nms', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) 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 0f356697..b93a2716 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 @@ -9,7 +9,7 @@ following options: * with community name 'public' * over IPv4/UDP * send TRAP notification -* to multiple Managers at 127.0.0.1:162, 127.0.0.2:162 +* to multiple Managers at 195.218.195.228:162, 195.218.195.228:162 * with TRAP ID 'coldStart' specified as an OID * include managed objects information: 1.3.6.1.2.1.1.1.0 = 'Example Notificator' @@ -17,15 +17,15 @@ following options: 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' +| $ snmptrap -v2c -c public 195.218.195.228 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' +| $ snmptrap -v2c -c public 195.218.195.228 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' +| $ snmptrap -v2c -c public 195.218.195.228 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 @@ -52,21 +52,21 @@ config.addTransport( # First target config.addTargetAddr( snmpEngine, 'my-nms-1', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) # Second target config.addTargetAddr( snmpEngine, 'my-nms-2', - udp.domainName, ('127.0.0.2', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) # Third target config.addTargetAddr( snmpEngine, 'my-nms-3', - udp.domainName, ('127.0.0.3', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/usm-md5-none.py b/examples/v3arch/asyncore/agent/ntforg/usm-md5-none.py index 116d6794..dd6ed53e 100644 --- a/examples/v3arch/asyncore/agent/ntforg/usm-md5-none.py +++ b/examples/v3arch/asyncore/agent/ntforg/usm-md5-none.py @@ -7,7 +7,7 @@ Send SNMP INFORM notification using the following options: * SNMPv3 * with user 'usr-md5-none', auth: MD5, priv NONE * over IPv4/UDP -* to a Manager at 127.0.0.1:162 +* to a Manager at 195.218.195.228: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' @@ -41,7 +41,7 @@ config.addTransport( ) config.addTargetAddr( snmpEngine, 'my-nms', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/v1-trap.py b/examples/v3arch/asyncore/agent/ntforg/v1-trap.py index 226788a7..bb6ab1be 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v1-trap.py +++ b/examples/v3arch/asyncore/agent/ntforg/v1-trap.py @@ -7,18 +7,18 @@ Send SNMP notification using the following options: * SNMPv1 * with community name 'public' * over IPv4/UDP -* to a Manager at 127.0.0.1:162 +* to a Manager at 195.218.195.228: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 Agent Address with '195.218.195.228' * 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 127.0.0.1 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' +| $ snmptrap -v1 -c public 195.218.195.228 1.3.6.1.4.1.20408.4.1.1.2 195.218.195.228 6 432 12345 1.3.6.1.2.1.1.1.0 s 'my system' """# from pysnmp.entity import engine, config @@ -44,7 +44,7 @@ config.addTransport( ) config.addTargetAddr( snmpEngine, 'my-nms', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/v2c-inform.py b/examples/v3arch/asyncore/agent/ntforg/v2c-inform.py index 026d36ff..4e02f71b 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v2c-inform.py +++ b/examples/v3arch/asyncore/agent/ntforg/v2c-inform.py @@ -8,7 +8,7 @@ Send SNMP INFORM notification using the following options: * with community name 'public' * over IPv4/UDP * send INFORM notification -* to a Manager at 127.0.0.1:162 +* to a Manager at 195.218.195.228:162 * with TRAP ID 'coldStart' specified as an OID * include managed objects information: 1.3.6.1.2.1.1.1.0 = 'Example Notificator' @@ -16,7 +16,7 @@ Send SNMP INFORM notification using the following options: Functionally similar to: -| $ snmpinform -v2c -c public demo.snmplabs.com 12345 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.1.0 s 'Example Notificator' 1.3.6.1.2.1.1.5.0 s 'Notificator Example' +| $ snmpinform -v2c -c public 195.218.195.228 12345 1.3.6.1.6.3.1.1.5.1 1.3.6.1.2.1.1.1.0 s 'Example Notificator' 1.3.6.1.2.1.1.5.0 s 'Notificator Example' """# from pysnmp.entity import engine, config diff --git a/examples/v3arch/asyncore/agent/ntforg/v2c-trap-via-notification-type.py b/examples/v3arch/asyncore/agent/ntforg/v2c-trap-via-notification-type.py index b72c5a7d..4d8f1756 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v2c-trap-via-notification-type.py +++ b/examples/v3arch/asyncore/agent/ntforg/v2c-trap-via-notification-type.py @@ -8,7 +8,7 @@ Send SNMP TRAP notification using the following options: * with community name 'public' * over IPv4/UDP * send TRAP notification -* to a Manager at 127.0.0.1:162 +* to a Manager at 195.218.195.228:162 * with TRAP ID IF-MIB::ifLink as MIB symbol The IF-MIB::ifLink NOTIFICATION-TYPE implies including four other @@ -23,7 +23,7 @@ Where "x" is MIB table index (instance index). Functionally similar to: -| $ snmptrap -v2c -c public 127.0.0.1 0 1.3.6.1.6.3.1.1.5.3 IF-MIB::ifIndex."1" IF-MIB::ifAdminStatus."1" IF-MIB::ifOperStatus."1" IF-MIB::ifDescr."1" +| $ snmptrap -v2c -c public 195.218.195.228 0 1.3.6.1.6.3.1.1.5.3 IF-MIB::ifIndex."1" IF-MIB::ifAdminStatus."1" IF-MIB::ifOperStatus."1" IF-MIB::ifDescr."1" """# from pysnmp.entity import engine, config @@ -68,7 +68,7 @@ config.addTransport( ) config.addTargetAddr( snmpEngine, 'my-nms-1', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/v2c-trap.py b/examples/v3arch/asyncore/agent/ntforg/v2c-trap.py index 2a926d88..91fcaf7f 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v2c-trap.py +++ b/examples/v3arch/asyncore/agent/ntforg/v2c-trap.py @@ -8,7 +8,7 @@ Send SNMP TRAP notification using the following options: * with community name 'public' * over IPv4/UDP * send TRAP notification -* to a Manager at 127.0.0.1:162 +* to a Manager at 195.218.195.228:162 * with TRAP ID 'coldStart' specified as an OID * include managed objects information: 1.3.6.1.2.1.1.1.0 = 'Example Notificator' @@ -16,7 +16,7 @@ Send SNMP TRAP notification using the following options: Functionally similar to: -| $ snmptrap -v2c -c public 127.0.0.1 12345 1.3.6.1.4.1.20408.4.1.1.2 +| $ snmptrap -v2c -c public 195.218.195.228 12345 1.3.6.1.4.1.20408.4.1.1.2 """# from pysnmp.entity import engine, config @@ -42,7 +42,7 @@ config.addTransport( ) config.addTargetAddr( snmpEngine, 'my-nms', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) diff --git a/examples/v3arch/asyncore/agent/ntforg/v3-trap.py b/examples/v3arch/asyncore/agent/ntforg/v3-trap.py index a97a975d..90312ca7 100644 --- a/examples/v3arch/asyncore/agent/ntforg/v3-trap.py +++ b/examples/v3arch/asyncore/agent/ntforg/v3-trap.py @@ -8,7 +8,7 @@ Send SNMP TRAP notification using the following options: * with user 'usr-md5-des', auth: MD5, priv DES * over IPv4/UDP * send TRAP notification -* to a Manager at 127.0.0.1:162 +* to a Manager at 195.218.195.228:162 * with TRAP ID 'warmStart' specified as an OID * include managed object information 1.3.6.1.2.1.1.5.0 = 'system name' @@ -46,7 +46,7 @@ config.addTransport( ) config.addTargetAddr( snmpEngine, 'my-nms', - udp.domainName, ('127.0.0.1', 162), + udp.domainName, ('195.218.195.228', 162), 'my-creds', tagList='all-my-managers' ) |