Users should able to use the Strategy Web API SDK to connect to, turn on and off, and obtain performance counter data from the Strategy Intelligence Server 9.x and 10.x. To do this, users must use the PerformanceMonitorManager and PerformanceMonitorInstance as shown below:
Java
WebObjectsFactory wof = WebObjectsFactory.getInstance();
WebIServerSession wiss = wof.getIServerSession();
PerformanceMonitorManager perfmm = PerformanceMonitorManager.getInstance();
PerformanceMonitorInstance perfmi = perfmm.getMonitorInstance(hostname, wiss);
Users can use the setMonitoringFrequency() method for the performance monitor manager interface to set the frequency with which the monitored counters are updated:
Java
perfmm.setMonitoringFrequency(tempfreq);
When using the performance monitor interface, the Categories interface exposes individual categories such as "Strategy Server Users" that represent the top level groupings of the performance counters. Users may obtain a collection of the available categories from the performance monitor interface using the getAvailableCategories() method:
Java
Categories categoryavailable = perfmi.getAvailableCategories();
Category selectedcategory = categoryavailable.get(i);
The Instance interface of a category represents the specific instances of the counters that can be turned on. In most cases the only instance is the "CastorServer" instance. The instance may also be blank (unnamed):
Java
Instance tempInstance = selectedcategory.get(i);
The Counter interface represents the individual counters available for monitoring on the Intelligence Server. Users should note that some of the "Strategy Intelligence Server Profiler" category counters may not be available on Intelligence Server startup. Such counters as "XML_GENERATION Total time" are only created and loaded when a report or document is run on the Intelligence Server. Users may use the startMonitoring() method of the performance instance to set the counter to be monitored.
Java
Counter tempCounter = tempInstance.get(i);
perfmi.startMonitoring(tempCounter)
To check if the performance manager instance interface is active users can use the isActive() method:
Java
perfmi.isActive()
To turn on the actual monitoring of the monitored categories, users should use the setIsActive() method:
Java
perfmi.setIsActive(true);
Users can get the CounterData interface from the counters to obtain the latest values as returned from the Intelligence Server. Users requiring additional information should refer to the Strategy SDK documentation for a detailed understanding of the various interfaces exposed by the Web API SDK.
Note:
The examples provided in this document is provided “as-is” to the user and assumes that the user:
ADDITIONAL INFORMATION:
The Strategy SDK allows you to customize the standard Strategy Web interface, and extend and integrate the Strategy business intelligence functionality into other applications. However, before changing the way Strategy Web products look or behave, it is helpful to understand how the application is built. For more information regarding the Strategy Web architecture or the process of customizing Strategy Web, please refer to Strategy Developer Zone (https://resource.microstrategy.com/msdz/).
To access the Strategy Developer Zone, you must have access to the Strategy Knowledge Base, you must have purchased the Strategy SDK, and you must be current on your Strategy maintenance agreement. If you are a US-based business and believe that you satisfy all three of these conditions but you do not have access to the Strategy Developer Zone, please contact Strategy Technical Support at support@microstrategy.com or at (703) 848-8700. If you are an international business, please contact Strategy Technical Support at the appropriate email address or phone number found at http://www.microstrategy.com/Support/ContactUs.asp.
CUSTOMIZATION WARNING:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.