aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhubingbing <1392607554@qq.com>2016-10-06 12:40:39 +0000
committerzhubingbing <1392607554@qq.com>2016-10-10 03:40:48 +0000
commite7df18246106806c6ce4f39c6069e0f780a5f716 (patch)
treea7de5a679788edb0a2062c50de7645f5c0eee4a6
parentb58147bcc0a98f694075b9593bffced1ab63bec0 (diff)
downloadkolla-e7df18246106806c6ce4f39c6069e0f780a5f716.tar.gz
kolla-e7df18246106806c6ce4f39c6069e0f780a5f716.zip
integrate gnocchi with cloudkitty
Closes-Bug: #1630947 Change-Id: Ie28ec6399add384962cfdcf83c93c3bef132d57e
-rw-r--r--ansible/group_vars/all.yml8
-rw-r--r--ansible/roles/cloudkitty/templates/cloudkitty.conf.j27
-rw-r--r--releasenotes/notes/integrate-gnocchi-cloudkitty-4b2fcfe8ce9d520e.yaml3
3 files changed, 17 insertions, 1 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 71f86f5d9..a555dec7a 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -353,6 +353,14 @@ ceilometer_database_type: "mongodb"
#################################
cinder_backend_ceph: "{{ enable_ceph }}"
+
+#######################
+# Cloudkitty options
+#######################
+# Valid options are [ ceilometer, gnocchi ]
+cloudkitty_collector_backend: "ceilometer"
+
+
#######################
# Nova options
#######################
diff --git a/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 b/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2
index 5de3eeb0b..cd347b269 100644
--- a/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2
+++ b/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2
@@ -27,7 +27,7 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
lock_path = /var/lib/cloudkitty/tmp
[collect]
-collector = ceilometer
+collector = {{ cloudkitty_collector_backend }}
services = compute,image{% if enable_cinder | bool %},volume{% endif %}, network_bw_out, network_bw_in, network_floating
[oslo_messaging_notifications]
@@ -38,8 +38,13 @@ topics = notifications
keystone_version = 3
auth_section = keystone_authtoken
+{% if cloudkitty_collector_backend == "gnocchi" %}
+[gnocchi_collector]
+auth_section = keystone_authtoken
+{% elif cloudkitty_collector_backend == "ceilometer" %}
[ceilometer_collector]
auth_section = keystone_authtoken
+{% endif %}
[api]
host_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
diff --git a/releasenotes/notes/integrate-gnocchi-cloudkitty-4b2fcfe8ce9d520e.yaml b/releasenotes/notes/integrate-gnocchi-cloudkitty-4b2fcfe8ce9d520e.yaml
new file mode 100644
index 000000000..cf163fa2e
--- /dev/null
+++ b/releasenotes/notes/integrate-gnocchi-cloudkitty-4b2fcfe8ce9d520e.yaml
@@ -0,0 +1,3 @@
+---
+features:
+ - support use gnocchi collector in cloudkitty