MIB Explorer’s Scripts are written using the Velocity Template Language (VTL). VTL is a macro language that can be dynamically extended by contexts. Such a context is an interface to access Java objects provided by MIB Explorer. Contexts represent the Model in a Model, View, Controller (MVC) environment. MIB Explorer provides the following contexts (click here to view the complete API documentation):

Context

Description

snmp

The Snmp context provides services to create SNMP request, load PDUs, modify their Variable Bindings, send SNMP requests and notifications synchronously and inspect SNMP responses.

mib

The MIB context provides services to load/unload MIB modules, retrieve and exploit MIB object definitions, and manipulating OID values.

utils

The Utils context provides utility services to execute system commands, send emails, temporarily cease script execution, stop script execution, create random integers, and to create an empty Vector (e.g., to collect response PDUs).

gui

The GUI context provides means to get input from the user when the script is executed. The user can be prompted for a string value, or for a Variable Binding.

alarm

The Alarm context provides information about the alarm event that triggered the script's execution.

Scripts can be used to:

  • Execute any sequence of system commands or send an SMTP Email when an alarm is raised or cleared.
  • Automate rather complex administration task, for example creating hundreds of cross connections.
  • Create test scenarios for SNMP agents.
  • Create a trap gun to test scalability and robustness of proxy or manager applications.
  • Extract MIB module information and write it to a text file in any output format (e.g., HTML or XML). This can also be used to generate code for any programming language, in particular object name to OID mappings as shown by this script.
  • Trigger any sequence of SNMP operations (i.e., traps and informs) on alarm events generated by MIB Explorer’s monitor tool as shown by the Alarm example.