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 2016/03/25 18:42:26 UTC
[1/2] karaf-decanter git commit: Escape invalid character from topic
name
Repository: karaf-decanter
Updated Branches:
refs/heads/master 8a3097b37 -> 9afed6c90
Escape invalid character from topic name
Project: http://git-wip-us.apache.org/repos/asf/karaf-decanter/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-decanter/commit/bca28cf3
Tree: http://git-wip-us.apache.org/repos/asf/karaf-decanter/tree/bca28cf3
Diff: http://git-wip-us.apache.org/repos/asf/karaf-decanter/diff/bca28cf3
Branch: refs/heads/master
Commit: bca28cf3982930051a917a8fd7c8c1d486204082
Parents: 8a3097b
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Fri Mar 25 18:41:02 2016 +0100
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Fri Mar 25 18:41:02 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/karaf/decanter/collector/log/LogAppender.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/bca28cf3/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java
----------------------------------------------------------------------
diff --git a/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java b/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java
index e883bf6..f9ec3ca 100644
--- a/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java
+++ b/collector/log/src/main/java/org/apache/karaf/decanter/collector/log/LogAppender.java
@@ -93,7 +93,7 @@ public class LogAppender implements PaxAppender {
if (loggerName == null || loggerName.isEmpty()) {
loggerName = "default";
}
- String topic = "decanter/collect/log/" + loggerName.replace(".", "/").replace(" ", "_").replace("{", "_").replace("}", "_");
+ String topic = "decanter/collect/log/" + loggerName.replace(".", "/").replace(" ", "_").replace("{", "_").replace("}", "_").replace("$", "_");
this.dispatcher.postEvent(new Event(topic, data));
}
}
[2/2] karaf-decanter git commit: KARAF-4443 - Provide default
resources (queries, charts, dashboards) for Kibana 4.x
Posted by jb...@apache.org.
KARAF-4443 - Provide default resources (queries, charts, dashboards) for Kibana 4.x
Project: http://git-wip-us.apache.org/repos/asf/karaf-decanter/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-decanter/commit/9afed6c9
Tree: http://git-wip-us.apache.org/repos/asf/karaf-decanter/tree/9afed6c9
Diff: http://git-wip-us.apache.org/repos/asf/karaf-decanter/diff/9afed6c9
Branch: refs/heads/master
Commit: 9afed6c9060a2fa047cbdcb1dbdde1a52ec863fd
Parents: bca28cf
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Fri Mar 25 18:41:26 2016 +0100
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Fri Mar 25 18:41:26 2016 +0100
----------------------------------------------------------------------
assembly/src/main/feature/feature.xml | 1 +
kibana-4.x/pom.xml | 20 +++
kibana-4.x/src/main/cfg/decanter.json | 135 +++++++++++++++++++
.../src/main/asciidoc/user-guide/appenders.adoc | 17 ++-
4 files changed, 172 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/9afed6c9/assembly/src/main/feature/feature.xml
----------------------------------------------------------------------
diff --git a/assembly/src/main/feature/feature.xml b/assembly/src/main/feature/feature.xml
index 79da000..2a22463 100644
--- a/assembly/src/main/feature/feature.xml
+++ b/assembly/src/main/feature/feature.xml
@@ -248,6 +248,7 @@
<feature>war</feature>
<feature version="[${elasticsearch2.version},3.0)">elasticsearch</feature>
<bundle>mvn:org.apache.karaf.decanter/org.apache.karaf.decanter.kibana-4.x/${project.version}</bundle>
+ <configfile finalname="/etc/decanter.json">mvn:org.apache.karaf.decanter/org.apache.karaf.decanter.kibana-4.x/${project.version}/json</configfile>
</feature>
</features>
http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/9afed6c9/kibana-4.x/pom.xml
----------------------------------------------------------------------
diff --git a/kibana-4.x/pom.xml b/kibana-4.x/pom.xml
index 63e27b9..8821a58 100644
--- a/kibana-4.x/pom.xml
+++ b/kibana-4.x/pom.xml
@@ -44,6 +44,26 @@
</instructions>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>src/main/cfg/decanter.json</file>
+ <type>json</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/9afed6c9/kibana-4.x/src/main/cfg/decanter.json
----------------------------------------------------------------------
diff --git a/kibana-4.x/src/main/cfg/decanter.json b/kibana-4.x/src/main/cfg/decanter.json
new file mode 100644
index 0000000..05df0fa
--- /dev/null
+++ b/kibana-4.x/src/main/cfg/decanter.json
@@ -0,0 +1,135 @@
+[
+ {
+ "_id": "Karaf",
+ "_type": "dashboard",
+ "_source": {
+ "title": "Karaf",
+ "hits": 0,
+ "description": "",
+ "panelsJSON": "[{\"col\":10,\"id\":\"Log-Levels\",\"row\":5,\"size_x\":3,\"size_y\":4,\"type\":\"visualization\"},{\"col\":9,\"id\":\"Garbage-Collector\",\"row\":1,\"size_x\":4,\"size_y\":4,\"type\":\"visualization\"},{\"col\":1,\"id\":\"Threads\",\"row\":1,\"size_x\":4,\"size_y\":4,\"type\":\"visualization\"},{\"col\":5,\"id\":\"JVM-Memory\",\"row\":1,\"size_x\":4,\"size_y\":4,\"type\":\"visualization\"},{\"col\":1,\"id\":\"Class-Loading\",\"row\":5,\"size_x\":4,\"size_y\":4,\"type\":\"visualization\"},{\"col\":5,\"id\":\"Operating-System\",\"row\":5,\"size_x\":5,\"size_y\":4,\"type\":\"visualization\"}]",
+ "version": 1,
+ "timeRestore": false,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"filter\":[{\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}}}]}"
+ }
+ }
+ },
+ {
+ "_id": "ActiveMQ-JMX",
+ "_type": "search",
+ "_source": {
+ "title": "ActiveMQ JMX",
+ "description": "",
+ "hits": 0,
+ "columns": [
+ "_source"
+ ],
+ "sort": [
+ "@timestamp",
+ "desc"
+ ],
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"index\":\"*\",\"highlight\":{\"pre_tags\":[\"@kibana-highlighted-field@\"],\"post_tags\":[\"@/kibana-highlighted-field@\"],\"fields\":{\"*\":{}},\"fragment_size\":2147483647},\"filter\":[],\"query\":{\"query_string\":{\"query\":\"ObjectName:org.apache.activemq*\",\"analyze_wildcard\":true}}}"
+ }
+ }
+ },
+ {
+ "_id": "ActiveMQ-Log",
+ "_type": "search",
+ "_source": {
+ "title": "ActiveMQ Log",
+ "description": "",
+ "hits": 0,
+ "columns": [
+ "_source"
+ ],
+ "sort": [
+ "@timestamp",
+ "desc"
+ ],
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"index\":\"*\",\"highlight\":{\"pre_tags\":[\"@kibana-highlighted-field@\"],\"post_tags\":[\"@/kibana-highlighted-field@\"],\"fields\":{\"*\":{}},\"fragment_size\":2147483647},\"filter\":[],\"query\":{\"query_string\":{\"query\":\"loggerName:org.apache.activemq*\",\"analyze_wildcard\":true}}}"
+ }
+ }
+ },
+ {
+ "_id": "Operating-System",
+ "_type": "visualization",
+ "_source": {
+ "title": "Operating System",
+ "visState": "{\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"2\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"FreePhysicalMemorySize\"}},{\"id\":\"3\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"4\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"FreeSwapSpaceSize\"}},{\"id\":\"5\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"OpenFileDescriptorCount\"}},{\"id\":\"6\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"ProcessCpuLoad\"}},{\"id\":\"7\",\"type\":\"max\",\"schema
\":\"metric\",\"params\":{\"field\":\"SystemCpuLoad\"}}],\"listeners\":{}}",
+ "description": "",
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"index\":\"*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"
+ }
+ }
+ },
+ {
+ "_id": "Garbage-Collector",
+ "_type": "visualization",
+ "_source": {
+ "title": "Garbage Collector",
+ "visState": "{\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":true,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"CollectionCount\"}},{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"CollectionTime\"}},{\"id\":\"4\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"CollectionUsage.max\"}},{\"id\":\"5\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"CollectionUsage.used\"}}],\"listeners\":{}}",
+ "description": "",
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"index\":\"*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"
+ }
+ }
+ },
+ {
+ "_id": "JVM-Memory",
+ "_type": "visualization",
+ "_source": {
+ "title": "JVM Memory",
+ "visState": "{\"aggs\":[{\"id\":\"2\",\"params\":{\"customInterval\":\"2h\",\"extended_bounds\":{},\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1},\"schema\":\"segment\",\"type\":\"date_histogram\"},{\"id\":\"3\",\"params\":{\"field\":\"HeapMemoryUsage.max\"},\"schema\":\"metric\",\"type\":\"max\"},{\"id\":\"4\",\"params\":{\"field\":\"HeapMemoryUsage.used\"},\"schema\":\"metric\",\"type\":\"max\"},{\"id\":\"5\",\"params\":{\"field\":\"HeapMemoryUsage.committed\"},\"schema\":\"metric\",\"type\":\"max\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"defaultYExtents\":false,\"drawLinesBetweenPoints\":true,\"interpolate\":\"linear\",\"radiusRatio\":9,\"scale\":\"linear\",\"setYExtents\":false,\"shareYAxis\":true,\"showCircles\":true,\"smoothLines\":false,\"times\":[],\"yAxis\":{}},\"type\":\"line\"}",
+ "description": "",
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"index\":\"*\",\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}},\"filter\":[]}"
+ }
+ }
+ },
+ {
+ "_id": "Class-Loading",
+ "_type": "visualization",
+ "_source": {
+ "title": "Class Loading",
+ "visState": "{\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"2\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"LoadedClassCount\"}},{\"id\":\"3\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"4\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"TotalLoadedClassCount\"}},{\"id\":\"5\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"UnloadedClassCount\"}}],\"listeners\":{}}",
+ "description": "",
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"index\":\"*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"
+ }
+ }
+ },
+ {
+ "_id": "Threads",
+ "_type": "visualization",
+ "_source": {
+ "title": "Threads",
+ "visState": "{\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"2\",\"type\":\"date_histogram\",\"schema\":\"segment\",\"params\":{\"field\":\"@timestamp\",\"interval\":\"auto\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{}}},{\"id\":\"3\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"ThreadCount\"}},{\"id\":\"4\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"DaemonThreadCount\"}},{\"id\":\"5\",\"type\":\"max\",\"schema\":\"metric\",\"params\":{\"field\":\"PeakThreadCount\"}}],\"listeners\":{}}",
+ "description": "",
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"index\":\"*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"
+ }
+ }
+ },
+ {
+ "_id": "Log-Levels",
+ "_type": "visualization",
+ "_source": {
+ "title": "Log Levels",
+ "visState": "{\"type\":\"pie\",\"params\":{\"addLegend\":true,\"addTooltip\":true,\"isDonut\":false,\"shareYAxis\":true},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"Level\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}],\"listeners\":{}}",
+ "description": "",
+ "version": 1,
+ "kibanaSavedObjectMeta": {
+ "searchSourceJSON": "{\"index\":\"*\",\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"type=log\"}},\"filter\":[]}"
+ }
+ }
+ }
+]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf-decanter/blob/9afed6c9/manual/src/main/asciidoc/user-guide/appenders.adoc
----------------------------------------------------------------------
diff --git a/manual/src/main/asciidoc/user-guide/appenders.adoc b/manual/src/main/asciidoc/user-guide/appenders.adoc
index 0c615f0..91ca6cf 100644
--- a/manual/src/main/asciidoc/user-guide/appenders.adoc
+++ b/manual/src/main/asciidoc/user-guide/appenders.adoc
@@ -28,7 +28,7 @@ karaf@root()> feature:install decanter-appender-log
The log appender doesn't require any configuration.
-==== Elasticsearch
+==== Elasticsearch & Kibana
Decanter provides three appenders for Elasticsearch:
@@ -710,6 +710,21 @@ karaf@root()> feature:install kibana/4.1.2
By default, the kibana instance is available on `http://host:8181/kibana`.
+[NOTE]
+===========================================
+As Kibana 4 stores all resources (queries, visualization charts, dashboards) in Elasticsearch, we can't provide
+default dashboards "out of the box".
+
+First, create a default index (in Settings->Indices) just containing * as pattern.
+
+However, we provide a `decanter.json` file that you can import in Kibana (in the Settings->Objects menu).
+
+When you install the `kibana` 4.x feature, it automatically provides the `decanter.json` file in the
+Apache Karaf etc folder. In Kibana, you can directly import using `etc/decanter.json` file.
+
+Once `decanter.json` has been imported, you will see default dashboards provided by Decanter.
+===========================================
+
===== Elasticsearch Head console
In addition of the embedded elasticsearch instance, Decanter also provides a web console allowing you to monitor and