Microsoft Systems Management Server 2003 : Analysis and Troubleshooting Tools - Working with Status Message Queries
The SMS development team, being one step ahead of the rest of us in this thinking, created status message queries as a means of accomplishing just that. In fact, there are currently 70 existing default queries that might well satisfy most of your message viewing needs. These queries are listed in the Status Message Queries window, shown in Figure 1. In the SMS Administrator Console, navigate to the System Status node and expand it, then select he Status Message Queries node to display this window. For example, the query highlighted in Figure 1 will generate a list of all SMS clients on which the Hardware Inventory Agent reported some problem when trying to generate the Management Information Format (MIF) file needed to report the client’s hardware information to the site database. Running a query of this type is certainly easier than scanning for the error status message for every client reporting messages to the Component Status Summarizer.
Figure 1. The Status Message Queries window.
Most of these default queries are prompted—meaning that you must provide information such as a site code, the server name, and so on. To execute a status message query, right-click the query in the Status Message Queries window and choose Show Messages from the context window. Any values that need to be resolved are listed, and you must enter the information or values requested.
You can also create your own status message queries. To do so, follow these steps:
1. | Right-click
Status Message Queries, choose New from the context menu, and choose
Status Message Query to display the Status Message Query Properties
dialog box, as shown in Figure 2.Figure 2. The Status Message Query Properties dialog box. |
2. | Enter a descriptive name for your query and a comment that further explains the query’s purpose. |
3. | Click
the Import Query Statement button to display the Browse Query dialog
box that lists all the available status message queries, as shown in Figure 3. Select the query you would like to import into your new query and click OK.Figure 3. The Browse Query dialog box. |
4. | Click
the Edit Query Statement button to display the Query Statement
Properties dialog box. In this dialog box, you can modify the
properties of the query you imported in step 3. If you did not import
an existing query, then here you can create your own new query. By default, a status message query displays only status messages in its results list; thus all the options in the General tab are unavailable, as shown in Figure 4. Figure 4. The General Tab of the Query Statement Properties dialog box. |
5. | Select
the Criteria tab to create or modify the query statement. Any existing
query statements are displayed in the Criteria list, as seen in Figure 5.Figure 5. The Criteria tab of the Query Statement Properties dialog box. |
6. | Click
the New button (yellow star) to add a new criteria statement or
highlight an existing criteria statement and click the Edit button
(hand holding paper) to display the Criterion Properties dialog box, as
shown in Figure 6.Figure 6. The Criterion Properties dialog box. |
7. | Select
the criterion type (in most cases, this will be Simple Value) from the
drop-down list and specify the attribute class and the attribute by
clicking the Select button to display the Select Attribute dialog box
shown in Figure 7.
The attributes describe an SMS object type and are grouped into one or
more attribute classes. In this example the attribute class Status
Message consists of attributes that include component, machine name,
severity, and site code, any of which can be used to qualify the
results of the query. Select an appropriate Attribute Class and
Attribute and then click OK to go back to the Criterion Properties
dialog box. Next, specify an operator by choosing one from the
drop-down list. Click the Values button to display all the values
related to the attribute you selected that have been recorded in the
SMS database. Then Click OK.Figure 7. The Select Attributes dialog box. |
8. | To
add criteria to your query, repeat steps 6 and 7 for each additional
criteria statement. When you’ve finished, click OK twice to save your
query. |
The new status message query is now available in the Status Message Queries window. Figure 8 shows the results of running our sample query by right-clicking the sample query and choosing Show Messages from the context menu. Notice that the result of the query is to display the message “This Component Started” for every component on the site server.