Fix the collectd rabbitmq plugin and data collection
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
c9c718f8c3
commit
f6378303ca
5 changed files with 45 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
|||
- hosts
|
||||
- fas_client
|
||||
- collectd/base
|
||||
- collectd/rabbitmq
|
||||
- rsyncd
|
||||
- sudo
|
||||
- rabbitmq_cluster
|
||||
|
|
|
@ -9,10 +9,12 @@ FQDNLookup true
|
|||
#BaseDir "/usr/var/lib/collectd"
|
||||
#PIDFile "/usr/var/run/collectd.pid"
|
||||
#PluginDir "/usr/lib/collectd"
|
||||
#TypesDB "/usr/lib/collectd/types.db"
|
||||
#Interval 10
|
||||
#ReadThreads 5
|
||||
|
||||
# This is the default but it needs to be defined so we can add more DB files later.
|
||||
TypesDB "/usr/share/collectd/types.db"
|
||||
|
||||
LoadPlugin syslog
|
||||
|
||||
<Plugin syslog>
|
||||
|
|
24
roles/collectd/rabbitmq/tasks/main.yml
Normal file
24
roles/collectd/rabbitmq/tasks/main.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
- name: install collectd-rabbitmq
|
||||
package:
|
||||
state: present
|
||||
name: python2-collectd-rabbitmq
|
||||
tags:
|
||||
- packages
|
||||
- collectd
|
||||
|
||||
- name: install collectd rabbitmq config
|
||||
template:
|
||||
src: "rabbitmq-collectd.conf.j2"
|
||||
dest: "/etc/collectd.d/rabbitmq.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0640
|
||||
tags:
|
||||
- collectd
|
||||
- config
|
||||
notify: restart collectd
|
||||
|
||||
- name: Let collectd talk to the RabbitMQ management interface
|
||||
seboolean: name=collectd_tcp_network_connect state=yes persistent=yes
|
||||
tags:
|
||||
- collectd
|
14
roles/collectd/rabbitmq/templates/rabbitmq.collectd.conf.j2
Normal file
14
roles/collectd/rabbitmq/templates/rabbitmq.collectd.conf.j2
Normal file
|
@ -0,0 +1,14 @@
|
|||
LoadPlugin python
|
||||
<Plugin python>
|
||||
LogTraces true
|
||||
Interactive false
|
||||
Import "collectd_rabbitmq.collectd_plugin"
|
||||
<Module "collectd_rabbitmq.collectd_plugin">
|
||||
|
||||
Username "nagios-monitoring"
|
||||
Password "{{ (env == 'production')|ternary(rabbitmq_monitoring_password_production, rabbitmq_monitoring_password_staging) }}"
|
||||
Realm "RabbitMQ Management"
|
||||
Host "localhost"
|
||||
Port "15672"
|
||||
</Module>
|
||||
</Plugin>
|
|
@ -8,6 +8,9 @@
|
|||
- collectd-rrdtool
|
||||
- collectd-ping
|
||||
- collectd-web
|
||||
- collectd-rabbitmq-data
|
||||
notify:
|
||||
- restart collectd
|
||||
tags:
|
||||
- config
|
||||
- collectd/server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue