diff --git a/pom.xml b/pom.xml
index 51cff7a..888cdca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
de.jlo.talendcomp
jlo-talendcomp-karaf-jmx
- 2.0
+ 2.1
jar
jlo-karaf-jmx
diff --git a/src/main/java/de/jlo/talendcomp/karaf/jmx/CXFMetricsCollector.java b/src/main/java/de/jlo/talendcomp/karaf/jmx/CXFMetricsCollector.java
index f32da53..6d73986 100644
--- a/src/main/java/de/jlo/talendcomp/karaf/jmx/CXFMetricsCollector.java
+++ b/src/main/java/de/jlo/talendcomp/karaf/jmx/CXFMetricsCollector.java
@@ -19,6 +19,7 @@ public class CXFMetricsCollector {
private long lastExecutionTime = 0l;
private long interval = 1000l;
private List lastListServiceMetrics = new ArrayList();
+ private boolean ignoreSummaryMetrics = false;
public CXFMetricsCollector(BaseClient baseClient) {
if (baseClient == null || baseClient.isConnected() == false) {
@@ -79,11 +80,15 @@ private String getArtifactIdFromObjectName(ObjectName name) {
return artifactId;
}
- public ServiceMetric fetchServiceMetric(ObjectName objectName) throws Exception {
+ public ServiceMetric fetchServiceMetric(ObjectName objectName, String operation) throws Exception {
String name = getArtifactIdFromObjectName(objectName);
- String op = objectName.getKeyProperty("Operation");
- if (op != null && op.trim().isEmpty() == false) {
- name = name + "." + op;
+ if (operation != null && operation.trim().isEmpty() == false) {
+ name = name + "." + operation;
+ } else {
+ String op = objectName.getKeyProperty("Operation");
+ if (op != null && op.trim().isEmpty() == false) {
+ name = name + "." + op;
+ }
}
ServiceMetric metric = new ServiceMetric();
metric.setServiceName(name);
@@ -106,7 +111,14 @@ private void setupDiffToLastMeasurement(ServiceMetric metric) {
public List fetchServiceMetrics() throws Exception {
List listServiceMetrics = new ArrayList();
for (ObjectName on : listMetricObjectNames) {
- listServiceMetrics.add(fetchServiceMetric(on));
+ if (ignoreSummaryMetrics) {
+ String op = on.getKeyProperty("Operation");
+ if (op != null && op.trim().isEmpty() == false) {
+ listServiceMetrics.add(fetchServiceMetric(on, op));
+ }
+ } else {
+ listServiceMetrics.add(fetchServiceMetric(on, null));
+ }
}
lastListServiceMetrics = listServiceMetrics;
return listServiceMetrics;
@@ -137,4 +149,12 @@ public void setInterval(int interval) {
this.interval = interval * 1000l;
}
+ public boolean isIgnoreSummaryMetrics() {
+ return ignoreSummaryMetrics;
+ }
+
+ public void setIgnoreSummaryMetrics(boolean ignoreSummaryMetrics) {
+ this.ignoreSummaryMetrics = ignoreSummaryMetrics;
+ }
+
}
diff --git a/talend_component/tKarafServiceInstall/jlo-talendcomp-karaf-jmx-2.0.jar b/talend_component/tKarafServiceInstall/jlo-talendcomp-karaf-jmx-2.1.jar
similarity index 67%
rename from talend_component/tKarafServiceInstall/jlo-talendcomp-karaf-jmx-2.0.jar
rename to talend_component/tKarafServiceInstall/jlo-talendcomp-karaf-jmx-2.1.jar
index 54f9692..edd3467 100644
Binary files a/talend_component/tKarafServiceInstall/jlo-talendcomp-karaf-jmx-2.0.jar and b/talend_component/tKarafServiceInstall/jlo-talendcomp-karaf-jmx-2.1.jar differ
diff --git a/talend_component/tKarafServiceInstall/tKarafServiceInstall_java.xml b/talend_component/tKarafServiceInstall/tKarafServiceInstall_java.xml
index 13d3038..0bcc3cd 100644
--- a/talend_component/tKarafServiceInstall/tKarafServiceInstall_java.xml
+++ b/talend_component/tKarafServiceInstall/tKarafServiceInstall_java.xml
@@ -1,7 +1,7 @@
-
+
@@ -55,13 +55,13 @@
-
- Release: 2.0 build at: 20170913
+
+ Release: 2.1 build at: 20170922
-
+
diff --git a/talend_component/tKarafServiceList/jlo-talendcomp-karaf-jmx-2.0.jar b/talend_component/tKarafServiceList/jlo-talendcomp-karaf-jmx-2.1.jar
similarity index 67%
rename from talend_component/tKarafServiceList/jlo-talendcomp-karaf-jmx-2.0.jar
rename to talend_component/tKarafServiceList/jlo-talendcomp-karaf-jmx-2.1.jar
index 54f9692..edd3467 100644
Binary files a/talend_component/tKarafServiceList/jlo-talendcomp-karaf-jmx-2.0.jar and b/talend_component/tKarafServiceList/jlo-talendcomp-karaf-jmx-2.1.jar differ
diff --git a/talend_component/tKarafServiceList/tKarafServiceList_java.xml b/talend_component/tKarafServiceList/tKarafServiceList_java.xml
index 802b60b..353bea6 100644
--- a/talend_component/tKarafServiceList/tKarafServiceList_java.xml
+++ b/talend_component/tKarafServiceList/tKarafServiceList_java.xml
@@ -1,7 +1,7 @@
-
+
@@ -58,13 +58,13 @@
-
- Release: 2.0 build at: 20170913
+
+ Release: 2.1 build at: 20170922
-
+
diff --git a/talend_component/tKarafServiceMetricInput/jlo-talendcomp-karaf-jmx-2.0.jar b/talend_component/tKarafServiceMetricInput/jlo-talendcomp-karaf-jmx-2.1.jar
similarity index 67%
rename from talend_component/tKarafServiceMetricInput/jlo-talendcomp-karaf-jmx-2.0.jar
rename to talend_component/tKarafServiceMetricInput/jlo-talendcomp-karaf-jmx-2.1.jar
index 54f9692..edd3467 100644
Binary files a/talend_component/tKarafServiceMetricInput/jlo-talendcomp-karaf-jmx-2.0.jar and b/talend_component/tKarafServiceMetricInput/jlo-talendcomp-karaf-jmx-2.1.jar differ
diff --git a/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_begin.javajet b/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_begin.javajet
index c094c94..2c19e0b 100644
--- a/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_begin.javajet
+++ b/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_begin.javajet
@@ -38,6 +38,7 @@
if (filter == null || filter.trim().isEmpty()) {
filter = "null";
}
+ boolean ignoreSummaryMetrics = "true".equals(ElementParameterParser.getValue(node, "__FEATURE_FILTER_IS_OPERATION__"));
String interval = ElementParameterParser.getValue(node, "__TIME_INTERVAL__");
%>
de.jlo.talendcomp.karaf.jmx.KarafClient client_<%=cid%> = new de.jlo.talendcomp.karaf.jmx.KarafClient();
@@ -60,6 +61,7 @@
<% if (interval != null && interval.trim().isEmpty() == false) { %>
<%=cid%>.setInterval(<%=interval%>);
<% } %>
+ <%=cid%>.setIgnoreSummaryMetrics(<%=ignoreSummaryMetrics%>);
java.util.List list_<%=cid%> = new java.util.ArrayList();
try {
<%=cid%>.setupCXFTotalsMetricObjectNames(<%=filter%>);
diff --git a/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_java.xml b/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_java.xml
index 285b894..66b5f58 100644
--- a/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_java.xml
+++ b/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_java.xml
@@ -1,7 +1,7 @@
-
+
@@ -64,18 +64,21 @@
+
+ false
+
1
-
- Release: 2.0 build at: 20170913
+
+ Release: 2.1 build at: 20170922
-
+
diff --git a/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_messages.properties b/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_messages.properties
index d5e45ed..52712b7 100644
--- a/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_messages.properties
+++ b/talend_component/tKarafServiceMetricInput/tKarafServiceMetricInput_messages.properties
@@ -20,6 +20,7 @@ KARAF_INSTANCE.NAME=Instance Name
JMX_PORT.NAME=RMI-Registry Port
JSTATD_PORT.NAME=RMI Port
FEATURE_FILTER_REGEX.NAME=Filter features with regex
+FEATURE_FILTER_IS_OPERATION.NAME=Ignore summary metrics
TIME_INTERVAL.NAME=Time Interval in s
NB_LINE.NAME=Number Records