Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

emit_snmp_attributes Function (Python)

Syntax

Python Syntax

Description

Return the attributes for the requested MIB object from a Python SNMP script.

SNMP scripts provide the flexibility to support custom MIBs. SNMP scripts are triggered automatically when the SNMP manager requests information for an unsupported object identifier (OID) that is mapped to an SNMP script. When the script is invoked, the jcs.emit_snmp_attributes() function emits the data for the requested object. The script acts like an SNMP subagent, and the system sends the return value from the script to the network management system (NMS).

Parameters

snmp_oid

String containing the OID about which the script is returning information.

snmp_oid_type

String that specifies the type of the data being returned for the requested MIB object. Acceptable values are Counter32, Counter64, Integer32, Unsigned32, and Octet String.

snmp_oid_value

Data to return for the requested MIB object.

Usage Examples

The following example Python SNMP script processes unsupported object identifiers (OIDs) that are mapped to the script in the Junos OS configuration. The emit_snmp_attributes() function returns the attributes for the requested OID.

Release Information

Function introduced in Junos OS Release 16.1R1.