Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Bug 1122514 - Query Resource only available in postgres Plugin
Browse files Browse the repository at this point in the history
Added to the MySQL and Oracle plugins

Tested on Oracle XE and MariaDB
  • Loading branch information
tsegismont committed Jul 24, 2014
1 parent d3f63b5 commit d4ae35c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
17 changes: 17 additions & 0 deletions modules/plugins/mysql/src/main/resources/META-INF/rhq-plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,23 @@
<metric property="TotalConnections" displayType="summary" description="Total number of connections to the server"/>
<metric property="ActiveConnections" displayType="summary" description="Active Connections to the server"/>
</service>

<service name="Query"
class="org.rhq.plugins.database.CustomTableComponent"
discovery="org.rhq.plugins.database.CustomTableDiscoveryComponent"
supportsManualAdd="true">

<plugin-configuration>
<c:simple-property name="table" description="The table to discover and to be queried on for metric data"/>
<c:simple-property name="name" required="false" description="Initial name of the resource when manually added. This is also part of the resource key - make this unique if you want two Query resources based on the same table."/>
<c:simple-property name="description" required="false" description="Initial description of resource when manually added"/>
<c:simple-property name="metricQuery" required="false" description="The query that will gather metric data. This must return two columns, a string column whose value is 'metricColumn' and then a numeric column whose value is the metric to be collected."/>
</plugin-configuration>

<metric property="metricColumn" displayName="Metric Value" displayType="summary" description="The metric value for this Query. If Metric Query is not specified, this is not collected."/>

</service>

</server>

</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</plugin-configuration>

<process-scan query="process|basename|match=^ORACLE.*"/>

<process-scan query="process|basename|match=^xe_.+_XE$" name="Oracle XE on Linux"/>

<metric property="totalSize" displayType="summary" units="bytes"/>
<metric property="logons cumulative" />
Expand Down Expand Up @@ -656,6 +656,22 @@
<metric property="databaseCompatibility" displayName="Database Compatibility" description="Minimum software version required for a database instance to use files in this disk group" dataType="trait"/>
</service>

<service name="Query"
class="org.rhq.plugins.database.CustomTableComponent"
discovery="org.rhq.plugins.database.CustomTableDiscoveryComponent"
supportsManualAdd="true">

<plugin-configuration>
<c:simple-property name="table" description="The table to discover and to be queried on for metric data"/>
<c:simple-property name="name" required="false" description="Initial name of the resource when manually added. This is also part of the resource key - make this unique if you want two Query resources based on the same table."/>
<c:simple-property name="description" required="false" description="Initial description of resource when manually added"/>
<c:simple-property name="metricQuery" required="false" description="The query that will gather metric data. This must return two columns, a string column whose value is 'metricColumn' and then a numeric column whose value is the metric to be collected."/>
</plugin-configuration>

<metric property="metricColumn" displayName="Metric Value" displayType="summary" description="The metric value for this Query. If Metric Query is not specified, this is not collected."/>

</service>

</server>

</plugin>

0 comments on commit d4ae35c

Please sign in to comment.