6.1

Table Of Contents
By default, auto-discovered service names are composed using the hosting-server name, configuration
properties, and service type name.
"myhost Sun JVM 1.5 localhost /jsp-examples WebApp String Cache"
The naming can be overridden using the AUTOINVENTORY_NAME property.
<property name="AUTOINVENTORY_NAME"
value="%platform.name% %path% Tomcat WebApp String Cache"/>
Configuration properties from the platform, hosting server, and the service itself can be used in the
%eplacement% strings, resulting in a name such as follows,
"myhost /jsp-examples Tomcat WebApp String Cache"
Discovering Custom Properties
Discovery of custom properties is supported using OBJECT_NAME and MBeanServer.getAttribute.
Define a properties tag with any number of property tags, where the name attribute value is that of an
MBean attribute
<properties>
<property name="cacheMaxSize"
description="Maximum Cache Size"/>
</properties>
which maps to the following MBean interface method.
public interface WebAppCacheMBean {
public int getCacheMaxSize();
}
Running and Testing Plug-ins from the Command Line
You can run plug-ins from a command line prompt, which you might find useful when documenting or
testing your plug-in.
You can test the syntax of a plug-in and invoke any management function that the plug-in supports.
Management functions that can be invoked include the following:
Function Description
Auto-discovery Run the discovery function for one or all plug-ins in the agent's plug-in directory.
Control Run a plug-in control action on a resource.
Metric collection Collect metrics for a resource.
Event Tracking Watch for log or configuration change events for a resource.
Fetch live system data Run supported system commands to obtain CPU, filesystem, and other system data.
Documentation generation functions that can be invoked include the following:
Function Description
Help
Output the configuration help specified in the plug-in <help>descriptor element for each
resource type, for one or all plug-ins.
Metric documentation Output metric documentation for each resource type, for one or all plug-ins.
Chapter 1 Introduction to Plug-in Development
VMware, Inc. 25