2020-08-12 04:10:41 +08:00
|
|
|
|
# Jolokia Input Plugin
|
2015-11-04 05:00:23 +08:00
|
|
|
|
|
2022-06-08 05:37:08 +08:00
|
|
|
|
**Deprecated in version 1.5: Please use the [jolokia2][] plugin**
|
2017-09-28 01:52:10 +08:00
|
|
|
|
|
2022-10-27 03:58:36 +08:00
|
|
|
|
## Global configuration options <!-- @/docs/includes/plugin_config.md -->
|
|
|
|
|
|
|
|
|
|
|
|
In addition to the plugin-specific configuration settings, plugins support
|
|
|
|
|
|
additional global and plugin configuration settings. These settings are used to
|
|
|
|
|
|
modify metrics, tags, and field or create aliases and configure ordering, etc.
|
|
|
|
|
|
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
|
|
|
|
|
|
2023-01-12 23:55:21 +08:00
|
|
|
|
[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins
|
2022-10-27 03:58:36 +08:00
|
|
|
|
|
2021-11-25 03:59:41 +08:00
|
|
|
|
## Configuration
|
2016-04-06 03:54:02 +08:00
|
|
|
|
|
2022-05-24 21:49:47 +08:00
|
|
|
|
```toml @sample.conf
|
2016-04-28 05:50:55 +08:00
|
|
|
|
# Read JMX metrics through Jolokia
|
2016-04-06 03:54:02 +08:00
|
|
|
|
[[inputs.jolokia]]
|
|
|
|
|
|
## This is the context root used to compose the jolokia url
|
2016-12-17 20:51:46 +08:00
|
|
|
|
## NOTE that Jolokia requires a trailing slash at the end of the context root
|
|
|
|
|
|
context = "/jolokia/"
|
2016-04-15 05:00:41 +08:00
|
|
|
|
|
2016-04-28 05:50:55 +08:00
|
|
|
|
## This specifies the mode used
|
2016-04-15 05:00:41 +08:00
|
|
|
|
# mode = "proxy"
|
|
|
|
|
|
#
|
2016-04-28 05:50:55 +08: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-15 05:00:41 +08:00
|
|
|
|
# [inputs.jolokia.proxy]
|
2016-04-28 05:50:55 +08:00
|
|
|
|
# host = "127.0.0.1"
|
|
|
|
|
|
# port = "8080"
|
2023-02-09 18:04:41 +08:00
|
|
|
|
|
2016-12-21 20:41:58 +08:00
|
|
|
|
## Optional http timeouts
|
|
|
|
|
|
##
|
|
|
|
|
|
## response_header_timeout, if non-zero, specifies the amount of time to wait
|
|
|
|
|
|
## for a server's response headers after fully writing the request.
|
|
|
|
|
|
# response_header_timeout = "3s"
|
|
|
|
|
|
##
|
|
|
|
|
|
## client_timeout specifies a time limit for requests made by this client.
|
|
|
|
|
|
## Includes connection time, any redirects, and reading the response body.
|
|
|
|
|
|
# client_timeout = "4s"
|
2016-04-28 05:50:55 +08:00
|
|
|
|
|
|
|
|
|
|
## List of servers exposing jolokia read service
|
2016-04-06 03:54:02 +08:00
|
|
|
|
[[inputs.jolokia.servers]]
|
2016-04-15 05:00:41 +08:00
|
|
|
|
name = "as-server-01"
|
|
|
|
|
|
host = "127.0.0.1"
|
|
|
|
|
|
port = "8080"
|
2016-04-06 03:54:02 +08: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-15 05:00:41 +08:00
|
|
|
|
mbean = "java.lang:type=Memory"
|
|
|
|
|
|
attribute = "HeapMemoryUsage"
|
|
|
|
|
|
|
2016-04-08 02:31:28 +08:00
|
|
|
|
## This collect thread counts metrics.
|
|
|
|
|
|
[[inputs.jolokia.metrics]]
|
|
|
|
|
|
name = "thread_count"
|
2016-04-15 05:00:41 +08:00
|
|
|
|
mbean = "java.lang:type=Threading"
|
2016-04-28 05:50:55 +08:00
|
|
|
|
attribute = "TotalStartedThreadCount,ThreadCount,DaemonThreadCount,PeakThreadCount"
|
2016-04-15 05:00:41 +08:00
|
|
|
|
|
2016-04-08 02:31:28 +08:00
|
|
|
|
## This collect number of class loaded/unloaded counts metrics.
|
|
|
|
|
|
[[inputs.jolokia.metrics]]
|
|
|
|
|
|
name = "class_count"
|
2016-04-15 05:00:41 +08:00
|
|
|
|
mbean = "java.lang:type=ClassLoading"
|
2016-04-28 05:50:55 +08:00
|
|
|
|
attribute = "LoadedClassCount,UnloadedClassCount,TotalLoadedClassCount"
|
2016-04-06 03:54:02 +08:00
|
|
|
|
```
|
2015-11-04 05:00:23 +08:00
|
|
|
|
|
2021-11-25 03:59:41 +08:00
|
|
|
|
## Description
|
2015-11-04 05:00:23 +08:00
|
|
|
|
|
2016-04-28 05:50:55 +08:00
|
|
|
|
The Jolokia plugin collects JVM metrics exposed as MBean's attributes through
|
|
|
|
|
|
jolokia REST endpoint. All metrics are collected for each server configured.
|
2021-11-25 03:59:41 +08:00
|
|
|
|
See [official Jolokia website](https://jolokia.org/) for more information.
|
2021-11-25 03:18:53 +08:00
|
|
|
|
|
2023-02-09 18:04:41 +08:00
|
|
|
|
## Metrics
|
2015-11-04 05:00:23 +08:00
|
|
|
|
|
2016-04-28 05:50:55 +08:00
|
|
|
|
Jolokia plugin produces one measure for each metric configured,
|
|
|
|
|
|
adding Server's `jolokia_name`, `jolokia_host` and `jolokia_port` as tags.
|
2021-11-25 03:59:41 +08:00
|
|
|
|
|
|
|
|
|
|
[jolokia2]: /plugins/inputs/jolokia2
|
2023-02-09 18:04:41 +08:00
|
|
|
|
|
|
|
|
|
|
## Example Output
|