youtubebeat/vendor/github.com/elastic/beats/metricbeat/docs/autodiscover-jolokia-config.asciidoc

33 lines
1 KiB
Text
Raw Normal View History

2018-11-18 11:08:38 +01:00
Metricbeat supports templates for modules:
["source","yaml",subs="attributes"]
-------------------------------------------------------------------------------
metricbeat.autodiscover:
providers:
- type: jolokia
interfaces:
- name: br*
interval: 5s
grace_period: 10s
- name: en*
templates:
- condition:
contains:
jolokia.server.product: "tomcat"
config:
- module: jolokia
metricsets: ["jmx"]
hosts: "${data.jolokia.url}"
namespace: test
jmx.mappings:
- mbean: "java.lang:type=Runtime"
attributes:
- attr: Uptime
field: uptime
-------------------------------------------------------------------------------
This configuration starts a jolokia module that collects the uptime of each
`tomcat` instance discovered. Discovery probes are sent using all interfaces
starting with `br` and `en`, for the `br` interfaces the `interval` and
`grace_period` is reduced to 5 and 10 seconds respectively.