2015-05-28 11:32:57 +02:00
|
|
|
---
|
2018-02-07 16:53:11 +01:00
|
|
|
- block:
|
|
|
|
- name: Install the ganglia client
|
2018-08-09 18:52:55 +02:00
|
|
|
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=3600
|
2018-02-07 16:53:11 +01:00
|
|
|
with_items:
|
|
|
|
- ganglia-monitor
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Install the ganglia linux specific plugins. We need at least ubuntu trusty. Or debian 7. Or debian 8
|
2018-08-09 18:52:55 +02:00
|
|
|
apt: pkg={{ item }} state=present force=yes
|
2018-02-07 16:53:11 +01:00
|
|
|
with_items:
|
|
|
|
- ganglia-modules-linux
|
|
|
|
- ganglia-monitor-python
|
|
|
|
notify: Restart ganglia monitor
|
|
|
|
when: is_trusty
|
2015-10-08 20:51:04 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Install the ganglia linux specific plugins. We need at least ubuntu trusty. Or debian 7. Or debian 8
|
2018-08-09 18:52:55 +02:00
|
|
|
apt: pkg={{ item }} state=present force=yes
|
2018-02-07 16:53:11 +01:00
|
|
|
with_items:
|
|
|
|
- ganglia-modules-linux
|
|
|
|
- ganglia-monitor-python
|
|
|
|
notify: Restart ganglia monitor
|
|
|
|
when: is_debian7
|
2015-10-08 20:51:04 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Install the ganglia linux specific plugins. We need at least ubuntu trusty. Or debian 7. Or debian 8
|
2018-08-09 18:52:55 +02:00
|
|
|
apt: pkg={{ item }} state=present force=yes
|
2018-02-07 16:53:11 +01:00
|
|
|
with_items:
|
|
|
|
- ganglia-modules-linux
|
|
|
|
- ganglia-monitor-python
|
|
|
|
notify: Restart ganglia monitor
|
|
|
|
when: is_debian8
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Distribute the ganglia configuration file for Ubuntu >= 12.04
|
|
|
|
template: src=gmond.j2 dest=/etc/ganglia/gmond.conf owner=root group=root mode=444
|
|
|
|
when: ( is_not_ubuntu_less_than_precise ) or ( is_debian8 )
|
|
|
|
notify: Restart ganglia monitor
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Distribute the ganglia configuration file for Debian 7
|
|
|
|
template: src=gmond.j2 dest=/etc/ganglia/gmond.conf owner=root group=root mode=444
|
|
|
|
when: is_debian7
|
|
|
|
notify: Restart ganglia monitor
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Distribute the ganglia configuration file for Ubuntu < 12.04 and >= 10.04 and Debian 6
|
|
|
|
template: src=gmond.j2 dest=/etc/ganglia/gmond.conf owner=root group=root mode=444
|
|
|
|
when: is_ubuntu_between_10_04_and_11_04_and_is_debian_6
|
|
|
|
notify: Restart ganglia monitor
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Distribute the ganglia configuration file for Ubuntu < 10.04 and Debian 4
|
|
|
|
template: src=gmond-2.5.j2 dest=/etc/gmond.conf owner=root group=root mode=444
|
|
|
|
when: is_ubuntu_between_8_and_9_and_is_debian_4
|
|
|
|
notify: Restart ganglia monitor
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Distribute the ganglia configuration on broken hardy 8.04.4
|
|
|
|
template: src=gmond-2.5.j2 dest=/etc/gmond.conf owner=root group=root mode=444
|
|
|
|
when: is_broken_hardy_lts
|
|
|
|
notify: Restart ganglia monitor
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Setup the ganglia directory for python modules
|
|
|
|
file: dest=/usr/lib/ganglia/python_modules state=directory
|
|
|
|
when: is_precise
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Ensure that the ganglia include conf dir exists
|
|
|
|
file: path=/etc/ganglia/conf.d state=directory
|
|
|
|
when: is_precise
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Setup the ganglia configuration for python modules
|
|
|
|
copy: src=modpython.conf dest=/etc/ganglia/conf.d/modpython.conf owner=root group=root mode=0644
|
|
|
|
notify: Restart ganglia monitor
|
|
|
|
when: is_precise
|
2016-08-01 19:04:53 +02:00
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- name: Set the kernel UDP buffer limits (net.core.rmem_max) to a value that is double of the ganglia udp buffer
|
|
|
|
sysctl: name=net.core.rmem_max value={{ ganglia_udp_recv_buffer *2 }} reload=yes state=present
|
|
|
|
when: ganglia_set_rmem
|
|
|
|
|
|
|
|
when: ganglia_enabled
|
2016-08-01 19:04:53 +02:00
|
|
|
tags: [ 'monitoring', 'ganglia' ]
|
|
|
|
|
2018-02-07 16:53:11 +01:00
|
|
|
- block:
|
2018-02-07 17:02:30 +01:00
|
|
|
- name: Remove the ganglia client
|
2018-02-07 16:53:11 +01:00
|
|
|
apt: pkg={{ item }} state=absent purge=yes
|
|
|
|
with_items:
|
|
|
|
- ganglia-monitor
|
2018-02-07 17:02:30 +01:00
|
|
|
- libganglia1
|
2018-02-07 16:53:11 +01:00
|
|
|
|
|
|
|
when: not ganglia_enabled
|
|
|
|
tags: [ 'monitoring', 'ganglia' ]
|