Merge pull request #2 from mnederlof/master
Integrate configurable availability zones for cinder
diff --git a/README.rst b/README.rst
index 41cd91c..e2da026 100644
--- a/README.rst
+++ b/README.rst
@@ -54,6 +54,7 @@
pool: SAS7K2
audit:
enabled: false
+ osapi_max_limit: 500
cinder:
volume:
diff --git a/cinder/files/collectd_openstack_cinder.conf b/cinder/files/collectd_openstack_cinder.conf
index 6b2928c..0882c06 100644
--- a/cinder/files/collectd_openstack_cinder.conf
+++ b/cinder/files/collectd_openstack_cinder.conf
@@ -5,6 +5,8 @@
Username "{{ plugin.username }}"
Password "{{ plugin.password }}"
Tenant "{{ plugin.tenant }}"
- MaxRetries "2"
- Timeout "20"
+ MaxRetries "{{ plugin.max_retries|default(2) }}"
+ Timeout "{{ plugin.timeout|default(20) }}"
+ PaginationLimit "{{ plugin.pagination_limit|default(500) }}"
+ PollingInterval "{{ plugin.polling_interval|default(60) }}"
</Module>
diff --git a/cinder/files/collectd_openstack_cinder_services.conf b/cinder/files/collectd_openstack_cinder_services.conf
new file mode 100644
index 0000000..e0fb576
--- /dev/null
+++ b/cinder/files/collectd_openstack_cinder_services.conf
@@ -0,0 +1,10 @@
+Import "openstack_cinder_services"
+
+<Module "openstack_cinder_services">
+ KeystoneUrl "{{ plugin.url }}"
+ Username "{{ plugin.username }}"
+ Password "{{ plugin.password }}"
+ Tenant "{{ plugin.tenant }}"
+ MaxRetries "2"
+ Timeout "20"
+</Module>
diff --git a/cinder/files/liberty/cinder.conf.controller.Debian b/cinder/files/liberty/cinder.conf.controller.Debian
index 8d8644e..e51c079 100644
--- a/cinder/files/liberty/cinder.conf.controller.Debian
+++ b/cinder/files/liberty/cinder.conf.controller.Debian
@@ -29,6 +29,7 @@
#glance_api_insecure=False
osapi_volume_listen={{ controller.osapi.host }}
+osapi_max_limit={{ controller.osapi_max_limit|default('1000') }}
glance_host={{ controller.glance.host }}
glance_port={{ controller.glance.port }}
diff --git a/cinder/files/mitaka/cinder.conf.controller.Debian b/cinder/files/mitaka/cinder.conf.controller.Debian
index 0428016..6ce59df 100644
--- a/cinder/files/mitaka/cinder.conf.controller.Debian
+++ b/cinder/files/mitaka/cinder.conf.controller.Debian
@@ -27,6 +27,7 @@
#glance_api_insecure=False
osapi_volume_listen={{ controller.osapi.host }}
+osapi_max_limit={{ controller.osapi_max_limit|default('1000') }}
glance_host={{ controller.glance.host }}
glance_port={{ controller.glance.port }}
diff --git a/cinder/meta/collectd.yml b/cinder/meta/collectd.yml
index d0229c5..5edb5e0 100644
--- a/cinder/meta/collectd.yml
+++ b/cinder/meta/collectd.yml
@@ -15,5 +15,12 @@
username: {{ controller.identity.user }}
password: {{ controller.identity.password }}
tenant: {{ controller.identity.tenant }}
+ openstack_cinder_services:
+ plugin: python
+ template: cinder/files/collectd_openstack_cinder_services.conf
+ url: "http://{{ controller.identity.host }}:{{ controller.identity.port }}/v{% if controller.identity.get('api_version', 2)|int == 2 %}2.0{% else %}3{% endif %}"
+ username: {{ controller.identity.user }}
+ password: {{ controller.identity.password }}
+ tenant: {{ controller.identity.tenant }}
{%- endif %}
{%- endif %}