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

Task Status View

更新日期: 2010年7月

適用於: System Center Operations Manager 2007

Task status views in System Center Operations Manager 2007 provide a listing of task status events that are generated when you try to run a task.

Contents

The contents of a task status view are determined by the following.

Target

All task status views must specify a target class. A task status view will list the status events of all tasks targeted at the target class or any classes hosted by the target class. All instances of the target class in the management group will be included unless criteria or a group is specified to limit the instance displayed. All task status events associated with these objects will be included unless you specify criteria to limit them.

Group

If a group is specified, only task status events associated with instances of the target class in the group are included in the view. Even though the group may contain objects of different classes, only task status events from instances of the target class are displayed.

note附註
If Entity is used for the target class, all objects in the group are included in the view. This is because all classes inherit from Entity.

Criteria

A task status view does not require criteria. When provided, criteria limit the included events according to the values of one or more properties. You can add and configure criteria by opening the external editor from the Authoring console or by using the dialog box in the Operations console. The properties that you can use in criteria are provided in the following table with a sample of the XML code in the view definition.

 

Condition Description Example

Tasks

One or more tasks to include.

<TaskList>
   <Task>$MPElement[Name='MyMP.MyTask']$</Task>
</TaskList>

Submitted By

User account of the person who submitted the task.

<SubmittedBy>CONTOS\NancyA</SubmittedBy>

Run As account

Run as account that was used when the task was run.

<RunningAs>CONTOSO\NancyA</RunningAs>

Status List

One or more values matching the status returned by the task. Valid values are as follows:

  • Scheduled

  • Started

  • Succeeded

  • Failed

<StatusList>
   <Status>Succeeded</Status>
   <Status>Failed</Status>
</StatusList>

Output

Text in the output of the task.

<Output>output</Output>

Scheduled to Run

The time that the task was scheduled to run. A time range or a relative duration from the current time can be specified. If a relative time is used, the WithinLast node requires a Unit attribute. The possible values for this attribute are as follows:

  • Second

  • Minute

  • Hour

  • Day

<TimeScheduled>
   <Range>
      <After>2010-05-16T12:00:00</After>
      <Before>2010-05-27T18:00:00</Before>
   </Range>
</TimeScheduled>
<TimeScheduled>
   <WithinLast Unit="Hour">2</WithinLast>
</TimeScheduled>

Started Running

The time that the task started running. A time range or a relative duration from the current time can be specified. If a relative time is used, the WithinLast node requires a Unit attribute. The possible values for this attribute are as follows:

  • Second

  • Minute

  • Hour

  • Day

<TimeStarted>
   <Range>
      <After>2010-05-16T12:00:00</After>
      <Before>2010-05-27T18:00:00</Before>
   </Range>
</TimeStarted>
<TimeStarted>
   <WithinLast Unit="Hour">2</WithinLast>
</TimeStarted>

Last Modified

The time that the task was last modified. A time range or a relative duration from the current time can be specified. If a relative time is used, the WithinLast node requires a Unit attribute. The possible values for this attribute are as follows:

  • Second

  • Minute

  • Hour

  • Day

<LastModified>
   <Range>
      <After>2010-05-16T12:00:00</After>
      <Before>2010-05-27T18:00:00</Before>
   </Range>
</LastModified>
<LastModified>
   <WithinLast Unit="Hour">2</WithinLast>
</LastModified>

Columns

Each column in a task status view is defined by using a ColumnInfo node in the Presentation node of the view. The XML of an example column definition is shown here:

<ColumnInfo Index="0" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="false" Visible="true" SortOrder="Ascending">
   <Name>Status</Name>
   <Id>Status</Id>
</ColumnInfo>

The content of each column is determined by its ID value with the title of the column defined by the Name. The possible contents of a state view are identified in the following table:

 

Column ID Description

Status

Status

Status from running the task

Task Name

DisplayName

Name of the task

Schedule Time

TimeScheduled

Time that the task was scheduled

Submitted By

SubmittedBy

Name of the user who submitted the task

Run As

RunningAs

Run as account that is used when the task was run

Run Location

LocationName

Name of the computer that the task was run on

Task Target Class

TargetedType

Name of the target class for the task

Category

Category

Category of the task

Task Description

Description

Description of the task

The order of the columns can be specified by using the dialog box in the Operations console. This corresponds to the Index attribute in the XML for the column.

If no columns are specified for the view, by default, the following columns are displayed:

  • Status

  • Task Name

  • Schedule Time

  • Submitted By

  • Run Location

Formatting

You can format a task status view by modifying the attributes of each column definition. You do this by opening the external editor from the Authoring console or with the dialog box in the Operations console. The different characteristics each column and their corresponding attributes are listed in the following table:

 

Characteristic Description

Column Order

Specify the order of columns by using the Index attribute for the column. This can also be performed by using the Display tab in the Properties dialog box for the view in the Operations console.

Column Width

Each column has a width attribute defining the width of the column in pixels. The column width in the dialog box will be used the first time that you open the Operations console. If you change the width in the Operations console, the new settings will be saved on the local workstation. You cannot guarantee that the column width in the management pack is retained on any workstation.

Column Visibility

Each column has a Visible attribute that defines whether the column will be visible in the Operations console. When a column should not be displayed, that column should still be included in the view by setting the Visible attribute to false. A column that is not included in the view is not available as an option for the user to add the column to the view in the Operations console. Therefore, all columns are typically included in the view and the visibility of the columns that should not be displayed is set to false.

Sorting

The status events listed in a task status view can be sorted by any of the included columns. The sorting configuration in the dialog box is used the first time that you open the Operations console. If you change the sort order in the Operations console, the new settings will be saved on the local workstation. You cannot guarantee that the sort order in the management pack is retained on any workstation.

The dialog box in the Operations console allows for the view to be sorted by a single column. Sorting may be performed on multiple columns by modifying the XML of the view. You can do this by changing the value of the Sorted attribute of the column entry to true. The SortIndex attribute defines the order that the columns will be sorted, and its value must be changed to a value of 0 or more. The SortOrder attribute must be either Ascending or Descending, depending on the preferred sort order for the column.

Grouping

Task status views can be grouped by any of the included columns. The Operations console dialog box allows for up to three fields that can be used for grouping, but any number may be used when you edit the XML. To use a column for grouping, change the value of its Grouped attribute to true. The SortIndex attribute is used to determine the order for the grouping of multiple columns and must be changed to a value more than 0.

顯示: