Add Telegraf support for OpenStack services
Change-Id: Ib52bd7fe86800b974f120e24671a4745803e249e
diff --git a/keystone/meta/telegraf.yml b/keystone/meta/telegraf.yml
new file mode 100644
index 0000000..f72a184
--- /dev/null
+++ b/keystone/meta/telegraf.yml
@@ -0,0 +1,14 @@
+{%- from "keystone/map.jinja" import server with context %}
+{%- if server is defined and server.get('enabled', False) %}
+remote_agent:
+ input:
+ openstack:
+ interval: '1m'
+ project: "{{ server.admin_tenant }}"
+ tenant: "{{ server.admin_tenant }}"
+ region: "{{ server.region }}"
+ username: "{{ server.admin_name }}"
+ password: "{{ server.admin_password }}"
+ identity_endpoint: "http://{{ server.bind.private_address|replace('0.0.0.0', '127.0.0.1') }}:{{ server.bind.private_port }}/v{% if server.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
+ monitor_agents: "true"
+{%- endif %}
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index df136a7..25c2402 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -13,3 +13,5 @@
enabled: true
grafana:
enabled: true
+ telegraf:
+ enabled: true