SNMP Action

26 views
Skip to first unread message

Takenori Sato

unread,
Mar 23, 2020, 6:02:10 AM3/23/20
to EdgeStreamSDK
Hello,

We are woking on a new action, which sends a SNMP trap as follows.

from pysnmp.hlapi import *
from pysnmp import debug

debug.setLogger(debug.Debug('msgproc'))

next(
    sendNotification(
        SnmpEngine(),
        CommunityData('public'),
        UdpTransportTarget(('192.168.1.134', 162)),
        ContextData(),
        'trap',
        NotificationType(
            ObjectIdentity('1.3.6.1.4.1.55412.1'),
        ).addVarBinds(
            ('1.3.6.1.4.1.55412.1.1', Integer32(0))
        )
    )
)

Note that 55412 is the PEN number of the EDGEMATRIX, Inc.

The main use case here is to turn on a signal light at the edge when a particular object or a particular action is detected.

For example, here's an example when a PATLITE signal is configured and turned on by the action above.

Configuration

snmp_trap_receiv_config1.png


snmp_trap_recv_config2.png




Signal

snmp_trap_signal.jpg



Please let us know if you have any comments about this new action.

Thanks.
Reply all
Reply to author
Forward
0 new messages