Merge pull request #10 from simonpasquier/fix-collectd

Fix collectd configuration
diff --git a/rabbitmq/files/collectd_rabbitmq_info.conf b/rabbitmq/files/collectd_rabbitmq_info.conf
index c2c947d..fae857f 100644
--- a/rabbitmq/files/collectd_rabbitmq_info.conf
+++ b/rabbitmq/files/collectd_rabbitmq_info.conf
@@ -1,7 +1,8 @@
-{%- from "rabbitmq/map.jinja" import server with context %}
-  Import "rabbitmq_info"
+Import "rabbitmq_info"
 
-  <Module "rabbitmq_info">
-    Password "{{ plugin.username }}"
-    Username "{{ plugin.password }}"
-  </Module>
+<Module "rabbitmq_info">
+    Host "{{ plugin.host }}"
+    Port "{{ plugin.port }}"
+    Username "{{ plugin.username }}"
+    Password "{{ plugin.password }}"
+</Module>
diff --git a/rabbitmq/meta/collectd.yml b/rabbitmq/meta/collectd.yml
index b974b64..eefe46d 100644
--- a/rabbitmq/meta/collectd.yml
+++ b/rabbitmq/meta/collectd.yml
@@ -2,8 +2,9 @@
 local_plugin:
   rabbitmq_info:
     plugin: python
-    execution: local
     template: rabbitmq/files/collectd_rabbitmq_info.conf
+    host: {{ server.management.bind.address }}
+    port: {{ server.management.bind.port }}
     username: {{ server.admin.name }}
     password: {{ server.admin.password }}
   collectd_processes: