diff --git a/cluster_metrics/templates/telegraf.conf.j2 b/cluster_metrics/templates/telegraf.conf.j2 index ba78b178..62f34d2b 100644 --- a/cluster_metrics/templates/telegraf.conf.j2 +++ b/cluster_metrics/templates/telegraf.conf.j2 @@ -42,6 +42,12 @@ write_consistency = "any" 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.system]] @@ -100,4 +106,3 @@ [[inputs.swap]] {% endif %} - diff --git a/cluster_metrics/vars.yml b/cluster_metrics/vars.yml index 8ee99fb3..cee6b6fd 100644 --- a/cluster_metrics/vars.yml +++ b/cluster_metrics/vars.yml @@ -38,3 +38,8 @@ kapacitor_port: 9092 # Influxdb Relay vars influxdb_relay_port: 9096 + +# Prometheus Client Outputs Plugin +#outputs_prometheus_client: true +#outputs_prometheus_client_listen: ":9126" +#outputs_prometheus_client_expiration_interval: "60s"