Share via


How to Generate an SNMP Trap for an Alert

MOM can generate Simple Network Management Protocol (SNMP) traps in response to an alert. SNMP traps can then be used by SNMP management applications. This topic provides information about generating SNMP traps from MOM.

Before MOM will send an SNMP trap, the computer that generates the SNMP trap must have the SNMP service running. For information about installing the SNMP service, see Configuring the SNMP Service. The computer generating the SNMP trap can be a server running MOM or an agent computer (the choice is made at the time of alert rule creation). Additionally, an SNMP management application must be available as the SNMP trap destination.

After the SNMP service is installed and an SNMP trap destination is available, getting MOM to generate an SNMP trap requires creating and deploying an alert rule.

Note Note   

The MOM operations database should be regularly backed up. Before proceeding, ensure that you have a backup of the database.

To generate an SNMP trap in response to an alert

  1. In the left pane of the MOM Administrator console, expand Rules, and then right-click Computer Groups.

  2. On the context menu, click Create Computer Group.

    Specify the computer types for the new computer group and any restrictions for the computers belonging to the computer group.

  3. Type Sample 2 Computers for the name of the new computer group and Computers used by the Sample 2 Management Pack for the description.

  4. Ensure that the Enabled check box is selected, click Finish, and then click No when prompted to deploy a group of rules.

To create a rule group

  1. In the left pane of the MOM Administrator console, expand Rules, and then right-click Rule Groups.
  2. On the context menu, click Create Rule Group.
  3. Type Sample 2 for the name of the rule group, and then type Generates SNMP trap for the description.
  4. Ensure that the Enabled check box is selected, and then click Next.
  5. When prompted for knowledge-base content, do not enter anything, and proceed through the prompts. If the server running MOM is in author mode, the Advanced property page is displayed.
  6. On the Advanced property page, specify MCS as the knowledge pack component type, and then ensure that the Mark this rule group as deleted check box is clear. If the server running MOM is not in author mode, the Advanced property page is not displayed. If the server running MOM is in author mode, the Knowledge Authoring property page is displayed.
  7. On the Knowledge Authoring property page, for purposes of this example, do not enter knowledge authoring content (leave the Purpose, Features, and Configuration fields blank). If the server is not in author mode, the Knowledge Authoring property page is not displayed.
  8. Click Yes when prompted to deploy the rule group to a computer group. The property sheet for the rule group is displayed.

To associate the rule group with a computer group

  1. On the Rule Group property sheet, click the Computer Groups property page, and then click Add.
  2. Select the Sample 2 Computers computer group, and then click OK to close the Select Item dialog box.
  3. Click Apply, and then click OK.

To add a new alert rule to the rule group

  1. In the left pane of the MOM Administrator console, right-click Alert Rules for the Sample 2 rule group.
  2. On the context menu, click New Alert Rule. MOM alerts can be restricted to specific alert sources, severity, rule groups, and other criteria such as description, name, computer, domain, time, and custom fields. For purposes of this example, however, specify no alert criteria so that all alerts generate SNMP traps.
  3. Proceed with the prompts, and specify no schedule criteria. When prompted for a response action for the alert rule, click Add, and then click Send an SNMP trap.
  4. Specify where you want to generate the SNMP trap: on the servers running MOM or on the agent computers. For purposes of this example, it does not matter where the SNMP is generated; remember, however, that the SNMP service must be installed on the location that generates the SNMP trap.
  5. When prompted for knowledge-base content, for purposes of this example, do not enter any information. Additionally, if you are in author mode, the Knowledge Authoring and Advanced property pages are displayed. Do not add information to the Knowledge Authoring property page. On the Advanced property page, specify MCS as the knowledge pack component type, and then ensure that the Mark this rule as deleted check box is clear. Continue through the prompts.
  6. When prompted for the name of the rule, type SNMP Trap Alert.
  7. Select the Enabled check box, and then click Finish.

To test the alert rule

The alert rule that was created will trigger an SNMP trap for any alert. The alert will be the result of a condition on an agent computer. The SNMP trap itself will be generated on either the server running MOM or on the agent computer (whichever you specified when you created the alert rule).

To test whether the alert rule generates an SNMP trap, you must have access to the SNMP management application that serves as the SNMP trap destination. Additionally, you must raise an alert on an agent computer. You can use any alert creation technique. For example, you can make an event rule that generates an alert; the event rule properties contain an option for generating an alert.

See Also

Generating SNMP Traps from MOM | MicrosoftOperationsManager.mib