Add prometheus_client as optional output
Currently the only outputs plugin used is influxdb. This adds prometheus_client outputs plugin and its directives as options. The telegraf.conf.j2 template has been updated to check for the outputs_prometheus_client variable and two other related variables. New variable names and default values are shown in vars.yml. Change-Id: I8d9380a4cc2ea58b4ad98b9fc964d45ff82090ed Signed-off-by: Melvin Hillsman <mrhillsman@gmail.com>
This commit is contained in:
parent
5af55f2704
commit
9e706b13a3
@ -42,6 +42,12 @@
|
|||||||
write_consistency = "any"
|
write_consistency = "any"
|
||||||
timeout = "5s"
|
timeout = "5s"
|
||||||
|
|
||||||
|
{% if outputs_prometheus_client is defined %}
|
||||||
|
[[outputs.prometheus_client]]
|
||||||
|
listen = "{{ outputs_prometheus_client_listen | default(':9126') }}"
|
||||||
|
expiration_interval = "{{ outputs_prometheus_client_expiration_interval | default('60s') }}"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
[[inputs.processes]]
|
[[inputs.processes]]
|
||||||
|
|
||||||
[[inputs.system]]
|
[[inputs.system]]
|
||||||
@ -100,4 +106,3 @@
|
|||||||
[[inputs.swap]]
|
[[inputs.swap]]
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -38,3 +38,8 @@ kapacitor_port: 9092
|
|||||||
|
|
||||||
# Influxdb Relay vars
|
# Influxdb Relay vars
|
||||||
influxdb_relay_port: 9096
|
influxdb_relay_port: 9096
|
||||||
|
|
||||||
|
# Prometheus Client Outputs Plugin
|
||||||
|
#outputs_prometheus_client: true
|
||||||
|
#outputs_prometheus_client_listen: ":9126"
|
||||||
|
#outputs_prometheus_client_expiration_interval: "60s"
|
||||||
|
Loading…
Reference in New Issue
Block a user