Share via


Runtime Scripts Overview

Applies To: Operations Manager 2007 R2, Operations Manager 2007 SP1, System Center Operations Manager 2007

System Center Operations Manager 2007 includes a script API that you can use to create custom runtime scripts. You can add these scripts to a Management Pack to do the following:

  • Discover class instances that you want to monitor.

  • Create monitoring data for later use by monitors, rules, or tasks.

Scripts that are defined in a Management Pack run automatically as part of discovery or monitoring processes on a managed computer (whether the computer is locally or remotely managed). To run a script, an Operations Manager agent creates a script file on the managed computer. The computer then runs the script by using CScript.exe (the command-line version of the Windows Script Host). The script can return discovery data or monitoring data. The data created by the script might or might not be passed to a Management Server, depending on the workflow.

The following sections describe the uses for runtime scripts in greater detail.

Discovering Class Instances

You can create custom runtime scripts to discover items that you want to monitor, such as applications, devices, or services. A script discovers an item by creating instances of one or more classes that are defined in a Management Pack. The script adds these instances to a discovery data set that it returns to a Management Server for processing.

For more information, see How to Create Discovery Data by Using a Script.

Creating Monitoring Data

A runtime script can create a property bag, which is a collection of data that is added to the current workflow for later use by monitors, rules, or tasks. A script can create a single property bag or a set of property bags. Some possible uses for property bag data include the following:

  • Generating custom performance data.

  • Generating custom events.

  • Providing data that a monitor uses to evaluate an object's state.

For more information, see How to Create Monitoring Data by Using a Script.

See Also

Concepts

About the Operations Manager Script Library
Debugging Runtime Scripts
Getting Started Developing Runtime Scripts
Using Management Pack Context Parameters in Scripts