nova setup
diff --git a/metadata/service/compute/kvm.yml b/metadata/service/compute/kvm.yml
index 50dfccc..80ec6f8 100644
--- a/metadata/service/compute/kvm.yml
+++ b/metadata/service/compute/kvm.yml
@@ -1,5 +1,7 @@
applications:
- nova
+classes:
+- service.nova.support
parameters:
nova:
compute:
diff --git a/nova/compute.sls b/nova/compute.sls
index 225076e..831bf3d 100644
--- a/nova/compute.sls
+++ b/nova/compute.sls
@@ -1,5 +1,4 @@
-{% from "nova/map.jinja" import compute with context %}
-
+{%- from "nova/map.jinja" import compute with context %}
{%- if compute.enabled %}
nova_compute_packages:
diff --git a/nova/files/collectd_nova.conf b/nova/files/collectd_nova.conf
new file mode 100644
index 0000000..3548712
--- /dev/null
+++ b/nova/files/collectd_nova.conf
@@ -0,0 +1,17 @@
+<LoadPlugin "python">
+ Globals true
+</LoadPlugin>
+
+<Plugin "python">
+ ModulePath "/usr/lib/collectd-plugins/openstack"
+
+ Import "openstack_nova"
+
+ <Module "openstack_nova">
+ Username "admin"
+ Password "123456"
+ TenantName "openstack"
+ AuthURL "https://api.example.com:5000/v2.0"
+ Verbose "False"
+ </Module>
+</Plugin>
\ No newline at end of file
diff --git a/nova/init.sls b/nova/init.sls
index a118c7f..61c4322 100644
--- a/nova/init.sls
+++ b/nova/init.sls
@@ -1,8 +1,8 @@
include:
-{% if pillar.nova.controller is defined %}
+{%- if pillar.nova.controller is defined %}
- nova.controller
-{% endif %}
-{% if pillar.nova.compute is defined %}
+{%- endif %}
+{%- if pillar.nova.compute is defined %}
- nova.compute
-{% endif %}
+{%- endif %}
diff --git a/nova/meta/collectd.yml b/nova/meta/collectd.yml
index df5b0fe..a0d3b10 100644
--- a/nova/meta/collectd.yml
+++ b/nova/meta/collectd.yml
@@ -1,5 +1,13 @@
plugin:
+{%- if pillar.nova.compute is defined %}
nova_compute_libvirt:
plugin: interface
interval: 60
- template: nova/files/collectd_libvirt.conf
\ No newline at end of file
+ template: nova/files/collectd_libvirt.conf
+{%- endif %}
+{%- if pillar.nova.controller is defined %}
+ nova_controller_nova:
+ plugin: nova
+ interval: 60
+ template: nova/files/collectd_nova.conf
+{%- endif %}
\ No newline at end of file