How to Create a Linked Alert Report

適用於: System Center Operations Manager 2007

The following procedure shows how to create an Alert linked report in the Operations Manager 2007 Authoring console. Before you perform this procedure, you must first complete the prerequisite procedure How to Create a Class in which you create the target class.

The report that is created in this procedure has the following characteristics:

  • Includes data between the current date and the first date of the current month. The date controls are not presented to the user.

  • Only includes alerts with a severity of Warning or Error. The severity combo box is not presented to the user.

  • Only includes alerts with a priority of Medium or High. The priority combo box is not presented to the user.

  • Limits the target objects that may be selected to instances of My Computer Role 1.

To create the linked report

  1. In the Authoring console, select Reporting, and then select Linked Reports.

  2. Right-click in the right-side pane, select New, and then select New Linked Report.

  3. In the Choose a unique identifier box, type MyMP.MyAlertReport and then click OK.

  4. On the General tab, do the following:

    1. In the Name box, type My Alert Report.

    2. Click the button to the right side of the Base box.

    3. Select Microsoft.SystemCenter.DataWarehouse.Report.Alert and then click OK.

    4. In the Target box, select MyMP.MyComputerRole1.

To add the parameter block

  1. On the Parameters tab, click Edit in external editor. This starts the external editor.

  2. Copy and paste the following XML code into the external editor. This is the parameter block for the Alert generic report.

    <ParameterBlock columns="6" xmlns="https://schemas.microsoft.com/mom/reporting/2007/ReportParameterSettings">
       <Controls>
          <Control type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.RelativeDateTimePicker" rowSpan="2" columnSpan="2">
             <ReportParameters>
                <ReportParameter name="TimeZone" binding="TimeZone">
                      <Prompt>Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.TimeZone</Prompt>
                </ReportParameter>
                <ReportParameter name="TimeZoneName" binding="TimeZoneName" />
                <ReportParameter name="StartDate_BaseType" binding="StartDate_BaseType" />
                <ReportParameter name="StartDate_BaseValue" binding="StartDate_BaseValue">
                   <Prompt>Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.StartDateTime</Prompt>
                </ReportParameter>
                <ReportParameter name="StartDate_OffsetType" binding="StartDate_OffsetType" />
                <ReportParameter name="StartDate_OffsetValue" binding="StartDate_OffsetValue" />
                <ReportParameter name="EndDate_BaseType" binding="EndDate_BaseType" />
                <ReportParameter name="EndDate_BaseValue" binding="EndDate_BaseValue">
                      <Prompt>Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.EndDateTime</Prompt>
                </ReportParameter>
                <ReportParameter name="EndDate_OffsetType" binding="EndDate_OffsetType" />
                <ReportParameter name="EndDate_OffsetValue" binding="EndDate_OffsetValue" />
             </ReportParameters>
          </Control>
          <Control type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.MonitoringObjectXmlPicker" rowSpan="2" columnSpan="3">
             <ReportParameters>
                <ReportParameter name="ObjectList">
                   <Prompt>Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.ObjectList</Prompt>
                </ReportParameter>
             <ReportParameter name="ManagementGroupId" binding="GroupList" />
          </ReportParameters>
       </Control>
       <Control type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.CheckedListBox" rowSpan="1" columnSpan="1">
       <ReportParameters>
                <ReportParameter name="Severity">
                      <Prompt>Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.AlertSeverity</Prompt>
                </ReportParameter>
          </ReportParameters>
          </Control>
          <Control type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.CheckedListBox" rowSpan="1" columnSpan="1">
             <ReportParameters>
                <ReportParameter name="Priority">
                      <Prompt>Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.AlertPriority</Prompt>
             </ReportParameter>
             </ReportParameters>
          </Control>
       </Controls>
    </ParameterBlock>
    
  3. Completely remove the element for the Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.RelativeDateTimePicker control.

  4. Completely remove the element for both of the Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.CheckedListBox controls.

  5. Add the following XML code to the Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.MonitoringObjectXmlPicker element after the </ReportParameters> line.

    <Properties>
       <Property name="ContextObjectBinding">
          <Value>Containment</Value>
       </Property>
       <Property name="TypeFilter">
          <Value>MyMP.MyComputerRole1</Value>
       </Property>
    </Properties>
    
  6. Verify that the final XML code resembles the following:

    <ParameterBlock xmlns="https://schemas.microsoft.com/mom/reporting/2007/ReportParameterSettings" columns="6">
       <Controls>
          <Control type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.MonitoringObjectXmlPicker" rowSpan="2" columnSpan="3">
             <ReportParameters>
                <ReportParameter name="ObjectList">
                   <Prompt>Microsoft.SystemCenter.DataWarehouse.Report.Library!Microsoft.SystemCenter.DataWarehouse.Report.ParameterPrompt.ObjectList</Prompt>
                </ReportParameter>
                <ReportParameter name="ManagementGroupId" binding="GroupList" />
             </ReportParameters>
             <Properties>
                <Property name="ContextObjectBinding">
                   <Value>Containment</Value>
                </Property>
                <Property name="TypeFilter">
                   <Value>MyMP.MyComputerRole1</Value>
                </Property>
             </Properties>
          </Control>
       </Controls>
    </ParameterBlock>
    
  7. Close the external editor and save the XML code back to the Authoring console.

To add the hardcoded parameters

  1. Use steps 2-7 to create each parameter for the table that follows:

    Parameter Name Parameter Value

    StartDate_BaseType

    FirstDayMonth

    StartDate_BaseValue

    01/01/2010 12:00:00 AM

    StartDate_OffsetType

    None

    StartDate_OffsetValue

    0

    EndDate_BaseType

    Today

    EndDate_BaseValue

    01/01/2010 12:00:00 AM

    EndDate_OffsetType

    None

    EndDate_OffsetValue

    0

    Severity

    1

    2

    Priority

    1

    2

  2. In the Parameters section of the Parameters tab, click Create, and then click Edit.

  3. In the Name box, type the Parameter Name.

  4. Click Create, and then click Edit.

  5. Clear the existing text and type the Parameter Value, and then click OK.

  6. If the parameter has multiple values, repeat the previous two steps for each value.

  7. Click OK.

To complete and save the linked report

  1. On the Options tab, change the Visible option to True.

  2. Click OK.

  3. Select File, and then click Save.

另請參閱

概念

Alert Reports
Common Parameters
Common Report Controls