Change server_ -> jolokia_ in tags and other formatting
This commit is contained in:
parent
59a297abe6
commit
8742ead585
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
### Release Notes
|
### Release Notes
|
||||||
|
|
||||||
|
- **Breaking change** in jolokia plugin. See
|
||||||
|
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/jolokia/README.md
|
||||||
|
for updated configuration. The plugin will now support proxy mode and will make
|
||||||
|
POST requests.
|
||||||
|
|
||||||
- New [agent] configuration option: `metric_batch_size`. This option tells
|
- New [agent] configuration option: `metric_batch_size`. This option tells
|
||||||
telegraf the maximum batch size to allow to accumulate before sending a flush
|
telegraf the maximum batch size to allow to accumulate before sending a flush
|
||||||
to the configured outputs. `metric_buffer_limit` now refers to the absolute
|
to the configured outputs. `metric_buffer_limit` now refers to the absolute
|
||||||
|
@ -45,6 +50,7 @@ based on _prefix_ in addition to globs. This means that a filter like
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
|
- [#1031](https://github.com/influxdata/telegraf/pull/1031): Jolokia plugin proxy mode. Thanks @saiello!
|
||||||
- [#1017](https://github.com/influxdata/telegraf/pull/1017): taginclude and tagexclude arguments.
|
- [#1017](https://github.com/influxdata/telegraf/pull/1017): taginclude and tagexclude arguments.
|
||||||
- [#1015](https://github.com/influxdata/telegraf/pull/1015): Docker plugin schema refactor.
|
- [#1015](https://github.com/influxdata/telegraf/pull/1015): Docker plugin schema refactor.
|
||||||
- [#889](https://github.com/influxdata/telegraf/pull/889): Improved MySQL plugin. Thanks @maksadbek!
|
- [#889](https://github.com/influxdata/telegraf/pull/889): Improved MySQL plugin. Thanks @maksadbek!
|
||||||
|
@ -61,6 +67,7 @@ based on _prefix_ in addition to globs. This means that a filter like
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
- [#1050](https://github.com/influxdata/telegraf/issues/1050): jolokia plugin - do not overwrite host tag. Thanks @saiello!
|
||||||
- [#921](https://github.com/influxdata/telegraf/pull/921): mqtt_consumer stops gathering metrics. Thanks @chaton78!
|
- [#921](https://github.com/influxdata/telegraf/pull/921): mqtt_consumer stops gathering metrics. Thanks @chaton78!
|
||||||
- [#1013](https://github.com/influxdata/telegraf/pull/1013): Close dead riemann output connections. Thanks @echupriyanov!
|
- [#1013](https://github.com/influxdata/telegraf/pull/1013): Close dead riemann output connections. Thanks @echupriyanov!
|
||||||
- [#1012](https://github.com/influxdata/telegraf/pull/1012): Set default tags in test accumulator.
|
- [#1012](https://github.com/influxdata/telegraf/pull/1012): Set default tags in test accumulator.
|
||||||
|
@ -82,10 +89,8 @@ https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md#g
|
||||||
- Possible breaking change for the librato and graphite outputs. Telegraf will
|
- Possible breaking change for the librato and graphite outputs. Telegraf will
|
||||||
no longer insert field names when the field is simply named `value`. This is
|
no longer insert field names when the field is simply named `value`. This is
|
||||||
because the `value` field is redundant in the graphite/librato context.
|
because the `value` field is redundant in the graphite/librato context.
|
||||||
- Breaking change in jolokia plugin. See https://github.com/influxdata/telegraf/blob/master/plugins/inputs/jolokia/README.md
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
- [#1031](https://github.com/influxdata/telegraf/pull/1031): Jolokia plugin proxy mode. Thanks @saiello!
|
|
||||||
- [#1009](https://github.com/influxdata/telegraf/pull/1009): Cassandra input plugin. Thanks @subhachandrachandra!
|
- [#1009](https://github.com/influxdata/telegraf/pull/1009): Cassandra input plugin. Thanks @subhachandrachandra!
|
||||||
- [#976](https://github.com/influxdata/telegraf/pull/976): Reduce allocations in the UDP and statsd inputs.
|
- [#976](https://github.com/influxdata/telegraf/pull/976): Reduce allocations in the UDP and statsd inputs.
|
||||||
- [#979](https://github.com/influxdata/telegraf/pull/979): Reduce allocations in the TCP listener.
|
- [#979](https://github.com/influxdata/telegraf/pull/979): Reduce allocations in the TCP listener.
|
||||||
|
@ -98,7 +103,6 @@ because the `value` field is redundant in the graphite/librato context.
|
||||||
- [#1008](https://github.com/influxdata/telegraf/pull/1008): Adding memstats metrics to the influxdb plugin.
|
- [#1008](https://github.com/influxdata/telegraf/pull/1008): Adding memstats metrics to the influxdb plugin.
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- [#1050](https://github.com/influxdata/telegraf/issues/1050): jolokia plugin - do not overwrite host tag. Thanks @saiello!
|
|
||||||
- [#968](https://github.com/influxdata/telegraf/issues/968): Processes plugin gets unknown state when spaces are in (command name)
|
- [#968](https://github.com/influxdata/telegraf/issues/968): Processes plugin gets unknown state when spaces are in (command name)
|
||||||
- [#969](https://github.com/influxdata/telegraf/pull/969): ipmi_sensors: allow : in password. Thanks @awaw!
|
- [#969](https://github.com/influxdata/telegraf/pull/969): ipmi_sensors: allow : in password. Thanks @awaw!
|
||||||
- [#972](https://github.com/influxdata/telegraf/pull/972): dovecot: remove extra newline in dovecot command. Thanks @mrannanj!
|
- [#972](https://github.com/influxdata/telegraf/pull/972): dovecot: remove extra newline in dovecot command. Thanks @mrannanj!
|
||||||
|
|
|
@ -3,20 +3,23 @@
|
||||||
#### Configuration
|
#### Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
|
# Read JMX metrics through Jolokia
|
||||||
[[inputs.jolokia]]
|
[[inputs.jolokia]]
|
||||||
## This is the context root used to compose the jolokia url
|
## This is the context root used to compose the jolokia url
|
||||||
context = "/jolokia"
|
context = "/jolokia"
|
||||||
|
|
||||||
# This specifies the mode used
|
## This specifies the mode used
|
||||||
# mode = "proxy"
|
# mode = "proxy"
|
||||||
#
|
#
|
||||||
# When in proxy mode this section is used to specify further proxy address configurations.
|
## When in proxy mode this section is used to specify further
|
||||||
# Remember to change servers addresses
|
## proxy address configurations.
|
||||||
|
## Remember to change host address to fit your environment.
|
||||||
# [inputs.jolokia.proxy]
|
# [inputs.jolokia.proxy]
|
||||||
# host = "127.0.0.1"
|
# host = "127.0.0.1"
|
||||||
# port = "8080"
|
# port = "8080"
|
||||||
|
|
||||||
# List of servers exposing jolokia read service
|
|
||||||
|
## List of servers exposing jolokia read service
|
||||||
[[inputs.jolokia.servers]]
|
[[inputs.jolokia.servers]]
|
||||||
name = "as-server-01"
|
name = "as-server-01"
|
||||||
host = "127.0.0.1"
|
host = "127.0.0.1"
|
||||||
|
@ -48,10 +51,11 @@
|
||||||
|
|
||||||
#### Description
|
#### Description
|
||||||
|
|
||||||
The Jolokia plugin collects JVM metrics exposed as MBean's attributes through jolokia REST endpoint. All metrics
|
The Jolokia plugin collects JVM metrics exposed as MBean's attributes through
|
||||||
are collected for each server configured.
|
jolokia REST endpoint. All metrics are collected for each server configured.
|
||||||
|
|
||||||
See: https://jolokia.org/
|
See: https://jolokia.org/
|
||||||
|
|
||||||
# Measurements:
|
# Measurements:
|
||||||
Jolokia plugin produces one measure for each metric configured, adding Server's `server_name`, `server_host` and `server_port` as tags.
|
Jolokia plugin produces one measure for each metric configured,
|
||||||
|
adding Server's `jolokia_name`, `jolokia_host` and `jolokia_port` as tags.
|
||||||
|
|
|
@ -226,9 +226,9 @@ func (j *Jolokia) Gather(acc telegraf.Accumulator) error {
|
||||||
tags := make(map[string]string)
|
tags := make(map[string]string)
|
||||||
|
|
||||||
for _, server := range servers {
|
for _, server := range servers {
|
||||||
tags["server_name"] = server.Name
|
tags["jolokia_name"] = server.Name
|
||||||
tags["server_port"] = server.Port
|
tags["jolokia_port"] = server.Port
|
||||||
tags["server_host"] = server.Host
|
tags["jolokia_host"] = server.Host
|
||||||
fields := make(map[string]interface{})
|
fields := make(map[string]interface{})
|
||||||
|
|
||||||
for _, metric := range metrics {
|
for _, metric := range metrics {
|
||||||
|
|
|
@ -96,9 +96,9 @@ func TestHttpJsonMultiValue(t *testing.T) {
|
||||||
"heap_memory_usage_used": 203288528.0,
|
"heap_memory_usage_used": 203288528.0,
|
||||||
}
|
}
|
||||||
tags := map[string]string{
|
tags := map[string]string{
|
||||||
"server_host": "127.0.0.1",
|
"jolokia_host": "127.0.0.1",
|
||||||
"server_port": "8080",
|
"jolokia_port": "8080",
|
||||||
"server_name": "as1",
|
"jolokia_name": "as1",
|
||||||
}
|
}
|
||||||
acc.AssertContainsTaggedFields(t, "jolokia", fields, tags)
|
acc.AssertContainsTaggedFields(t, "jolokia", fields, tags)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue