library/roles/couchbase: Modify the ganglia plugin handling to manage the removal.

d4science-ghn-cluster: disable the ganglia couchbase plugin, gmond apparently cannot handle its load.
This commit is contained in:
Andrea Dell'Amico 2016-07-29 10:52:07 +02:00
parent 565d53bb4a
commit 6b5176e82f
2 changed files with 17 additions and 0 deletions

View File

@ -42,6 +42,7 @@ couchbase_allowed_hosts:
- '{{ network.nmis }}' - '{{ network.nmis }}'
- '{{ ansible_default_ipv4.address }}/32' - '{{ ansible_default_ipv4.address }}/32'
couchbase_ganglia_plugin_enabled: True
#couchbase_ganglia_url_username: #couchbase_ganglia_url_username:
#couchbase_ganglia_url_password: #couchbase_ganglia_url_password:
couchbase_monitored_buckets: couchbase_monitored_buckets:

View File

@ -5,11 +5,27 @@
- name: Install the ganglia plugin for Couchbase. One instance per bucket - name: Install the ganglia plugin for Couchbase. One instance per bucket
template: src=couchbase.py.j2 dest=/usr/lib/ganglia/python_modules/couchbase_{{ item }}.py owner=root group=ganglia mode=0440 template: src=couchbase.py.j2 dest=/usr/lib/ganglia/python_modules/couchbase_{{ item }}.py owner=root group=ganglia mode=0440
with_items: '{{ couchbase_monitored_buckets }}' with_items: '{{ couchbase_monitored_buckets }}'
when: couchbase_ganglia_plugin_enabled
notify: Restart ganglia monitor notify: Restart ganglia monitor
tags: [ 'ganglia', 'couchbase' ] tags: [ 'ganglia', 'couchbase' ]
- name: Distribute the ganglia (gmond) configuration for the Couchbase plugin - name: Distribute the ganglia (gmond) configuration for the Couchbase plugin
template: src=couchbase.pyconf.j2 dest=/etc/ganglia/conf.d/couchbase_{{ item }}.pyconf owner=root group=ganglia mode=0440 template: src=couchbase.pyconf.j2 dest=/etc/ganglia/conf.d/couchbase_{{ item }}.pyconf owner=root group=ganglia mode=0440
with_items: '{{ couchbase_monitored_buckets }}' with_items: '{{ couchbase_monitored_buckets }}'
when: couchbase_ganglia_plugin_enabled
notify: Restart ganglia monitor
tags: [ 'ganglia', 'couchbase' ]
- name: Remove the ganglia (gmond) configuration for the Couchbase plugin when we want it disabled
file: dest=/etc/ganglia/conf.d/couchbase_{{ item }}.pyconf state=absent
with_items: '{{ couchbase_monitored_buckets }}'
when: not couchbase_ganglia_plugin_enabled
notify: Restart ganglia monitor
tags: [ 'ganglia', 'couchbase' ]
- name: Remove the ganglia plugin for Couchbase when we want it disabled
file: dest=/usr/lib/ganglia/python_modules/couchbase_{{ item }}.py state=absent
with_items: '{{ couchbase_monitored_buckets }}'
when: not couchbase_ganglia_plugin_enabled
notify: Restart ganglia monitor notify: Restart ganglia monitor
tags: [ 'ganglia', 'couchbase' ] tags: [ 'ganglia', 'couchbase' ]