Use the following procedure to create a probe-based (script) event collection rule in Operations Manager 2007. Probe-based rules can get data from an unlimited number of sources, such as text files or databases. Probe-based rules should not change the state of an object. The data collected by the rule will display in event views for the targeted objects.

To create a probe-based event collection rule in Operations Manager 2007

  1. Start the Operations Manager 2007 Create Rule Wizard.

    Note
    For information about starting the Create Rule Wizard, see How to Start the Create Rule Wizard in Operations Manager 2007.
  2. On the Select a Rule Type page, do the following:

    1. Expand Collection Rules, expand Probe Based, and then click Script (Event).

    2. Select a Management pack from the list or click New to create a management pack with the Create a Management Pack Wizard.

      Note
      The rule will be added to the specified management pack; therefore, only unsealed management packs are listed. By default, when you create a management pack object, disable a rule or monitor, or create an override, Operations Manager saves the setting to the Default Management Pack. As a best practice, you should create a separate management pack for each sealed management pack you want to customize, rather than saving your customized settings to the Default Management Pack. For more information, seeDefault Management Pack.
    3. Click Next.

  3. On the Rule Name and Description page, do the following:

    1. Type the Rule name, such as Program Event ID 9999 probe rule.

    2. Click Select, select a target, such as Windows Computer, and then click OK.

    3. Leave Rule is enabled selected to have the rule take affect at the completion of the wizard, or clear the check box to enable the rule at a later time, and then click Next.

  4. On the Schedule page, specify how often the rule will run, and then select Synchronize at to set the time the rule will start. For example, set the rule to run every 1 hour starting at 12:15 AM. Rules set to run on a daily interval are scheduled to start at 12:00AM.

  5. On the Script page, do the following:

    1. Type the Name and extension of the script, such as Program Event ID 9999.vbs.

    2. Set Timeout to the length of time in seconds, minutes, hours, or days, the script can run before it is terminated.

    3. Type the Script, for example:

      set oAPI = CreateObject("MOM.ScriptAPI")

      set bag= oAPI.CreatePropertyBag()

      call bag.AddValue("Event source", "Program")

      call bag.AddValue("Event ID", 9999)

      call oAPI.Return(bag)

    4. Click Next.

      Note
      For more information about the MOMScriptAPI, see the Operations Manager 2007 Software Developers Kit (SDK), available at http://go.microsoft.com/fwlink/?LinkId=65912.
  6. On the next Script page, map parameters from the script to fields in the event, for example:

    Important
    Parameters are case sensitive.
    1. Click the Computer () button. In the Computer dialog box, click Target, click Principal Name, and then click OK. This maps the event to the computer's Active Directory Domain Services name.

    2. Click the Event Source () button. In the Event Source dialog box, click Data, and then click Property. In Value, replace [PropertyName] with Event source. The path should read, $Data/Property[@Name='Event source']$. Click OK.

    3. Type the Event Log, such as Application.

    4. Click the Event ID () button. In the Event ID dialog box, click Data and then click Property. In Value, replace [PropertyName] with Event ID. Click OK.

    5. Type the Category, such as 3.

    6. From the Level list, select Information, and then click Create.


Did you find this information useful? Please send your suggestions and comments about the documentation.