modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/EmbeddedManagedDeploymentComponent.java | 28 +++++----- modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml | 12 ---- modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/EmbeddedWarDiscoveryComponent.java | 4 - modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml | 9 --- 4 files changed, 16 insertions(+), 37 deletions(-)
New commits: commit 663c3c65527a5aacbcafead08614e4b416d52fa6 Author: Jay Shaughnessy jshaughn@redhat.com Date: Wed Nov 30 10:43:54 2011 -0500
[Bug 758565 - Add drift templates to JBAS WAR/EAR resources] After reverting the changes to support EAR/WAR/Embedded WAR types for AS-4 and AS-5 plugins, this now adds back drift templates for EAR and WAR types. The Embedded WAR support will be added back in later, when the repo is open for the plugin code changes required to offer that support.
diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml index 32aca99..2729d31 100644 --- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml +++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml @@ -2313,6 +2313,15 @@ &deploymentContentConfigProps; </content>
+ <drift-definition + name="Template-Files" + description="Monitor files comprising the enterprise application archive (EAR). Use filters for more fine-grained monitoring. Or, create definitions only on the embedded WAR resources themselves."> + <basedir> + <value-context>measurementTrait</value-context> + <value-name>custom.path</value-name> + </basedir> + </drift-definition> + </service>
<service name="Web Application (WAR)" @@ -2364,6 +2373,15 @@ &deploymentContentConfigProps; </content>
+ <drift-definition + name="Template-Files" + description="Monitor files comprising the web application archive (WAR). Use filters for more fine-grained monitoring."> + <basedir> + <value-context>measurementTrait</value-context> + <value-name>custom.path</value-name> + </basedir> + </drift-definition> + <service name="Web Application Context" class="WebApplicationContextComponent" discovery="WebApplicationContextDiscoveryComponent" diff --git a/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml index db4b8e5..d4d0874 100644 --- a/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml +++ b/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml @@ -259,8 +259,9 @@ </configuration> </content>
- <drift-definition name="Template-Base Files" - description="Monitor base application server files for drift. It defines monitoring for some standard sub-directories of the HOME directory. Note, it is not recommeded to monitor all files for an application server. There are many files, and many temp files."> + <drift-definition + name="Template-Base Files" + description="Monitor base application server files for drift. It defines monitoring for some standard sub-directories of the HOME directory. Note, it is not recommeded to monitor all files for an application server. There are many files, and many temp files."> <basedir> <value-context>pluginConfiguration</value-context> <value-name>jbossHomeDir</value-name> @@ -2267,6 +2268,15 @@ </configuration> </content>
+ <drift-definition + name="Template-Files" + description="Monitor files comprising the enterprise application archive (EAR). Use filters for more fine-grained monitoring. Or, create definitions only on the embedded WAR resources themselves."> + <basedir> + <value-context>pluginConfiguration</value-context> + <value-name>filename</value-name> + </basedir> + </drift-definition> + <service name="Embedded Web Application (WAR)" class="org.rhq.plugins.jbossas.WarComponent" discovery="org.rhq.plugins.jbossas.EmbeddedWarDiscoveryComponent" @@ -2460,55 +2470,55 @@ dataType="calltime" defaultOn="false" units="milliseconds" destinationType="URL" description="the minimum, maximum, and average response times for HTTP requests serviced by this webapp"/>
- <metric property="Servlet.MinResponseTime" displayName="Min. Servlet Resp. Time" + <metric property="Servlet.MinResponseTime" displayName="Min. Servlet Resp. Time" units="milliseconds" description="Minimum response time of a servlet"/>
- <metric property="Servlet.AvgResponseTime" displayName="Avg. Servlet Resp. Time" + <metric property="Servlet.AvgResponseTime" displayName="Avg. Servlet Resp. Time" units="milliseconds" description="Average response time of a servlet"/>
- <metric property="Servlet.MaxResponseTime" displayName="Max. Servlet Resp. Time" + <metric property="Servlet.MaxResponseTime" displayName="Max. Servlet Resp. Time" units="milliseconds" description="Maximum response time of a servlet"/>
- <metric property="Servlet.TotalTime" displayName="Total processing time" + <metric property="Servlet.TotalTime" displayName="Total processing time" units="milliseconds" description="Total processing time of the webapp" measurementType="trendsup"/>
- <metric property="Servlet.NumRequests" displayName="Requests served" + <metric property="Servlet.NumRequests" displayName="Requests served" units="none" description="Number of requests served by servlets" measurementType="trendsup" displayType="summary"/>
- <metric property="Servlet.NumErrors" displayName="Errors while processing" + <metric property="Servlet.NumErrors" displayName="Errors while processing" units="none" description="Number of errors while processing" measurementType="trendsup" displayType="summary"/>
- <metric property="Session.activeSessions" displayName="Currently Active Sessions" + <metric property="Session.activeSessions" displayName="Currently Active Sessions" units="none" description="Number active sessions for the webapp right now" />
- <metric property="Session.maxActive" displayName="Maximum number of Active Sessions" + <metric property="Session.maxActive" displayName="Maximum number of Active Sessions" units="none" description="Maximum number of active sessions for the webapp" />
- <metric property="Session.sessionCounter" displayName="Sessions created" + <metric property="Session.sessionCounter" displayName="Sessions created" units="none" description="Number of sessions created for the webapp" measurementType="trendsup" />
- <metric property="Session.expiredSessions" displayName="Expired Sessions" + <metric property="Session.expiredSessions" displayName="Expired Sessions" units="none" description="Number of expired sessions for the webapp" measurementType="trendsup" />
- <metric property="Session.rejectedSessions" displayName="Rejected Sessions" + <metric property="Session.rejectedSessions" displayName="Rejected Sessions" units="none" description="Number of sessions rejected for the webapp" measurementType="trendsup" />
- <metric property="Session.sessionAverageAliveTime" displayName="Session Average alive time" + <metric property="Session.sessionAverageAliveTime" displayName="Session Average alive time" units="seconds" description="Average alive time of a Sessions" />
- <metric property="Session.sessionMaxAliveTime" displayName="Max Session alive time" + <metric property="Session.sessionMaxAliveTime" displayName="Max Session alive time" units="seconds" description="Maximum alive time of a Sessions" />
- <metric property="Vhost.name" displayName="Vhost" dataType="trait" + <metric property="Vhost.name" displayName="Vhost" dataType="trait" description="Virtual hosts this app runs on"/>
<content name="file" displayName="WAR File" category="deployable" isCreationType="true"> @@ -2524,6 +2534,15 @@ </configuration> </content>
+ <drift-definition + name="Template-Files" + description="Monitor files comprising the web application archive (WAR). Use filters for more fine-grained monitoring."> + <basedir> + <value-context>pluginConfiguration</value-context> + <value-name>filename</value-name> + </basedir> + </drift-definition> + </service>
<service name="EJB3 Entity Tree Cache"
commit 42c78796a8b115058f4f87f2d9f61f1cdec11428 Author: Jay Shaughnessy jshaughn@redhat.com Date: Wed Nov 30 10:38:16 2011 -0500
Revert "Fix issue in AS-4 plugin such that for embedded WAR resources the"
This reverts commit 8c6dcd3817195f9a0f0d9855b3f7b648bd1ada5d.
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/EmbeddedWarDiscoveryComponent.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/EmbeddedWarDiscoveryComponent.java index 9ad2fbd..18a6b38 100644 --- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/EmbeddedWarDiscoveryComponent.java +++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/EmbeddedWarDiscoveryComponent.java @@ -65,7 +65,7 @@ public class EmbeddedWarDiscoveryComponent extends MBeanResourceDiscoveryCompone
// Once we've finished making sure the plugin configurations have the data we need: // 1) First the stuff generic to all WARs... - JBossASServerComponent<?> grandparentJBossASComponent = parentEarComponent.getParentResourceComponent(); + JBossASServerComponent grandparentJBossASComponent = parentEarComponent.getParentResourceComponent(); resourceDetails = WarDiscoveryHelper.initPluginConfigurations(grandparentJBossASComponent, resourceDetails, parentEarComponent);
@@ -74,7 +74,7 @@ public class EmbeddedWarDiscoveryComponent extends MBeanResourceDiscoveryCompone for (DiscoveredResourceDetails resource : resourceDetails) { Configuration pluginConfiguration = resource.getPluginConfiguration(); pluginConfiguration.put(new PropertySimple(WarComponent.FILE_NAME, parentEarFullFileName - + pluginConfiguration.getSimpleValue(WarComponent.NAME_CONFIG_PROP, ""))); + + resource.getResourceName())); }
return resourceDetails;
commit a481dd1c53a035f9a633551ea982bc70d9e0188b Author: Jay Shaughnessy jshaughn@redhat.com Date: Wed Nov 30 10:37:50 2011 -0500
Revert "Add drift templates to EAR/WAR/Embedded War types for AS-4 plugin"
This reverts commit 0ad22b15a3f6d5b700bfec506db74f6a20633f21.
diff --git a/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml index b5d4bd1..db4b8e5 100644 --- a/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml +++ b/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml @@ -259,9 +259,8 @@ </configuration> </content>
- <drift-definition - name="Template-Base Files" - description="Monitor base application server files for drift. It defines monitoring for some standard sub-directories of the HOME directory. Note, it is not recommeded to monitor all files for an application server. There are many files, and many temp files."> + <drift-definition name="Template-Base Files" + description="Monitor base application server files for drift. It defines monitoring for some standard sub-directories of the HOME directory. Note, it is not recommeded to monitor all files for an application server. There are many files, and many temp files."> <basedir> <value-context>pluginConfiguration</value-context> <value-name>jbossHomeDir</value-name> @@ -2268,15 +2267,6 @@ </configuration> </content>
- <drift-definition - name="Template-Files" - description="Monitor files comprising the enterprise application archive (EAR). Use filters for more fine-grained monitoring. Or, create definitions only on the embedded WAR resources themselves."> - <basedir> - <value-context>pluginConfiguration</value-context> - <value-name>filename</value-name> - </basedir> - </drift-definition> - <service name="Embedded Web Application (WAR)" class="org.rhq.plugins.jbossas.WarComponent" discovery="org.rhq.plugins.jbossas.EmbeddedWarDiscoveryComponent" @@ -2394,15 +2384,6 @@ <metric property="Vhost.name" displayName="Vhost" dataType="trait" description="Virtual hosts this app runs on"/>
- <drift-definition - name="Template-Files" - description="Monitor files comprising the embedded web application archive (WAR). Use filters for more fine-grained monitoring."> - <basedir> - <value-context>pluginConfiguration</value-context> - <value-name>filename</value-name> - </basedir> - </drift-definition> - </service>
</service> @@ -2479,55 +2460,55 @@ dataType="calltime" defaultOn="false" units="milliseconds" destinationType="URL" description="the minimum, maximum, and average response times for HTTP requests serviced by this webapp"/>
- <metric property="Servlet.MinResponseTime" displayName="Min. Servlet Resp. Time" + <metric property="Servlet.MinResponseTime" displayName="Min. Servlet Resp. Time" units="milliseconds" description="Minimum response time of a servlet"/>
- <metric property="Servlet.AvgResponseTime" displayName="Avg. Servlet Resp. Time" + <metric property="Servlet.AvgResponseTime" displayName="Avg. Servlet Resp. Time" units="milliseconds" description="Average response time of a servlet"/>
- <metric property="Servlet.MaxResponseTime" displayName="Max. Servlet Resp. Time" + <metric property="Servlet.MaxResponseTime" displayName="Max. Servlet Resp. Time" units="milliseconds" description="Maximum response time of a servlet"/>
- <metric property="Servlet.TotalTime" displayName="Total processing time" + <metric property="Servlet.TotalTime" displayName="Total processing time" units="milliseconds" description="Total processing time of the webapp" measurementType="trendsup"/>
- <metric property="Servlet.NumRequests" displayName="Requests served" + <metric property="Servlet.NumRequests" displayName="Requests served" units="none" description="Number of requests served by servlets" measurementType="trendsup" displayType="summary"/>
- <metric property="Servlet.NumErrors" displayName="Errors while processing" + <metric property="Servlet.NumErrors" displayName="Errors while processing" units="none" description="Number of errors while processing" measurementType="trendsup" displayType="summary"/>
- <metric property="Session.activeSessions" displayName="Currently Active Sessions" + <metric property="Session.activeSessions" displayName="Currently Active Sessions" units="none" description="Number active sessions for the webapp right now" />
- <metric property="Session.maxActive" displayName="Maximum number of Active Sessions" + <metric property="Session.maxActive" displayName="Maximum number of Active Sessions" units="none" description="Maximum number of active sessions for the webapp" />
- <metric property="Session.sessionCounter" displayName="Sessions created" + <metric property="Session.sessionCounter" displayName="Sessions created" units="none" description="Number of sessions created for the webapp" measurementType="trendsup" />
- <metric property="Session.expiredSessions" displayName="Expired Sessions" + <metric property="Session.expiredSessions" displayName="Expired Sessions" units="none" description="Number of expired sessions for the webapp" measurementType="trendsup" />
- <metric property="Session.rejectedSessions" displayName="Rejected Sessions" + <metric property="Session.rejectedSessions" displayName="Rejected Sessions" units="none" description="Number of sessions rejected for the webapp" measurementType="trendsup" />
- <metric property="Session.sessionAverageAliveTime" displayName="Session Average alive time" + <metric property="Session.sessionAverageAliveTime" displayName="Session Average alive time" units="seconds" description="Average alive time of a Sessions" />
- <metric property="Session.sessionMaxAliveTime" displayName="Max Session alive time" + <metric property="Session.sessionMaxAliveTime" displayName="Max Session alive time" units="seconds" description="Maximum alive time of a Sessions" />
- <metric property="Vhost.name" displayName="Vhost" dataType="trait" + <metric property="Vhost.name" displayName="Vhost" dataType="trait" description="Virtual hosts this app runs on"/>
<content name="file" displayName="WAR File" category="deployable" isCreationType="true"> @@ -2543,15 +2524,6 @@ </configuration> </content>
- <drift-definition - name="Template-Files" - description="Monitor files comprising the web application archive (WAR). Use filters for more fine-grained monitoring."> - <basedir> - <value-context>pluginConfiguration</value-context> - <value-name>filename</value-name> - </basedir> - </drift-definition> - </service>
<service name="EJB3 Entity Tree Cache"
commit aa79d1e533ca7a3e216719c933493d8ffef64b6b Author: Jay Shaughnessy jshaughn@redhat.com Date: Wed Nov 30 10:36:24 2011 -0500
Revert "Add drift templates to EAR/WAR/Embedded War types for AS-4 plugin"
This reverts commit 72d6aa5c440900dacaf8f97914ea2e17dea07112.
diff --git a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/EmbeddedManagedDeploymentComponent.java b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/EmbeddedManagedDeploymentComponent.java index ea8d467..2ed3159 100644 --- a/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/EmbeddedManagedDeploymentComponent.java +++ b/modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/EmbeddedManagedDeploymentComponent.java @@ -33,28 +33,28 @@ import org.rhq.core.pluginapi.measurement.MeasurementFacet; /** * @author Ian Springer */ -public class EmbeddedManagedDeploymentComponent extends AbstractManagedDeploymentComponent implements MeasurementFacet { +public class EmbeddedManagedDeploymentComponent extends AbstractManagedDeploymentComponent + implements MeasurementFacet +{ private static final String CUSTOM_PARENT_TRAIT = "custom.parent"; - private static final String CUSTOM_PATH_TRAIT = "custom.path";
// ------------ MeasurementFacet Implementation ------------
- public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) throws Exception { - Set<MeasurementScheduleRequest> remainingRequests = new HashSet<MeasurementScheduleRequest>(); - for (MeasurementScheduleRequest request : requests) { + public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests) + throws Exception + { + Set<MeasurementScheduleRequest> remainingRequests = new HashSet(); + for (MeasurementScheduleRequest request : requests) + { String metricName = request.getName(); - if (metricName.equals(CUSTOM_PARENT_TRAIT)) { + if (metricName.equals(CUSTOM_PARENT_TRAIT)) + { String parentDeploymentName = getManagedDeployment().getParent().getName(); MeasurementDataTrait trait = new MeasurementDataTrait(request, parentDeploymentName); report.addData(trait); - - } else if (metricName.equals(CUSTOM_PATH_TRAIT)) { - boolean exploded = this.deploymentFile.isDirectory(); - if (exploded) { - MeasurementDataTrait trait = new MeasurementDataTrait(request, this.deploymentFile.getPath()); - report.addData(trait); - } - } else { + } + else + { remainingRequests.add(request); } } diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml index 470b0f6..32aca99 100644 --- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml +++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml @@ -2313,15 +2313,6 @@ &deploymentContentConfigProps; </content>
- <drift-definition - name="Template-Files" - description="Monitor files comprising the enterprise application archive (EAR). Use filters for more fine-grained monitoring. Or, create definitions only on the embedded WAR resources themselves."> - <basedir> - <value-context>measurementTrait</value-context> - <value-name>custom.path</value-name> - </basedir> - </drift-definition> - </service>
<service name="Web Application (WAR)" @@ -2373,15 +2364,6 @@ &deploymentContentConfigProps; </content>
- <drift-definition - name="Template-Files" - description="Monitor files comprising the web application archive (WAR). Use filters for more fine-grained monitoring."> - <basedir> - <value-context>measurementTrait</value-context> - <value-name>custom.path</value-name> - </basedir> - </drift-definition> - <service name="Web Application Context" class="WebApplicationContextComponent" discovery="WebApplicationContextDiscoveryComponent" @@ -2444,21 +2426,9 @@ <metric property="custom.parent" displayName="Parent" dataType="trait" displayType="summary" description="the name of this WAR's parent deployment"/> - <metric property="custom.path" displayName="Path" - dataType="trait" displayType="summary" - description="the absolute path of this WAR directory (not supported for WAR's embedded in non-exploded EARs)"/>
&webApplicationMetrics;
- <drift-definition - name="Template-Files" - description="Monitor files comprising the embedded web application archive (WAR). Use filters for more fine-grained monitoring."> - <basedir> - <value-context>measurementTrait</value-context> - <value-name>custom.path</value-name> - </basedir> - </drift-definition> - <service name="Embedded Web Application Context" class="WebApplicationContextComponent" discovery="WebApplicationContextDiscoveryComponent"
rhq-commits@lists.fedorahosted.org