2015-11-03 21:00:23 +00:00
|
|
|
|
# Telegraf plugin: Jolokia
|
|
|
|
|
|
2016-04-05 19:54:02 +00:00
|
|
|
|
#### Configuration
|
|
|
|
|
|
|
|
|
|
```toml
|
2016-04-27 21:50:55 +00:00
|
|
|
|
# Read JMX metrics through Jolokia
|
2016-04-05 19:54:02 +00:00
|
|
|
|
[[inputs.jolokia]]
|
|
|
|
|
## This is the context root used to compose the jolokia url
|
2016-04-14 21:00:41 +00:00
|
|
|
|
context = "/jolokia"
|
|
|
|
|
|
2016-04-27 21:50:55 +00:00
|
|
|
|
## This specifies the mode used
|
2016-04-14 21:00:41 +00:00
|
|
|
|
# mode = "proxy"
|
|
|
|
|
#
|
2016-04-27 21:50:55 +00:00
|
|
|
|
## When in proxy mode this section is used to specify further
|
|
|
|
|
## proxy address configurations.
|
|
|
|
|
## Remember to change host address to fit your environment.
|
2016-04-14 21:00:41 +00:00
|
|
|
|
# [inputs.jolokia.proxy]
|
2016-04-27 21:50:55 +00:00
|
|
|
|
# host = "127.0.0.1"
|
|
|
|
|
# port = "8080"
|
2016-04-14 21:00:41 +00:00
|
|
|
|
|
2016-04-27 21:50:55 +00:00
|
|
|
|
|
|
|
|
|
## List of servers exposing jolokia read service
|
2016-04-05 19:54:02 +00:00
|
|
|
|
[[inputs.jolokia.servers]]
|
2016-04-14 21:00:41 +00:00
|
|
|
|
name = "as-server-01"
|
|
|
|
|
host = "127.0.0.1"
|
|
|
|
|
port = "8080"
|
2016-04-05 19:54:02 +00:00
|
|
|
|
# username = "myuser"
|
|
|
|
|
# password = "mypassword"
|
|
|
|
|
|
|
|
|
|
## List of metrics collected on above servers
|
|
|
|
|
## Each metric consists in a name, a jmx path and either
|
|
|
|
|
## a pass or drop slice attribute.
|
|
|
|
|
## This collect all heap memory usage metrics.
|
|
|
|
|
[[inputs.jolokia.metrics]]
|
|
|
|
|
name = "heap_memory_usage"
|
2016-04-14 21:00:41 +00:00
|
|
|
|
mbean = "java.lang:type=Memory"
|
|
|
|
|
attribute = "HeapMemoryUsage"
|
|
|
|
|
|
2016-04-07 18:31:28 +00:00
|
|
|
|
## This collect thread counts metrics.
|
|
|
|
|
[[inputs.jolokia.metrics]]
|
|
|
|
|
name = "thread_count"
|
2016-04-14 21:00:41 +00:00
|
|
|
|
mbean = "java.lang:type=Threading"
|
2016-04-27 21:50:55 +00:00
|
|
|
|
attribute = "TotalStartedThreadCount,ThreadCount,DaemonThreadCount,PeakThreadCount"
|
2016-04-14 21:00:41 +00:00
|
|
|
|
|
2016-04-07 18:31:28 +00:00
|
|
|
|
## This collect number of class loaded/unloaded counts metrics.
|
|
|
|
|
[[inputs.jolokia.metrics]]
|
|
|
|
|
name = "class_count"
|
2016-04-14 21:00:41 +00:00
|
|
|
|
mbean = "java.lang:type=ClassLoading"
|
2016-04-27 21:50:55 +00:00
|
|
|
|
attribute = "LoadedClassCount,UnloadedClassCount,TotalLoadedClassCount"
|
2016-04-05 19:54:02 +00:00
|
|
|
|
```
|
2015-11-03 21:00:23 +00:00
|
|
|
|
|
|
|
|
|
#### Description
|
|
|
|
|
|
2016-04-27 21:50:55 +00:00
|
|
|
|
The Jolokia plugin collects JVM metrics exposed as MBean's attributes through
|
|
|
|
|
jolokia REST endpoint. All metrics are collected for each server configured.
|
2015-11-03 21:00:23 +00:00
|
|
|
|
|
|
|
|
|
See: https://jolokia.org/
|
|
|
|
|
|
|
|
|
|
# Measurements:
|
2016-04-27 21:50:55 +00:00
|
|
|
|
Jolokia plugin produces one measure for each metric configured,
|
|
|
|
|
adding Server's `jolokia_name`, `jolokia_host` and `jolokia_port` as tags.
|