61 lines
1.4 KiB
Text
61 lines
1.4 KiB
Text
|
////
|
||
|
This file is generated! See scripts/docs_collector.py
|
||
|
////
|
||
|
|
||
|
[[metricbeat-module-prometheus]]
|
||
|
== Prometheus module
|
||
|
|
||
|
This module periodically fetches metrics from
|
||
|
https://prometheus.io/docs/[Prometheus].
|
||
|
|
||
|
The default metricset is `collector`.
|
||
|
|
||
|
|
||
|
[float]
|
||
|
=== Example configuration
|
||
|
|
||
|
The Prometheus module supports the standard configuration options that are described
|
||
|
in <<configuration-metricbeat>>. Here is an example configuration:
|
||
|
|
||
|
[source,yaml]
|
||
|
----
|
||
|
metricbeat.modules:
|
||
|
- module: prometheus
|
||
|
metricsets: ["stats"]
|
||
|
enabled: true
|
||
|
period: 10s
|
||
|
hosts: ["localhost:9090"]
|
||
|
#metrics_path: /metrics
|
||
|
#namespace: example
|
||
|
|
||
|
- module: prometheus
|
||
|
metricsets: ["collector"]
|
||
|
enabled: true
|
||
|
period: 10s
|
||
|
hosts: ["localhost:9090"]
|
||
|
#metrics_path: /metrics
|
||
|
#namespace: example
|
||
|
|
||
|
# This can be used for service account based authorization:
|
||
|
# bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||
|
#ssl.certificate_authorities:
|
||
|
# - /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
|
||
|
----
|
||
|
|
||
|
This module supports TLS connections when using `ssl` config field, as described in <<configuration-ssl>>.
|
||
|
It also supports the options described in <<module-http-config-options>>.
|
||
|
|
||
|
[float]
|
||
|
=== Metricsets
|
||
|
|
||
|
The following metricsets are available:
|
||
|
|
||
|
* <<metricbeat-metricset-prometheus-collector,collector>>
|
||
|
|
||
|
* <<metricbeat-metricset-prometheus-stats,stats>>
|
||
|
|
||
|
include::prometheus/collector.asciidoc[]
|
||
|
|
||
|
include::prometheus/stats.asciidoc[]
|
||
|
|