Add and Enable Telegraf input
Change-Id: I798b254107f5c3d8ad68bdc988e9b74cfb2d6773
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 23f1bcc..2d7b736 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -12,4 +12,6 @@
grafana:
enabled: true
prometheus:
+ enabled: true
+ telegraf:
enabled: true
\ No newline at end of file
diff --git a/nginx/meta/telegraf.yml b/nginx/meta/telegraf.yml
new file mode 100644
index 0000000..214e6eb
--- /dev/null
+++ b/nginx/meta/telegraf.yml
@@ -0,0 +1,10 @@
+{%- if pillar.nginx.server is defined %}
+{%- from "nginx/map.jinja" import server with context %}
+{%- if server.get('enabled', False) and server.get('site', {}).nginx_stats_server is defined %}
+agent:
+ input:
+ nginx:
+ template: nginx/files/telegraf.conf
+ urls: http://localhost:{{ server.site.nginx_stats_server.host.port }}
+{%- endif %}
+{%- endif %}
\ No newline at end of file