memcached: add munin config
This commit is contained in:
parent
26f086b562
commit
3721f83819
|
@ -3,3 +3,8 @@
|
|||
service:
|
||||
name: memcached
|
||||
state: restarted
|
||||
|
||||
- name: restart munin-node
|
||||
service:
|
||||
name: munin-node
|
||||
state: restarted
|
||||
|
|
|
@ -21,3 +21,5 @@
|
|||
state: started
|
||||
tags:
|
||||
- memcached
|
||||
|
||||
- include: munin.yml
|
||||
|
|
35
memcached/tasks/munin.yml
Normal file
35
memcached/tasks/munin.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
|
||||
- name: is Munin present ?
|
||||
stat:
|
||||
path: /etc/munin/plugin-conf.d/munin-node
|
||||
check_mode: no
|
||||
register: munin_node_plugins_config
|
||||
tags:
|
||||
- memcached
|
||||
- munin
|
||||
|
||||
- block:
|
||||
- name: Install munin-plugins-extra and libcache-memcached-perl for Munin
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- 'munin-plugins-extra'
|
||||
- 'libcache-memcached-perl'
|
||||
|
||||
- name: Enable core Munin plugins
|
||||
file:
|
||||
src: '/usr/share/munin/plugins/memcached_'
|
||||
dest: /etc/munin/plugins/{{ item }}
|
||||
state: link
|
||||
with_items:
|
||||
- memcached_bytes
|
||||
- memcached_counters
|
||||
- memcached_rates
|
||||
notify: restart munin-node
|
||||
|
||||
when: munin_node_plugins_config.stat.exists
|
||||
tags:
|
||||
- memcached
|
||||
- munin
|
Loading…
Reference in a new issue