|Microsoft Operations Manager|
Microsoft Operations Manager 2000 (MOM) provides scripting capabilities for flexible, customized monitoring and response to events, alerts, and performance data. You can use the MOM scripting interface or standard Microsoft scripting languages to create scripts that MOM can implement. Scripts can extend MOM event management functions and provide additional data collection capabilities. MOM can also implement response scripts for events or alerts or do so on a scheduled basis.
The MOM scripting feature allows you to extend the capabilities of processing rules and provide specialized actions to respond to an event, alert, or performance threshold. Rules can also be configured to run on a scheduled basis.
MOM can run scripts in association with processing rules. Because MOM is rules-based, many problems can be detected and handled without using scripts. Scripting provides the advanced capabilities sometimes required for detecting and handling problems.
MOM uses Microsoft Active Scripting through scripts and Automation COM objects. MOM invokes Active Scripting, identifies the language of the user-provided script, and then calls the appropriate scripting engine. For scripts that use either VBScript or JScript, the language is specified on the Generaltab of the script's Propertiesdialog box. For all other languages, the Customsetting must be selected and the script engine must be specified by adding a line (similar to the following example) to the first line of the script.
Including the shebang line will cause errors unless the Customlanguage type is used. To determine the appropriate name (ProgID) to use when calling a specific scripting engine component, consult the documentation for that script engine.
The custom scripting engine must be installed on all computers on which the script will run.
The script runs and interacts with MOM through Automation COM objects. The script can also use other Automation COM objects. You can write scripts using any active scripting language, including VBScript, JScript, and Perl.
Script developers should be aware that objects automatically provided to scripts running in the Windows Script Host environment, such as the WScriptobject, are not present in the MOM scripting runtime. The WScriptobject is only available to scripts executed by the Cscript.exe or Wscript.exe application. Calling the WScript.Echomethod or other WScriptmethods in a MOM script will result in script errors. Similarly, MOM scripting objects are not meant to be used outside of the MOM scripting environment and runtime. Using MOM scripting objects in other environments, such as the Windows Script Host, is unsupported.
Use of the objects described in the Helper objects section is strongly discouraged. In most cases, identical or similar functionality is available through existing Windows Management Instrumentation (WMI) classes or COM libraries included with Windows or other Microsoft products. For more information, see Using Operating System APIs in Scripts.
MOM scripts run within the MOM OnePoint service process. This means the script runs with the same account and the same security privileges that the OnePoint service uses.
Scripts are stored in the MOM database and distributed with processing rules by the Agent Manager. Management Pack modules can contain scripts created for a specific application or environment. Open the source code for scripts included with MOM Management Packs from the Scripts node of the MOM Administrator console. View the source code on the Scripttab of the script's Propertiesdialog box.Note
For developer-oriented information about creating custom Management Packs, programming reports, extending the MOM Administrator console, and creating connectors to other management products, see the documentation and code samples in the MOM Software Development Kit (SDK).
Did you find this information useful? Please send your suggestions and comments about the documentation to firstname.lastname@example.org.