9.6.2. Creating a monitoring server query

With the Query editor you can create your own queries to the monitoring server and add a prefilter composed in the same way as a postfilter for a table or chart view. Additionally, you can add a column function to average, count, total, or find the minimum or maximum value of a column and group the results accordingly.

Use the following procedure to create a monitoring server query.

1.Click  Queries located in the toolbar.

2.On the left side of the window, click the plus sign (+) to expand Windows(R) OS and scroll down to NT Process and expand it to see the queries.

3.Select Top Process CPU time and click  to create another query.

4.In the Name field, type VirtualKbytes Peak and click OK.

A duplicate of the original query is displayed with the name you entered.

A name can have a maximum of 32 letters, numbers, underscores (_) and spaces.

5.In the Description field, type a new description, Total CPU time.

You have up to 256 characters and spaces in this field.

6.Edit the specification for any changes you want to make:

Click Add Attributes and select the Virtual Kbytes Peak attribute. Click OK. The attributes available are from the group used in the original query.

Add filter criteria by clicking in the Virtual Kbytes Peak (you might want to shift the horizontal scroll bar to the right to see this column) and writing an expression. Click the equal sign (=) to choose your operator.

EQ $NODE$ (or any name enclosed in dollar signs) is a required filter; you must not delete it.

Clear the filter criteria by right-clicking the cell, column or row and selecting Clear Contents.

Add a column function by clicking in the column heading and selecting a function from the list; then click Advanced. Select the column to Group By.

Specify a sort order by clicking Advanced, and selecting the column to Sort By.

Note:

If you selected a Group By column, you cannot specify a sort order.

Specify the exact number of rows to show in the view by clicking Advanced and selecting First to retrieve.

7.Click Apply to save the query and keep the editor open.

8.Click OK to save the query and close the window.

Note:

The attributes in a query can be from one group only; you cannot mix attributes from different groups in the same query.

9.6.2.1. Creating a query for an ODBC database

The Query editor has a text editor for composing free-form SQL queries to any ODBC-compliant data source located on the machine where your Tivoli Enterprise Portal Server is installed. You can integrate systems management data from monitoring agents with data from other sources in one workspace.

Use the following steps to create a query of ODBC database attributes:

1.Click  Queries located in the toolbar.

2.Click , located in the upper left hand corner of the Query Editor window, to create a query.

3.In the Name field, type a name of up to 32 letters, numbers, underscores (_) and spaces.

4.In the Description field, type a new description, up to 256 characters and spaces, in the Query Editor window.

5.From the Category list, select the folder where you want the new query to be displayed in the Queries tree. In this case, select AF/REMOTE(R) Agent.

6.Select the TEMS as the type in the Data Sources list.

7.Select Custom SQL.

8.Click OK.

The new query is displayed in the Queries tree under AF/REMOTE Agent. The Specification tab opens with a Custom SQL text box for you to enter a SELECT statement. You must be familiar with SQL commands and their syntax to write an SQL query.

9.Write the SQL statement in the text box using the proper syntax.

See the Tivoli Enterprise Portal help for examples.

10.When you are finished writing the SQL text, click Apply to save the query and keep the window open, or click OK to save the query and close the window.