Windows Management Instrumentation (WMI) is a core Windows management technology used to instrument Windows operating systems and Windows applications. Instrumentation refers to the ability to access a particular piece of software that has exposed a public interface (WMI) to request information about its configuration.
WMI is implemented as a scripting language and can manage both local and remote computers. The RTView WMI data adapter allows you to enter these WMI scripts to query information from various Microsoft software applications or operating systems, such as:
§ Infrastructure metrics (e.g. percent CPU usage, memory usage, file system space, etc.)
§ Windows event logs (on both local and remote computers)
§ Applications installed (on both local and remote computers)
§ SQL Server Events, availability, status and configuration
§ Microsoft Exchange servers
§ Microsoft IIS web servers
Most all Microsoft operating systems and applications are instrumented with WMI. Additionally, custom built applications can be instrumented with WMI to provide application performance statistics that can be easily consumed by monitoring systems like RTView.
This section includes:
§ “WMI System Requirements and Setup” on page 797
§ “Attach to WMI Data” on page 798
§ “Application Options - WMI” on page 802
§ “RTView Deployment - WMI” on page 805
WMI System Requirements and Setup
In addition to basic “System Requirements”, the WMI data adapter requires .NET Runtime. See the README_sysreq.txt file in your installation’s home directory for the version(s) and platforms supported.
Note: WMI is a Windows-based technology. Therefore, the WMI data adapter can only run on Windows OS and only retrieve information from other Windows-based systems with correctly configured WMI installations.
In addition to basic environment variables (see “Setup”), this data source requires additional setup. Please refer to the Microsoft Developer Network Library for information on connecting to WMI on a remote computer.
Note: You must have local Administrator rights on the remote computer you are attempting to query.
Connection failures are indicated by RTView when you receive the following types of errors:
0x80070005 (DCOM ACCESS_DENIED)
0x800706BA (RPC Server Unavailable – CheckFirewall)
One of the most common causes of connection failure (in Windows XP SP3) is that Simple File Sharing is enabled by default and needs to be turned off.
It is also important to note that firewalls and/or antivirus software may interpret WMI queries as an attack.
Please refer to the Microsoft Developer Network Library if you cannot connect to a remote computer or require additional assistance troubleshooting problems with WMI scripts and the WMI service.
Note: The WMI data source may not be licensed in your RTView installation.
From the Object Properties window you can access the Attach to WMI Data dialog, which is used to construct a WQL (WMI Query Language) Query to search the Namespace in the specified Connection and filter the results.
Right-click on the Property Name from the Object Properties window and select Attach to Data>WMI to display the Attach to WMI Data dialog. The Attach to WMI Data dialog provides several drop down menus that allow you to specify information. If the drop down menu does not contain the item you require, type your selection into the text field.
Field Name |
Description |
Connection |
Connection name. You must define a connection on the “WMI Connections Tab” of the Application Options dialog. Enter * to query all defined WMI connections. |
Namespace |
WMI Namespace to search. Default is root\CIMV2. |
WQL Query |
Enter a WQL Query statement. See “WQL Query Statements”. |
Column(s) |
Select which columns to display. To bring up the “Select Column(s)” dialog, click on the ellipses button |
Filter Column |
Name of the column to use as a filter. Multiple column names should be entered as a semicolon (;) delimited list (i.e. col1;col2;col 3). If your column name contains a space or a semicolon, then the entire name must be enclosed in single quotes. |
Filter Rows |
Check box to indicate whether or not to filter rows. |
Filter Value |
Value that the Filter Column must equal. Multiple filter values should be entered as a nested list, where values for a given column are separated by commas within a semicolon (;) delimited list (i.e. val1,val2;val3,val4;val5,val6). If your filter value contains a space or a semicolon, then the entire value must be enclosed in single quotes. When * is entered as a filter field value, data for all values in the specified filter column will be used to update the object property. When "*" is entered, only the literal comparative value will be used. These are only allowed for objects which display tabular data. |
Update Mode |
Specify which mode to use to update your WMI connection: Every Default Poll Interval - Update connection each Default Poll Interval. See “Application Options - WMI” for information on setting the Default Poll Interval. This is the default Update Mode. Every Poll Interval - Update connection each Poll Interval. If this option is selected, you must specify a Poll Interval. Poll On Demand - Update connection each time a display that uses this data attachment is opened and each time a substitution string that appears in the data attachment has changed. |
Poll Interval |
Specify the interval (in seconds) to update your WMI connection. This option is only available if the Update Mode selected is Every Poll Interval. Note: Because the Poll Interval is superseded by the General Update Period, the amount of time elapsed between updates may be longer than the value entered. For example, if the General Update Period is 2 seconds and the Poll Interval is 5 seconds, the connection will be updated every six seconds. See “Application Options - WMI” for more information. |
Data Server |
Select to read data through your configured Data Server and not directly from the WMI data source. Default - Select the default Data Server you configured in Application Options>“Data Server Tab” None - Bypass data being redirected through the specified data server(s) for this attachment and instead attach directly to the data source. Named Data Servers - Select a Named Data Server that you configured in Application Options>“Data Server Tab”. Multi-Server Attachment - To configure multiple data servers, enter a semicolon (;) delimited list containing two or more Named Data Servers (e.g. ds101;ds102). Each name specified must correspond with a Named Data Server that you configured in Application Options>“Data Server Tab”. It is also possible to specify __default and __none (e.g. __default;ds101;ds102). Note: The values __default and __none begin with two underscore characters. |
|
Alternatively, a value of * can be entered to specify all data servers, including __default and __none. When multiple data servers are specified, the data attachment will be directed to each data server in the list. For tabular data attachments, a column named DataServerName will be added as the first column of the table and contain the name of the server from which the data was received. |
|
A multi-server attachment will receive data independently from each of the servers it specifies, so in most cases it will be necessary to combine the tables received into a single table. This can be accomplished in two ways: 1. The multi-server attachment can be applied to a local cache that has the DataServerName column specified as an index column. The current table of that cache will contain the combination of the tables received from all servers. Note: It may also be necessary to configure cache row expiration settings to remove defunct rows. 2. The multi-server attachment can be applied as the Table argument of the RTView function named Combine Multi-Server Tables. See “Tabular Functions” for more information. |
When an object property has been attached to data, the Property Name and Value in the Object Properties window will be displayed in green. This indicates that editing values from the Object Properties window is no longer possible. To remove the data attachment and resume editing capabilities in the Object Properties window, right-click on the Property Name and select Detach from Data. You will recognize that an object property has been detached from the data source when the Property Name and Value are no longer green.
Fields in the dialog change colors according to the information entered. These colors indicate whether or not information is valid. Information entered into the dialog is validated against the selected server.
Note: Filters are not validated.
Blue |
Unknown |
Cannot validate entry. |
White |
Valid state |
Entry is valid. |
Red |
Invalid state |
Incomplete or invalid entry. |
The Substitutions feature allows you to build open-ended displays in which data attachments depend on values defined at the time the display is run. A generic connection such as $conn is used instead of a specific connection. Later when the display is running, this generic value is defined by the actual name of a specific connection, such as LOCALHOST. In this way, a single display can be reused to show data from a number of different sources. Substitutions can be used in any field in this dialog. For more information on creating displays using substitution values, see “Substitutions”.
From the Attach to Data dialog you can specify which columns to search, as well as which columns to display in your resulting data and in what order they will appear. To view the list of Available Column(s), click on the ellipses button to open the Select Column(s) dialog.
To add a column, select an item from the Available Column(s) list and click on the Add button. If the item you require is not listed, type your selection into the Enter Column field. Click the Remove button to delete an item previously added to the Selected Column(s) list. You can control the order of fields in a table by arranging the items in the Selected Column(s) list with the Move Up and Move Down buttons.
Validation colors indicate whether selected columns are valid. However if even one column selected is invalid, the Column(s) field in the Attach to WMI Data dialog will register as an invalid entry.
If no data is available for a table row within a selected column, the table cell will display one of the following values: N/A, false, 0, or 0.0.
The following describes Attach to WMI Data dialog commands:
Command |
Description |
OK |
Applies values and closes the dialog. |
Apply |
Applies values without closing the dialog. |
Reset |
Resets all fields to last values applied. |
Clear |
Clears all fields. Detaches object from data source (once Apply or OK is selected). |
Cancel |
Closes the dialog with last values applied. |
Consult the following reference materials in the Microsoft Developer Network Library for information about WMI and how to properly construct query statements with WQL (WMI Query Language).
Root Link for WMI. |
|
Contains topics that discuss the core features of WMI. |
|
Root Link for WQL. |
|
Complete list of supported WQL keywords. NOTE: Using SQL keywords for object or property names may restrict a query from being parsed. The following SQL keywords are restricted: NULL, TRUE, and FALSE. |
|
The WMI Query Language (WQL) is a subset of Structured Query Language (SQL) with minor semantic changes to support WMI. |
|
SELECT statements can be basic or more restrictive to narrow the result set that is returned from the query. |
Select Tools>Options in the Display Builder to access the Application Options dialog.
Options specified in the WMI Connections tab can be saved in an initialization file (WMIOPTIONS.ini). On startup, the initialization file is read by the Display Builder, Display Viewer, Display Server, Data Server, and Historian to set initial values. If no directory has been specified for your initialization files and WMIOPTIONS.ini is not found in the directory where you started the application, then RTView will search under lib in your installation directory. See “RTV_JAVAOPTS” for more information.
This tab allows you to add or remove connections and set your default connection.
When you add a WMI connection to the list it will be highlighted in yellow indicating that RTView has not connected to it. To attempt to connect to a WMI connection, click OK, Apply, or Save. If the background remains yellow, then RTView was unable make a connection. Check that your WMI connection was setup correctly and that the referenced computer is running and accessible from your location.
Note: Regardless of which tab you are currently working from in the Application Options dialog, RTView will attempt to connect to all unconnected connections each time you click OK, Apply, or Save.
Field Name |
Description |
Default Connection |
Name of connection used as the default for data attachments. Select from drop down menu to change default setting. |
Add Connection |
Click to open the Add WMI Connection dialog. To edit, select a connection from the list and double-click. Connections that are updating objects in a current display cannot be renamed. If you do not enter a Domain, User Name and/or Password, the values of the current account on the specified Computer will be used. ![]()
Connection Name - Name to use when referencing this WMI connection in your data attachments. This should be a unique name used to identify this connection. Computer - Machine name or IP address. |
|
Domain - Domain name. User Name - User name for this WMI connection. Password - Password for this WMI connection. If you need to provide an encrypted password (rather than expose server password names in a clear text file, use the encode_string command line option with the following syntax: encode_string type mypassword where type is the key for the data source and mypassword is your plain text password. Note: The type argument is only required when you encrypt a string for a data source. For example, enter the following in an initialized command window (see “Initializing a Command Prompt or Terminal Window”): encode_string wmi mypassword and you will receive an encrypted password: encrypted value: 013430135501346013310134901353013450134801334 Copy the encrypted value, paste it into the password field and click Save to save this value to the initialization (*.ini) file. Or, if necessary, manually edit the (*.ini) file to include the encrypted value. Note: If you need to manually edit a configuration (*.ini) file, contact SL Technical Support at support@sl.com for information about supported syntax. |
Remove Connection |
Select a connection from the list and click Remove Connection to delete. Connections that are updating objects in a current display cannot be removed. |
This tab allows you to set a Default Poll Interval to update your WMI connection.
Field Name |
Description |
Default Poll Interval |
Enter the time in seconds to control how often your WMI connection is updated or operations in data attachments are executed if no Poll Interval is specified in the data attachment. Default is 0, which updates connections and operations according to the General Update Period specified in Application Options on the General tab. |
Note: Because the Default Poll Interval is superseded by the General Update Period, the amount of time elapsed between updates may be longer than the value entered. For example, if the General Update Period is 2 seconds and the Default Poll Interval is 5 seconds, the connection will be updated every six seconds. See Application Options>“General Tab” for more information.
This section contains details about the deployment process that are specific to your data source. Please go to the Deployment section of this documentation for instructions on how to implement your RTView deployment option. Return to this section whenever you are instructed to refer to deployment information that is specific to your data source.
The WMI data source has additional System Requirements and Setup. See “WMI System Requirements and Setup” for more information.
Data Source Configuration File
RTView saves general application settings as well as data source configuration options in initialization files that are read at startup. If no directory has been specified for your initialization files and files are not found in the directory where you started the application, then RTView will search under lib in your installation directory. See “Application Options”, “Application Options - WMI”, and “RTV_JAVAOPTS” for more information.
Include the following initialization file when you deploy RTView with this data source:
File Name |
Description |
WMIOPTIONS.ini |
Contains data source options for WMI. |
Note: Options specified using command line and applet parameters override values set in these initialization files.
Rich Client Browser Deployment Setup for Direct Data Connection
This deployment is supported by your data source.
Note: Due to the fact that the WMI data source uses native code, a direct data connection will require the appropriate security settings and jar signings.