SNMP Scripts Overview
Junos OS SNMP scripts provide the flexibility to support custom MIBs that are not implemented in the Junos operating system (Junos OS). SNMP scripts are triggered automatically when the SNMP manager requests information from the SNMP agent for an unsupported object identifier (OID) that is mapped to an SNMP script. The script acts like an SNMP subagent, and the system sends the return value from the script to the network management system (NMS).
SNMP must be configured on the device before SNMP scripts can provide values for OIDs.
Table 1 lists SNMP script tasks and where to find details.
SNMP Script Task |
Find Details Here |
|---|---|
Get started with the SLAX script language |
|
Develop SNMP scripts |
|
Configure SNMP scripts |
|
Debug SNMP scripts |
|
Manage SNMP scripts |
|
Add security for SNMP scripts |
SNMP scripts are based on the Junos XML management protocol and the Junos XML API, which are discussed in Junos XML Management Protocol and Junos XML API Overview. You can write SNMP scripts in Python, Extensible Stylesheet Language Transformations (XSLT), or Stylesheet Language Alternative syntaX (SLAX). SNMP scripts written in SLAX and XSLT use XPath to locate the operational objects to inspect and use XSLT constructs to specify the actions to perform on those objects. The actions can change the output or execute additional commands based on the output.