Skip to content

Instantly share code, notes, and snippets.

@lizthegrey
Created October 21, 2020 20:16
Show Gist options
  • Save lizthegrey/ebbdf9a8efcf72026d21cd3de1faa069 to your computer and use it in GitHub Desktop.
Save lizthegrey/ebbdf9a8efcf72026d21cd3de1faa069 to your computer and use it in GitHub Desktop.
[[inputs.jolokia2_agent]]
## Collect the Kafka broker version.
[[inputs.jolokia2_agent.metric]]
name = "server"
mbean = "kafka.server:type=app-info"
paths = ["version"]
[[processors.regex]]
order = 1
namepass = ["kafka.server"]
[[processors.regex.fields]]
key = "version"
pattern = "^(?P<majorminor>[0-9]+\\.[0-9]+).*"
replacement = "${majorminor}"
[[processors.converter]]
order = 2
namepass = ["kafka.server"]
[processors.converter.fields]
float = ["version"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment