Advanced Customization > Services and Infrastructure Customization > System Configuration Collector Plugin > Creating a System Configuration Collector Plugin
  
Creating a System Configuration Collector Plugin
You want to create a new plugin for use with the System Configuration Collector UI in Windchill that will perform some function that the available plugin lack. The plugin will likely assist you in debugging Windchill configuration, installation and runtime issues.
Background
The System Configuration Collector is a Windchill UI page, currently accessed via the UI navigation path of Site > Utilities > System Configuration Collector when logged into Windchill as a user from the system administrators LDAP group. The UI provides functionality that system administrators can use to collect, save and also send Windchill system and configuration information to both local system and remote systems, including PTC Technical Support.
The directive of the System Configuration Collector is one that allows a user to gather as much appropriate information at one time regarding a Windchill system. The information collected is targeted to consumers who can then more readily use the information to diagnose any potential system and/or configuration issue with the Windchill instance.
On the System Configuration Collector page the system administrator can select categories of problems, such as Performance and/or Runtime related issues. A number of corresponding plugins will then execute. The list of plugins that will execute can be seen by expanding each respective category root tree node on the UI. Each plugin collects a discrete set of about the current Windchill system and configuration. For example, some plugins collect information such as Windchill Method Server logs, xconf properties files, JMX Mbean configuration information and database information.
The plugins are the discrete means to accomplish a task for the System Configuration Collector categories. These plugins can be designed to accomplish any task that can be done through Java, including executing SQL and QML scripts, java command utilities (those which include a main() method) and Windchill Windu tasks.
The plugins comprise a set of software operations for one or more categories that adds specific capabilities to the System Configuration Collector. The System Configuration Collector was designed using plugin architecture such that the functionality provided could be customized by PTC R&D, PTC Global Services, PTC Technical Support and PTC customers. The plugin architecture is one that allows a developer to extend and add new functionality to the System Configuration Collector on a live Windchill system. Therefore, there is no need to restart the Windchill servers for the new plugin to be recognized by the System Configuration Collector. The plugin architecture allows for immediate use of the developed plugin.
Due to the plugin architecture and ability of a plugin to operate against other Java systems, databases, WinDu tasks, scripts, etc, a System Configuration Collector plugin is a very powerful piece of functionality.
A Plugin is also a JMX Management Bean (MBean). This allows for the management of plugins via a JMX console such as those delivered with Windchill; JConsole and VisualVM. Using the MBean interface allows for a means to more easily manage and deploy plugins.
For more information regarding the System Configuration Collector and its uses see System Configuration Collector.
For more information regarding JMX MBeans see Windchill MBeans.
Scope/Applicability/Assumptions
The scope is restricted to the System Configuration Collector UI page and creating plugins that operate on that page.
Assume you have an issue with a Windchill system that you must diagnose and no current plugin provides the functionality you need to assist you in diagnosing the issue.
Assume you want to extend the functionality of an existing plugin.
Intended Outcome
Once a plugin is properly designed, created and deployed in Windchill it can be immediately used with the System Configuration Collector page. The plugin will then execute whatever functionality it was designed to do to assist you in your diagnosis.
After creating and deploying a plugin, refreshing the System Configuration Collector UI will allow a user to make use of the deployed plugin. In the screenshot below, the plugin has been added to the user defined “Custom Plugins” category. This category only contains the custom created plugin “Tomcat Property Config File” For more information see Sample Code.
A user can now make use of this plugin in any category they create and execute the plugin accordingly.
Another option is to make use of a custom plugin through a JMX console. After creating and deploying a plugin in a Windchill system a user can load that plugin through a JMX console and make use of its execution. This is accomplished due to each plugin also being a JMX MBean.
A user must first run the reloadPlugins() MBean operation on the CustomerSupport MBean. See the below screenshot. This forces the plugin architecture to reload all MBeans and will find the custom plugin that was previously deployed.
After reloading the plugins, the custom created plugin can be seen in the Plugin MBean list.
In this case, the newly loaded plugin is the “TomcatConfigProperties” MBean. For more information see Sample Code.
A user can now edit the attributes of this plugin through the JMX Console or run operations for this plugin (execute the plugin). Additionally, a user can add the custom plugin to existing custom categories. For a more information regarding using JMX MBeans consult the documentation.
For more information regarding JMX MBeans see Windchill MBeans.
The created plugin will execute from either the System Configuration Collector UI or a JMX Console.