Skip to content

Commit

Permalink
[Metricbeat] Create Kibana dashboards for ActiveMQ module (#14655)
Browse files Browse the repository at this point in the history
* Kibana dashboard: ActiveMQ broker overview

* Fix: mage fmt update

* Fix: invalid dashboard JSON

* Kibana dashboard: ActiveMQ queues and topics overview

* Add dashboard screenshots

* Enable time units, pct in dashboards
  • Loading branch information
mtojek authored Nov 25, 2019
1 parent 6280f83 commit 31e3ed4
Show file tree
Hide file tree
Showing 14 changed files with 2,617 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions metricbeat/docs/modules/activemq.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,36 @@ metricbeat.modules:
path: '/api/jolokia/?ignoreErrors=true&canonicalNaming=false'
username: admin # default username
password: admin # default password
processors:
- script:
lang: javascript
source: >
function process(event) {
var broker_memory_broker_pct = event.Get("activemq.broker.memory.broker.pct")
if (broker_memory_broker_pct != null) {
event.Put("activemq.broker.memory.broker.pct", broker_memory_broker_pct / 100.0)
}
var broker_memory_temp_pct = event.Get("activemq.broker.memory.temp.pct")
if (broker_memory_temp_pct != null) {
event.Put("activemq.broker.memory.temp.pct", broker_memory_temp_pct / 100.0)
}
var broker_memory_store_pct = event.Get("activemq.broker.memory.store.pct")
if (broker_memory_store_pct != null) {
event.Put("activemq.broker.memory.store.pct", broker_memory_store_pct / 100.0)
}
var queue_memory_broker_pct = event.Get("activemq.queue.memory.broker.pct")
if (queue_memory_broker_pct != null) {
event.Put("activemq.queue.memory.broker.pct", queue_memory_broker_pct / 100.0)
}
var topic_memory_broker_pct = event.Get("activemq.topic.memory.broker.pct")
if (topic_memory_broker_pct != null) {
event.Put("activemq.topic.memory.broker.pct", topic_memory_broker_pct / 100.0)
}
}
----

[float]
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This file is generated! See scripts/mage/docs_collector.go
[options="header"]
|===
|Modules |Dashboards |Metricsets
|<<metricbeat-module-activemq,activemq>> beta[] |image:./images/icon-no.png[No prebuilt dashboards] |
|<<metricbeat-module-activemq,activemq>> beta[] |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.3+| .3+| |<<metricbeat-metricset-activemq-broker,broker>> beta[]
|<<metricbeat-metricset-activemq-queue,queue>> beta[]
|<<metricbeat-metricset-activemq-topic,topic>> beta[]
Expand Down
30 changes: 30 additions & 0 deletions x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,36 @@ metricbeat.modules:
path: '/api/jolokia/?ignoreErrors=true&canonicalNaming=false'
username: admin # default username
password: admin # default password
processors:
- script:
lang: javascript
source: >
function process(event) {
var broker_memory_broker_pct = event.Get("activemq.broker.memory.broker.pct")
if (broker_memory_broker_pct != null) {
event.Put("activemq.broker.memory.broker.pct", broker_memory_broker_pct / 100.0)
}
var broker_memory_temp_pct = event.Get("activemq.broker.memory.temp.pct")
if (broker_memory_temp_pct != null) {
event.Put("activemq.broker.memory.temp.pct", broker_memory_temp_pct / 100.0)
}
var broker_memory_store_pct = event.Get("activemq.broker.memory.store.pct")
if (broker_memory_store_pct != null) {
event.Put("activemq.broker.memory.store.pct", broker_memory_store_pct / 100.0)
}
var queue_memory_broker_pct = event.Get("activemq.queue.memory.broker.pct")
if (queue_memory_broker_pct != null) {
event.Put("activemq.queue.memory.broker.pct", queue_memory_broker_pct / 100.0)
}
var topic_memory_broker_pct = event.Get("activemq.topic.memory.broker.pct")
if (topic_memory_broker_pct != null) {
event.Put("activemq.topic.memory.broker.pct", topic_memory_broker_pct / 100.0)
}
}
#------------------------------ Aerospike Module ------------------------------
- module: aerospike
Expand Down
30 changes: 30 additions & 0 deletions x-pack/metricbeat/module/activemq/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,33 @@
path: '/api/jolokia/?ignoreErrors=true&canonicalNaming=false'
username: admin # default username
password: admin # default password
processors:
- script:
lang: javascript
source: >
function process(event) {
var broker_memory_broker_pct = event.Get("activemq.broker.memory.broker.pct")
if (broker_memory_broker_pct != null) {
event.Put("activemq.broker.memory.broker.pct", broker_memory_broker_pct / 100.0)
}
var broker_memory_temp_pct = event.Get("activemq.broker.memory.temp.pct")
if (broker_memory_temp_pct != null) {
event.Put("activemq.broker.memory.temp.pct", broker_memory_temp_pct / 100.0)
}
var broker_memory_store_pct = event.Get("activemq.broker.memory.store.pct")
if (broker_memory_store_pct != null) {
event.Put("activemq.broker.memory.store.pct", broker_memory_store_pct / 100.0)
}
var queue_memory_broker_pct = event.Get("activemq.queue.memory.broker.pct")
if (queue_memory_broker_pct != null) {
event.Put("activemq.queue.memory.broker.pct", queue_memory_broker_pct / 100.0)
}
var topic_memory_broker_pct = event.Get("activemq.topic.memory.broker.pct")
if (topic_memory_broker_pct != null) {
event.Put("activemq.topic.memory.broker.pct", topic_memory_broker_pct / 100.0)
}
}
Loading

0 comments on commit 31e3ed4

Please sign in to comment.