Skip to content

Commit

Permalink
Enable time units, pct in dashboards
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Tojek committed Nov 25, 2019
1 parent 8eab210 commit bf3d04f
Show file tree
Hide file tree
Showing 10 changed files with 484 additions and 50 deletions.
Binary file modified metricbeat/docs/images/metricbeat-activemq-broker-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified metricbeat/docs/images/metricbeat-activemq-queues-overview.png
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
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 bf3d04f

Please sign in to comment.