本文件已封存並已停止維護。

How to Create a Linked Event Report

更新日期: 2010年7月

適用於: System Center Operations Manager 2007

The following procedure shows how to create an Event 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 day of the current week. The date controls are not presented to the user.

  • Only includes events with a Level equal to Error and a Publisher that contains Health Service. The Report Fields checklist box is not presented to the user.

  • Includes the following fields in the report:

    • Event ID

    • Channel

    • Publisher

    • Object

    • Logging Computer

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

  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.MyEventReport and then click OK.

  4. On the General tab, do the following:

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

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

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

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

  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 Custom Event generic report.

    <ParameterBlock columns="7" xmlns="http://schemas.microsoft.com/mom/reporting/2007/ReportParameterSettings">
       <Controls>
          <Control rowSpan="4" columnSpan="2" type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.RelativeDateTimePicker">
             <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 rowSpan="4" columnSpan="3" type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.MonitoringObjectXmlPicker">
             <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 columnSpan="2" rowSpan="4" type="Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.ReportColumnPicker">
             <ReportParameters>
                <ReportParameter name="Columns" />
                <ReportParameter name="ColumnList" binding="ColumnList" />
             </ReportParameters>
          </Control>
       </Controls>
    </ParameterBlock>
    
  3. Completely remove the element for the Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.RelativeDateTimePicker control.

  4. Completely remove the element for the Microsoft.SystemCenter.DataWarehouse.Report.ParameterControl.ReportColumnPicker control.

  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:

  7. Close the external editor and save the XML code back to the Authoring console.

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

     

    Parameter Name Parameter Value

    StartDate_BaseType

    Sunday

    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

    Columns

    <Data>
       <Columns>
          <Column Visible="True">
             <ID>EventDisplayNumber</ID>
          </Column>
          <Column Visible="False">
             <ID>EventLevelTitle</ID>
             <Filter Type="Equals">Error</Filter>
          </Column>
          <Column Visible="True">
             <ID>EventChannelTitle</ID>
          </Column>
          <Column Visible="True">
             <ID>EventPublisherName</ID>
             <Filter Type="Contains">Health Service</Filter>
          </Column>
          <Column Visible="True">
             <ID>ManagedEntityDefaultName</ID>
          </Column>
          <Column Visible="True">
             <ID>ComputerName</ID>
          </Column>
          <Column Visible="True">
             <ID>Parameter1</ID>
          </Column>
       </Columns>
    </Data>
    
  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.

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

  2. Click OK.

  3. Select File, and then click Save.

顯示: