You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2018/09/13 14:48:19 UTC
svn commit: r1840827 - in /karaf/site/production/manual/decanter/latest-2:
alerting.html appenders.html architecture.html collectors.html
custom-alerter.html custom-appender.html custom-collector.html index.html
introduction.html
Author: jbonofre
Date: Thu Sep 13 14:48:19 2018
New Revision: 1840827
URL: http://svn.apache.org/viewvc?rev=1840827&view=rev
Log:
[scm-publish] Updating main site with Karaf Decanter documentation
Modified:
karaf/site/production/manual/decanter/latest-2/alerting.html
karaf/site/production/manual/decanter/latest-2/appenders.html
karaf/site/production/manual/decanter/latest-2/architecture.html
karaf/site/production/manual/decanter/latest-2/collectors.html
karaf/site/production/manual/decanter/latest-2/custom-alerter.html
karaf/site/production/manual/decanter/latest-2/custom-appender.html
karaf/site/production/manual/decanter/latest-2/custom-collector.html
karaf/site/production/manual/decanter/latest-2/index.html
karaf/site/production/manual/decanter/latest-2/introduction.html
Modified: karaf/site/production/manual/decanter/latest-2/alerting.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/alerting.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/alerting.html (original)
+++ karaf/site/production/manual/decanter/latest-2/alerting.html Thu Sep 13 14:48:19 2018
@@ -818,7 +818,7 @@ alert.destination.uri=direct-vm:decanter
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2018-01-27 09:44:02 +01:00
+Last updated 2018-06-08 17:13:30 +02:00
</div>
</div>
</body>
Modified: karaf/site/production/manual/decanter/latest-2/appenders.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/appenders.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/appenders.html (original)
+++ karaf/site/production/manual/decanter/latest-2/appenders.html Thu Sep 13 14:48:19 2018
@@ -2320,7 +2320,7 @@ to "push" these metrics to some backend.
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2018-02-07 07:54:05 +01:00
+Last updated 2018-06-08 17:13:30 +02:00
</div>
</div>
</body>
Modified: karaf/site/production/manual/decanter/latest-2/architecture.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/architecture.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/architecture.html (original)
+++ karaf/site/production/manual/decanter/latest-2/architecture.html Thu Sep 13 14:48:19 2018
@@ -541,7 +541,7 @@ these topics.</p>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2018-01-27 09:44:02 +01:00
+Last updated 2018-06-08 17:13:30 +02:00
</div>
</div>
</body>
Modified: karaf/site/production/manual/decanter/latest-2/collectors.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/collectors.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/collectors.html (original)
+++ karaf/site/production/manual/decanter/latest-2/collectors.html Thu Sep 13 14:48:19 2018
@@ -685,6 +685,20 @@ easily create queries bases on this data
</ul>
</div>
<div class="paragraph">
+<p>You can also filter the lines read from the file using the <code>regex</code> property.</p>
+</div>
+<div class="paragraph">
+<p>For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>regex=(.*foo.*)</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Only the line matching the <code>regex</code> will be sent to the dispatcher.</p>
+</div>
+<div class="paragraph">
<p>For instance, instead of the log collector, you can create the following <code>etc/org.apache.karaf.decanter.collector.file-karaf.cfg</code>
file collector configuration file:</p>
</div>
@@ -692,11 +706,25 @@ file collector configuration file:</p>
<div class="content">
<pre>type=karaf-log-file
path=/path/to/karaf/data/log/karaf.log
+regex=(.*my.*)
my=stuff</pre>
</div>
</div>
<div class="paragraph">
-<p>The file collector will tail on karaf.log file, and send any new line in this log file as collected data.</p>
+<p>The file collector will tail on <code>karaf.log</code> file, and send any new line matching the <code>regex</code> in this log file as collected data.</p>
+</div>
+<div class="paragraph">
+<p>By default, the collector use the <code>org.apache.karaf.decanter.impl.parser.IdentityParser</code> parser to parse the line into
+a typed Object (Long, Integer or String) before send it to the EventDispatcher data map.</p>
+</div>
+<div class="paragraph">
+<p>You can write your own parser by implementing the <code>org.apache.karaf.decanter.api.parser.Parser</code> interface and declare
+it into the file collector configuration file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>parser.target=(parserId=myParser)</pre>
+</div>
</div>
</div>
<div class="sect3">
@@ -775,6 +803,9 @@ org.apache.felix.eventadmin.AddSubject=t
The JMX metrics (attribute values) are send to the appenders.</p>
</div>
<div class="paragraph">
+<p>In addition, the JMX collector also supports the execution of operations on dedicated ObjectName that you configure via <code>cfg</code> file.</p>
+</div>
+<div class="paragraph">
<p>The <code>decanter-collector-jmx</code> feature installs the JMX collector, and a default configuration file:</p>
</div>
<div class="listingblock">
@@ -813,7 +844,11 @@ url=local
# What matters is that the property names begin with "object.name".
#object.name.system=java.lang:*
#object.name.karaf=org.apache.karaf:type=http,name=*
-#object.name.3=org.apache.activemq:*</pre>
+#object.name.3=org.apache.activemq:*
+
+# You can also execute operations on some MBeans, providing the object name, operation, arguments (separated by ,)
+# and signatures (separated by ,) for the arguments (separated by |)
+#operation.name.rootLogger=org.apache.karaf:type=log,name=root|getLevel|rootLogger|java.lang.String</pre>
</div>
</div>
<div class="paragraph">
@@ -839,7 +874,7 @@ is secured.</p>
is secured.</p>
</li>
<li>
-<p>the <code>object.name</code> property is optional. If this property is not specified, the collector will retrieve the attributes
+<p>the <code>object.name</code> prefix is optional. If this property is not specified, the collector will retrieve the attributes
of all MBeans. You can filter to consider only some MBeans. This property contains the ObjectName filter to retrieve
the attributes only to some MBeans. Several object names can be listed, provided the property prefix is <code>object.name.</code>.</p>
</li>
@@ -847,12 +882,75 @@ the attributes only to some MBeans. Seve
<p>any other values will be part of the collected data. It means that you can add your own property if you want to add
additional data, and create queries based on this data.</p>
</li>
+<li>
+<p>the <code>operation.name</code> prefix is also optional. You can use it to execute an operation. The value format is <code>objectName|operation|arguments|signatures</code>.</p>
+</li>
</ul>
</div>
<div class="paragraph">
<p>You can retrieve multiple MBean servers. For that, you just create a new configuration file using the file name format
<code>etc/org.apache.karaf.decanter.collector.jmx-[ANYNAME].cfg</code>.</p>
</div>
+<div class="sect4">
+<h5 id="_jmxmp">JMXMP</h5>
+<div class="paragraph">
+<p>The Karaf Decanter JMX collector by default uses RMI protocol for JMX. But it also supports JMXMP protocol.</p>
+</div>
+<div class="paragraph">
+<p>The features to install are the sames: <code>decanter-collector-jmx</code>.</p>
+</div>
+<div class="paragraph">
+<p>However, you have to enable the <code>jmxmp</code> protocol support in the Apache Karaf instance hosting Karaf Decanter.</p>
+</div>
+<div class="paragraph">
+<p>You can download the <code>jmxmp</code> protocol provider artifact on Maven Central: [<a href="http://repo.maven.apache.org/maven2/org/glassfish/external/opendmk_jmxremote_optional_jar/1.0-b01-ea/opendmk_jmxremote_optional_jar-1.0-b01-ea.jar" class="bare">http://repo.maven.apache.org/maven2/org/glassfish/external/opendmk_jmxremote_optional_jar/1.0-b01-ea/opendmk_jmxremote_optional_jar-1.0-b01-ea.jar</a>]</p>
+</div>
+<div class="paragraph">
+<p>The <code>opendmk_jmxremote_optional_jar-1.0-b01-ea.jar</code> file has to be copied in the <code>lib/boot</code> folder of your Apache Karaf instance.</p>
+</div>
+<div class="paragraph">
+<p>Then, you have to add the new JMX remote packages by editing <code>etc/config.properties</code>, appending the following to the <code>org.osgi.framework.system.packages.extra</code> property:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>org.osgi.framework.system.packages.extra = \
+ ...
+ javax.remote, \
+ com.sun.jmx, \
+ com.sun.jmx.remote, \
+ com.sun.jmx.remote.protocol, \
+ com.sun.jmx.remote.generic, \
+ com.sun.jmx.remote.opt, \
+ com.sun.jmx.remote.opt.internal, \
+ com.sun.jmx.remote.opt.security, \
+ com.sun.jmx.remote.opt.util, \
+ com.sun.jmx.remote.profile, \
+ com.sun.jmx.remote.profile.sasl, \
+ com.sun.jmx.remote.profile.tls, \
+ com.sun.jmx.remote.socket, \
+ javax.management, \
+ javax.management.remote, \
+ javax.management.remote.generic, \
+ javax.management.remote.jmxmp, \
+ javax.management.remote.message</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then, you can create a new Decanter JMX collector by creating a new file, like <code>etc/org.apache.karaf.decanter.collector.jmx-mycollector.cfg</code> containing something like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>type=jmx-mycollector
+url=service:jmx:jmxmp://host:port
+jmx.remote.protocol.provider.pkgs=com.sun.jmx.remote.protocol</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>You can see:
+* the <code>url</code> property contains an URL with <code>jmxmp</code> instead of <code>rmi</code>.
+* in order to support <code>jmxmp</code> protocol, you have to set the protocol provider via the <code>jmx.remote.protocol.provider.pkgs</code> property (by default, Karaf Decanter JMX collector uses the <code>rmi</code> protocol provider)</p>
+</div>
+</div>
</div>
<div class="sect3">
<h4 id="_activemq_jmx">ActiveMQ (JMX)</h4>
@@ -1376,11 +1474,105 @@ from remote and several machines.</p>
send to the Decanter dispatcher.</p>
</div>
</div>
+<div class="sect3">
+<h4 id="_jdbc">JDBC</h4>
+<div class="paragraph">
+<p>The Decanter JDBC collector periodically executes a query on a database and send the query result to the dispatcher.</p>
+</div>
+<div class="paragraph">
+<p>The <code>decanter-collector-jdbc</code> installs the JDBC collector:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>karaf@root()> feature:install decanter-collector-jdbc</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The feature also installs the <code>etc/org.apache.karaf.decanter.collector.jdbc.cfg</code> configuration file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>#######################################
+# Decanter JDBC Collector Configuration
+#######################################
+
+# DataSource to use
+dataSource.target=(osgi.jndi.service.name=jdbc/decanter)
+
+# SQL Query to retrieve data
+query=select * from TABLE</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This configuration file allows you to configure the datasource to use and the SQL query to perform:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>the <code>datasource.name</code> property contains the name of the JDBC datasource to use to connect to the database. You can
+create this datasource using the Karaf <code>jdbc:create</code> command (provided by the <code>jdbc</code> feature).</p>
+</li>
+<li>
+<p>the <code>query</code> property contains the SQL query to perform on the database and retrieve data.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>This collector is periodically executed by the Karaf scheduler.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_customizing_properties_in_collectors">Customizing properties in collectors</h4>
+<div class="paragraph">
+<p>You can add, rename or remove properties collected by the collectors before sending it to the dispatcher.</p>
+</div>
+<div class="paragraph">
+<p>In the collector configuration file (for instance <code>etc/org.apache.karaf.decanter.collector.jmx-local.cfg</code> for the local JMX collector), you
+can add any property. By default, the property is added to the data sent to the dispatcher.</p>
+</div>
+<div class="paragraph">
+<p>You can prefix the configuration property with the action you can perform before sending:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>fields.add.</code> adds a property to the data sent. The following add property <code>hello</code> with value <code>world</code>:</p>
+<div class="literalblock">
+<div class="content">
+<pre>----
+fields.add.hello=world
+----</pre>
+</div>
+</div>
+</li>
+<li>
+<p><code>fields.remove.</code> removes a property to the data sent:</p>
+<div class="literalblock">
+<div class="content">
+<pre>----
+fields.remove.hello=
+----</pre>
+</div>
+</div>
+</li>
+<li>
+<p><code>fields.rename.</code> rename a property with another name:</p>
+<div class="literalblock">
+<div class="content">
+<pre>----
+fields.rename.helo=hello
+----</pre>
+</div>
+</div>
+</li>
+</ul>
+</div>
+</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2018-01-28 16:28:45 +01:00
+Last updated 2018-09-07 15:00:48 +02:00
</div>
</div>
</body>
Modified: karaf/site/production/manual/decanter/latest-2/custom-alerter.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/custom-alerter.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/custom-alerter.html (original)
+++ karaf/site/production/manual/decanter/latest-2/custom-alerter.html Thu Sep 13 14:48:19 2018
@@ -649,7 +649,7 @@ public class Activator implements Bundle
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2018-01-27 09:44:02 +01:00
+Last updated 2018-06-08 17:13:30 +02:00
</div>
</div>
</body>
Modified: karaf/site/production/manual/decanter/latest-2/custom-appender.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/custom-appender.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/custom-appender.html (original)
+++ karaf/site/production/manual/decanter/latest-2/custom-appender.html Thu Sep 13 14:48:19 2018
@@ -649,7 +649,7 @@ public class Activator implements Bundle
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2016-07-03 08:10:09 +02:00
+Last updated 2018-06-08 17:13:30 +02:00
</div>
</div>
</body>
Modified: karaf/site/production/manual/decanter/latest-2/custom-collector.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/custom-collector.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/custom-collector.html (original)
+++ karaf/site/production/manual/decanter/latest-2/custom-collector.html Thu Sep 13 14:48:19 2018
@@ -854,7 +854,7 @@ public class Activator implements Bundle
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2018-01-27 08:54:31 +01:00
+Last updated 2018-06-08 17:13:30 +02:00
</div>
</div>
</body>
Modified: karaf/site/production/manual/decanter/latest-2/index.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/index.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/index.html (original)
+++ karaf/site/production/manual/decanter/latest-2/index.html Thu Sep 13 14:48:19 2018
@@ -531,6 +531,8 @@ table.CodeRay td.code>pre{padding:0}
<li><a href="#_kafka">1.2.14. Kafka</a></li>
<li><a href="#_rest_servlet">1.2.15. Rest Servlet</a></li>
<li><a href="#_dropwizard_metrics">1.2.16. Dropwizard Metrics</a></li>
+<li><a href="#_jdbc">1.2.17. JDBC</a></li>
+<li><a href="#_customizing_properties_in_collectors">1.2.18. Customizing properties in collectors</a></li>
</ul>
</li>
<li><a href="#_appenders">1.3. Appenders</a>
@@ -538,7 +540,7 @@ table.CodeRay td.code>pre{padding:0}
<li><a href="#_log_2">1.3.1. Log</a></li>
<li><a href="#_elasticsearch_kibana">1.3.2. Elasticsearch & Kibana</a></li>
<li><a href="#_file_2">1.3.3. File</a></li>
-<li><a href="#_jdbc">1.3.4. JDBC</a></li>
+<li><a href="#_jdbc_2">1.3.4. JDBC</a></li>
<li><a href="#_jms_2">1.3.5. JMS</a></li>
<li><a href="#_camel">1.3.6. Camel</a></li>
<li><a href="#_kafka_2">1.3.7. Kafka</a></li>
@@ -812,6 +814,20 @@ easily create queries bases on this data
</ul>
</div>
<div class="paragraph">
+<p>You can also filter the lines read from the file using the <code>regex</code> property.</p>
+</div>
+<div class="paragraph">
+<p>For instance:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>regex=(.*foo.*)</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Only the line matching the <code>regex</code> will be sent to the dispatcher.</p>
+</div>
+<div class="paragraph">
<p>For instance, instead of the log collector, you can create the following <code>etc/org.apache.karaf.decanter.collector.file-karaf.cfg</code>
file collector configuration file:</p>
</div>
@@ -819,11 +835,25 @@ file collector configuration file:</p>
<div class="content">
<pre>type=karaf-log-file
path=/path/to/karaf/data/log/karaf.log
+regex=(.*my.*)
my=stuff</pre>
</div>
</div>
<div class="paragraph">
-<p>The file collector will tail on karaf.log file, and send any new line in this log file as collected data.</p>
+<p>The file collector will tail on <code>karaf.log</code> file, and send any new line matching the <code>regex</code> in this log file as collected data.</p>
+</div>
+<div class="paragraph">
+<p>By default, the collector use the <code>org.apache.karaf.decanter.impl.parser.IdentityParser</code> parser to parse the line into
+a typed Object (Long, Integer or String) before send it to the EventDispatcher data map.</p>
+</div>
+<div class="paragraph">
+<p>You can write your own parser by implementing the <code>org.apache.karaf.decanter.api.parser.Parser</code> interface and declare
+it into the file collector configuration file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>parser.target=(parserId=myParser)</pre>
+</div>
</div>
</div>
<div class="sect3">
@@ -902,6 +932,9 @@ org.apache.felix.eventadmin.AddSubject=t
The JMX metrics (attribute values) are send to the appenders.</p>
</div>
<div class="paragraph">
+<p>In addition, the JMX collector also supports the execution of operations on dedicated ObjectName that you configure via <code>cfg</code> file.</p>
+</div>
+<div class="paragraph">
<p>The <code>decanter-collector-jmx</code> feature installs the JMX collector, and a default configuration file:</p>
</div>
<div class="listingblock">
@@ -940,7 +973,11 @@ url=local
# What matters is that the property names begin with "object.name".
#object.name.system=java.lang:*
#object.name.karaf=org.apache.karaf:type=http,name=*
-#object.name.3=org.apache.activemq:*</pre>
+#object.name.3=org.apache.activemq:*
+
+# You can also execute operations on some MBeans, providing the object name, operation, arguments (separated by ,)
+# and signatures (separated by ,) for the arguments (separated by |)
+#operation.name.rootLogger=org.apache.karaf:type=log,name=root|getLevel|rootLogger|java.lang.String</pre>
</div>
</div>
<div class="paragraph">
@@ -966,7 +1003,7 @@ is secured.</p>
is secured.</p>
</li>
<li>
-<p>the <code>object.name</code> property is optional. If this property is not specified, the collector will retrieve the attributes
+<p>the <code>object.name</code> prefix is optional. If this property is not specified, the collector will retrieve the attributes
of all MBeans. You can filter to consider only some MBeans. This property contains the ObjectName filter to retrieve
the attributes only to some MBeans. Several object names can be listed, provided the property prefix is <code>object.name.</code>.</p>
</li>
@@ -974,12 +1011,75 @@ the attributes only to some MBeans. Seve
<p>any other values will be part of the collected data. It means that you can add your own property if you want to add
additional data, and create queries based on this data.</p>
</li>
+<li>
+<p>the <code>operation.name</code> prefix is also optional. You can use it to execute an operation. The value format is <code>objectName|operation|arguments|signatures</code>.</p>
+</li>
</ul>
</div>
<div class="paragraph">
<p>You can retrieve multiple MBean servers. For that, you just create a new configuration file using the file name format
<code>etc/org.apache.karaf.decanter.collector.jmx-[ANYNAME].cfg</code>.</p>
</div>
+<div class="sect4">
+<h5 id="_jmxmp">JMXMP</h5>
+<div class="paragraph">
+<p>The Karaf Decanter JMX collector by default uses RMI protocol for JMX. But it also supports JMXMP protocol.</p>
+</div>
+<div class="paragraph">
+<p>The features to install are the sames: <code>decanter-collector-jmx</code>.</p>
+</div>
+<div class="paragraph">
+<p>However, you have to enable the <code>jmxmp</code> protocol support in the Apache Karaf instance hosting Karaf Decanter.</p>
+</div>
+<div class="paragraph">
+<p>You can download the <code>jmxmp</code> protocol provider artifact on Maven Central: [<a href="http://repo.maven.apache.org/maven2/org/glassfish/external/opendmk_jmxremote_optional_jar/1.0-b01-ea/opendmk_jmxremote_optional_jar-1.0-b01-ea.jar" class="bare">http://repo.maven.apache.org/maven2/org/glassfish/external/opendmk_jmxremote_optional_jar/1.0-b01-ea/opendmk_jmxremote_optional_jar-1.0-b01-ea.jar</a>]</p>
+</div>
+<div class="paragraph">
+<p>The <code>opendmk_jmxremote_optional_jar-1.0-b01-ea.jar</code> file has to be copied in the <code>lib/boot</code> folder of your Apache Karaf instance.</p>
+</div>
+<div class="paragraph">
+<p>Then, you have to add the new JMX remote packages by editing <code>etc/config.properties</code>, appending the following to the <code>org.osgi.framework.system.packages.extra</code> property:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>org.osgi.framework.system.packages.extra = \
+ ...
+ javax.remote, \
+ com.sun.jmx, \
+ com.sun.jmx.remote, \
+ com.sun.jmx.remote.protocol, \
+ com.sun.jmx.remote.generic, \
+ com.sun.jmx.remote.opt, \
+ com.sun.jmx.remote.opt.internal, \
+ com.sun.jmx.remote.opt.security, \
+ com.sun.jmx.remote.opt.util, \
+ com.sun.jmx.remote.profile, \
+ com.sun.jmx.remote.profile.sasl, \
+ com.sun.jmx.remote.profile.tls, \
+ com.sun.jmx.remote.socket, \
+ javax.management, \
+ javax.management.remote, \
+ javax.management.remote.generic, \
+ javax.management.remote.jmxmp, \
+ javax.management.remote.message</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Then, you can create a new Decanter JMX collector by creating a new file, like <code>etc/org.apache.karaf.decanter.collector.jmx-mycollector.cfg</code> containing something like:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>type=jmx-mycollector
+url=service:jmx:jmxmp://host:port
+jmx.remote.protocol.provider.pkgs=com.sun.jmx.remote.protocol</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>You can see:
+* the <code>url</code> property contains an URL with <code>jmxmp</code> instead of <code>rmi</code>.
+* in order to support <code>jmxmp</code> protocol, you have to set the protocol provider via the <code>jmx.remote.protocol.provider.pkgs</code> property (by default, Karaf Decanter JMX collector uses the <code>rmi</code> protocol provider)</p>
+</div>
+</div>
</div>
<div class="sect3">
<h4 id="_activemq_jmx">1.2.7. ActiveMQ (JMX)</h4>
@@ -1503,6 +1603,100 @@ from remote and several machines.</p>
send to the Decanter dispatcher.</p>
</div>
</div>
+<div class="sect3">
+<h4 id="_jdbc">1.2.17. JDBC</h4>
+<div class="paragraph">
+<p>The Decanter JDBC collector periodically executes a query on a database and send the query result to the dispatcher.</p>
+</div>
+<div class="paragraph">
+<p>The <code>decanter-collector-jdbc</code> installs the JDBC collector:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>karaf@root()> feature:install decanter-collector-jdbc</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The feature also installs the <code>etc/org.apache.karaf.decanter.collector.jdbc.cfg</code> configuration file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre>#######################################
+# Decanter JDBC Collector Configuration
+#######################################
+
+# DataSource to use
+dataSource.target=(osgi.jndi.service.name=jdbc/decanter)
+
+# SQL Query to retrieve data
+query=select * from TABLE</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This configuration file allows you to configure the datasource to use and the SQL query to perform:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>the <code>datasource.name</code> property contains the name of the JDBC datasource to use to connect to the database. You can
+create this datasource using the Karaf <code>jdbc:create</code> command (provided by the <code>jdbc</code> feature).</p>
+</li>
+<li>
+<p>the <code>query</code> property contains the SQL query to perform on the database and retrieve data.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>This collector is periodically executed by the Karaf scheduler.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_customizing_properties_in_collectors">1.2.18. Customizing properties in collectors</h4>
+<div class="paragraph">
+<p>You can add, rename or remove properties collected by the collectors before sending it to the dispatcher.</p>
+</div>
+<div class="paragraph">
+<p>In the collector configuration file (for instance <code>etc/org.apache.karaf.decanter.collector.jmx-local.cfg</code> for the local JMX collector), you
+can add any property. By default, the property is added to the data sent to the dispatcher.</p>
+</div>
+<div class="paragraph">
+<p>You can prefix the configuration property with the action you can perform before sending:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>fields.add.</code> adds a property to the data sent. The following add property <code>hello</code> with value <code>world</code>:</p>
+<div class="literalblock">
+<div class="content">
+<pre>----
+fields.add.hello=world
+----</pre>
+</div>
+</div>
+</li>
+<li>
+<p><code>fields.remove.</code> removes a property to the data sent:</p>
+<div class="literalblock">
+<div class="content">
+<pre>----
+fields.remove.hello=
+----</pre>
+</div>
+</div>
+</li>
+<li>
+<p><code>fields.rename.</code> rename a property with another name:</p>
+<div class="literalblock">
+<div class="content">
+<pre>----
+fields.rename.helo=hello
+----</pre>
+</div>
+</div>
+</li>
+</ul>
+</div>
+</div>
</div>
<div class="sect2">
<h3 id="_appenders">1.3. Appenders</h3>
@@ -2500,7 +2694,7 @@ using the <code>marshaller.target</code>
</div>
</div>
<div class="sect3">
-<h4 id="_jdbc">1.3.4. JDBC</h4>
+<h4 id="_jdbc_2">1.3.4. JDBC</h4>
<div class="paragraph">
<p>The Decanter JDBC appender allows your to store the data (coming from the collectors) into a database.</p>
</div>
@@ -4267,7 +4461,7 @@ public class Activator implements Bundle
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2018-02-07 07:52:15 +01:00
+Last updated 2018-06-08 17:13:30 +02:00
</div>
</div>
</body>
Modified: karaf/site/production/manual/decanter/latest-2/introduction.html
URL: http://svn.apache.org/viewvc/karaf/site/production/manual/decanter/latest-2/introduction.html?rev=1840827&r1=1840826&r2=1840827&view=diff
==============================================================================
--- karaf/site/production/manual/decanter/latest-2/introduction.html (original)
+++ karaf/site/production/manual/decanter/latest-2/introduction.html Thu Sep 13 14:48:19 2018
@@ -571,7 +571,7 @@ is created and sent to alerters. Decante
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2018-01-27 09:44:02 +01:00
+Last updated 2018-06-08 17:13:30 +02:00
</div>
</div>
</body>