docs.intersystems.com
Home  /  System Administration  /  Monitoring Guide  /  Monitoring InterSystems IRIS Using WMI


Monitoring Guide
Monitoring InterSystems IRIS Using WMI
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


Important:
WMI support is deprecated. InterSystems instead recommends the use of SNMP and the robust InterSystems IRIS SNMP interface (see the Monitoring InterSystems IRIS Using SNMP appendix of this guide) for monitoring InterSystems IRIS. See http://blog.intersystems.com/compatibility/2014/5 for more information.
Windows Management Instrumentation (WMI) is a feature of the Windows operating system that provides a standardized way of collecting management information. It allows users and programmers to access management information from the operating system and other applications in a variety of ways, including scripts, programming languages, and management tools and applications. WMI is the Microsoft implementation of the Web-based Enterprise Management (WBEM) standard from the Distributed Management Task Force (DMTF).
InterSystems IRIS implements several WMI classes of management information. It includes both an Instance provider to allow queries of performance and management data, and an Event provider which signals significant events or errors that may occur in InterSystems IRIS. See the Windows Management Instrumentation (WMI) section of the MSDN Library for a description of how to query WMI classes and how to receive WMI events.
The interface description includes the following topics:
Configuring WMI in InterSystems IRIS
To prepare the InterSystems IRIS environment for collecting WMI information, complete the following two tasks:
Enable Monitoring and WMI
To use WMI to collect information, you must enable WMI collection as well as enabling the monitoring service. From the Management Portal perform the following steps:
  1. Navigate to System > Configuration > Monitor Settings in the Management Portal.
  2. If the first line in the setting box indicates that the Monitor service is disabled, perform the following steps:
    1. Click Edit to display the Edit Service page for the %Service_Monitor service.
    2. Select the Service enabled check box and click Save, which returns you to the Monitor Settings page.
  3. Select Yes from the WMI Enabled list and click Save.
Compile WMI Classes
The IscProc.mof file defines the InterSystems WMI classes. The file is installed in the WMI subdirectory of the manager’s directory install-dir\Mgr (where install-dir is the installation directory your instance). The following example uses C:\MyIris as the installation directory.
This text file describes the InterSystems management classes in Managed Object Format (MOF). You must compile these classes into the WMI repository on your system before you can use them. From a Windows command prompt, use the mofcomp.exe Microsoft tool to compile the classes as shown in the following example:
C:\>cd c:\MyIris\mgr\WMI

C:\MyIris\Mgr\WMI>mofcomp IscProv.mof
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: IscProv.mof
MOF file has been successfully parsed
Storing data in the repository...
Done!

C:\MyIris\Mgr\WMI>
Using WMI with InterSystems IRIS
InterSystems IRIS stores its WMI classes in the root\cache namespace in the WMI repository. Once you compile these WMI classes and they are in the WMI repository, you can access the management information using scripts, programming languages, or management tools.
Using a basic tool such as WMI CIM Studio (available as part of the WMI Administrative Tools from Microsoft) you can browse through all the classes in the root\cache namespace, list all properties for each class, and view the help text for each class which includes descriptions of each property. You can also query the InterSystems IRIS system for all instances of each class, which displays the live data from a running instance.
The Cache_DatabaseSystem class enumerates all instances of InterSystems IRIS installed on the system (from the Windows Registry), and shows which ones are running and connected (EnabledState=2). Other classes only show data for WMI-enabled instances of InterSystems IRIS.
InterSystems IRIS also signals WMI events, which you can receive using scripts, programs, or management tools. The WMI Administrative Tools include a basic WMI Event Viewer. The Cache_Event class is defined as a subclass of the __ExtrinsicEvent class; you can view its properties by navigating the __SystemClass hierarchy using WMI CIM Studio. The WMI Events are the same events defined as SNMP Notifications. You can find the most current list by inspecting the ISC-CACHE.MIB file in the SNMP directory of your InterSystems IRIS installation. See the Monitoring InterSystems IRIS Using SNMP chapter of this guide for details.
The current events signaled by InterSystems IRIS include:
Event Description
cacheStart InterSystems IRIS instance startup
cacheStop InterSystems IRIS instance shutdown
cacheDBExpand Database expansion successful
cacheDBOutOfSpace Database expansion close to limit (not enough free space for 10 more expansions or less than 50 MB free space)
cacheDBStatusChange Database read/write status change
cacheDBWriteFail Database write failure
cacheWDStop Write daemon stalling
cacheWDPanic Write daemon entering panic mode
cacheLockTableFull Lock table full (out of memory)
cacheProcessFail InterSystems IRIS process access violation
cacheECPTroubleDSrv ECP data server connection in trouble mode
cacheECPTroubleASrv ECP application server connection in trouble mode
cacheAuditLost System unable to record audit events
cacheLoggedError Writing severe error to the console log
cacheLicenseExceed License request exceeds available or allowed licenses
cacheAppAlert Generating an application alert by calling the %Monitor.Alert.External method
There are additional events if you are using InterSystems IRIS. See Using WMI with InterSystems IRIS for details.
The iscprov.dll handles all communications between WMI and InterSystems IRIS and implements both the InterSystems IRIS WMI instance provider and event provider. The InterSystems IRIS installation registers the file and puts it in the C:\Program Files\Common Files\Intersystems\IRIS directory.
The WMI service loads the provider DLL when requests are made and may unload it after it has been idle for a period of time. When the DLL is loaded it initiates communication with InterSystems IRIS and starts a ^WMI server process in InterSystems IRIS. That server process is then terminated when the DLL is unloaded. Depending on how often your script or management application intends to collect information, you may want to change the default “lifetime” period for instance providers, which is only thirty seconds. Using the WMI CIM Studio from the \root namespace, expand the class hierarchy for __SystemClass, __CacheControl, and __ObjectProviderCacheControl. Change the value of the ClearAfter property to allow the InterSystems IRIS instance provider to remain loaded for a longer period.
InterSystems IRIS writes important messages from the ^WMI server process in the messages.log file. It also logs any errors that occur in the iscprov.dll (which implements the WMI Instance Provider and Event Provider for InterSystems IRIS) in the iscwmi.log file in the \WINDOWS\system32\WBEM\Logs\ directory.
Using WMI with InterSystems IRIS
InterSystems IRIS also stores its WMI classes in the root\cache namespace in the WMI repository. Once you compile the Ensemble WMI classes and they are in the WMI repository, you can manage them in the same manner as described in Using WMI with InterSystems IRIS.
The Ensemble_LogEvent class is defined as a subclass of the __ExtrinsicEvent class. InterSystems IRIS sends a WMI Ensemble_LogEvent instance whenever it posts an alert to the Event Log.
Generating a WMI Documentation Text File
You can generate a text file of the classes and properties that InterSystems provides for WMI by using the doc entry point of the InterSystems IRIS ^WMIMOF routine. For example:
 
%SYS>Do doc^WMIMOF
 
 
File: <IscProv.txt>
Press Enter to create the IscProv.txt file in the Mgr directory:
Creating doc file for WMI Classes ...
 
 ;;DatabaseSystem;;;;Cache;
 
 ;;CommonDatabase;;;;Cache;
 
 ;;SystemStatistics;Abstract;;;Cache;
 
 ;;DatabaseStatistics;;SystemStatistics;;Cache;
 
 ;;ECPClientStatistics;;SystemStatistics;;Cache;
 
 ;;ECPServerStatistics;;SystemStatistics;;Cache;
 
 ;;WriteDemonStatistics;;SystemStatistics;;Cache;
 
 ;;GlobalBufferStatistics;;SystemStatistics;;Cache;
 
 ;;ResourceSeizeStatistics;;SystemStatistics;;Cache;
 
 ;;ECPConnection;Abstract;;;Cache;
 
 ;;ECPServerConnection;;ECPConnection;;Cache;
 
 ;;ECPClientConnection;;ECPConnection;;Cache;
 
 ;;ECPServerConnectionStats;;;;Cache;
 
 ;;ShadowJournal;Abstract;;;Cache;
 
 ;;ShadowSourceConn;;ShadowJournal;;Cache;
 
 ;;ShadowDestServer;;ShadowJournal;;Cache;
 
 ;;Event;;__ExtrinsicEvent;;Cache
 
 ;;LogEvent;;__ExtrinsicEvent;WMIMOF3;Ensemble
 
 ;;Production;;;WMIMOF3;InterSystems IRIS;
 
 ;;EventLog;;;WMIMOF3;InterSystems IRIS;
 
%SYS>