Add multi-region support to collectd plugins
Change-Id: I85dc74099b2f4eca3376bf1d3e4b9b33a62b2c6a
diff --git a/cinder/files/collectd_openstack_cinder.conf b/cinder/files/collectd_openstack_cinder.conf
index 0882c06..55cee92 100644
--- a/cinder/files/collectd_openstack_cinder.conf
+++ b/cinder/files/collectd_openstack_cinder.conf
@@ -5,6 +5,7 @@
Username "{{ plugin.username }}"
Password "{{ plugin.password }}"
Tenant "{{ plugin.tenant }}"
+ Region "{{ plugin.region }}"
MaxRetries "{{ plugin.max_retries|default(2) }}"
Timeout "{{ plugin.timeout|default(20) }}"
PaginationLimit "{{ plugin.pagination_limit|default(500) }}"
diff --git a/cinder/files/collectd_openstack_cinder_services.conf b/cinder/files/collectd_openstack_cinder_services.conf
index e0fb576..3eb3813 100644
--- a/cinder/files/collectd_openstack_cinder_services.conf
+++ b/cinder/files/collectd_openstack_cinder_services.conf
@@ -5,6 +5,7 @@
Username "{{ plugin.username }}"
Password "{{ plugin.password }}"
Tenant "{{ plugin.tenant }}"
+ Region "{{ plugin.region }}"
MaxRetries "2"
Timeout "20"
</Module>
diff --git a/cinder/meta/collectd.yml b/cinder/meta/collectd.yml
index 5edb5e0..5f0ee4b 100644
--- a/cinder/meta/collectd.yml
+++ b/cinder/meta/collectd.yml
@@ -15,6 +15,7 @@
username: {{ controller.identity.user }}
password: {{ controller.identity.password }}
tenant: {{ controller.identity.tenant }}
+ region: {{ controller.identity.region }}
openstack_cinder_services:
plugin: python
template: cinder/files/collectd_openstack_cinder_services.conf
@@ -22,5 +23,6 @@
username: {{ controller.identity.user }}
password: {{ controller.identity.password }}
tenant: {{ controller.identity.tenant }}
+ region: {{ controller.identity.region }}
{%- endif %}
{%- endif %}