Add multi-region support to collectd plugins
Change-Id: I52f7f06e1af8be58b88b62399944c7fa5027f490
diff --git a/nova/files/collectd_hypervisor_stats.conf b/nova/files/collectd_hypervisor_stats.conf
index 89ae226..26c2fa3 100644
--- a/nova/files/collectd_hypervisor_stats.conf
+++ b/nova/files/collectd_hypervisor_stats.conf
@@ -5,6 +5,7 @@
Tenant "{{ plugin.project }}"
Username "{{ plugin.user }}"
Password "{{ plugin.password }}"
+ Region "{{ plugin.region }}"
Timeout "5"
CpuAllocationRatio "{{ plugin.cpu_allocation_ratio }}"
</Module>
diff --git a/nova/files/collectd_openstack_nova.conf b/nova/files/collectd_openstack_nova.conf
index 2fa58a2..b6b2714 100644
--- a/nova/files/collectd_openstack_nova.conf
+++ b/nova/files/collectd_openstack_nova.conf
@@ -5,6 +5,7 @@
Tenant "{{ plugin.project }}"
Username "{{ plugin.user }}"
Password "{{ plugin.password }}"
+ Region "{{ plugin.region }}"
Timeout "{{ plugin.timeout|default(20) }}"
MaxRetries "{{ plugin.max_retries|default(2) }}"
PaginationLimit "{{ plugin.pagination_limit|default(500) }}"
diff --git a/nova/files/collectd_openstack_nova_services.conf b/nova/files/collectd_openstack_nova_services.conf
index 301f16b..a52c626 100644
--- a/nova/files/collectd_openstack_nova_services.conf
+++ b/nova/files/collectd_openstack_nova_services.conf
@@ -5,6 +5,7 @@
Tenant "{{ plugin.project }}"
Username "{{ plugin.user }}"
Password "{{ plugin.password }}"
+ Region "{{ plugin.region }}"
Timeout "20"
MaxRetries "2"
</Module>
diff --git a/nova/meta/collectd.yml b/nova/meta/collectd.yml
index 093d212..0dbf238 100644
--- a/nova/meta/collectd.yml
+++ b/nova/meta/collectd.yml
@@ -24,6 +24,7 @@
project: {{ controller.identity.tenant }}
user: {{ controller.identity.user }}
password: {{ controller.identity.password }}
+ region: {{ controller.identity.region }}
nova_services:
plugin: python
template: nova/files/collectd_openstack_nova_services.conf
@@ -31,6 +32,7 @@
project: {{ controller.identity.tenant }}
user: {{ controller.identity.user }}
password: {{ controller.identity.password }}
+ region: {{ controller.identity.region }}
nova_hypervisor_stats:
plugin: python
template: nova/files/collectd_hypervisor_stats.conf
@@ -38,6 +40,7 @@
project: {{ controller.identity.tenant }}
user: {{ controller.identity.user }}
password: {{ controller.identity.password }}
+ region: {{ controller.identity.region }}
cpu_allocation_ratio: {{ controller.cpu_allocation_ratio }}
{%- endif %}
{%- endif %}