ansible-roles/mysql/tasks/munin.yml

65 lines
1.3 KiB
YAML
Raw Normal View History

---
- name: is Munin present ?
stat:
path: /etc/munin/plugin-conf.d/munin-node
2017-03-24 14:15:09 +01:00
check_mode: no
register: munin_node_plugins_config
tags:
- mysql
- munin
- block:
- name: Install perl libraries for Munin
apt:
name: "{{ item }}"
state: present
with_items:
- libdbd-mysql-perl
- libcache-cache-perl
- name: Enable core Munin plugins
file:
src: '/usr/share/munin/plugins/{{ item }}'
dest: /etc/munin/plugins/{{ item }}
state: link
with_items:
- mysql_bytes
- mysql_queries
- mysql_slowqueries
- mysql_threads
notify: restart munin-node
- name: Enable contributed Munin plugins
file:
src: /usr/share/munin/plugins/mysql_
dest: '/etc/munin/plugins/mysql_{{ item }}'
state: link
with_items:
2017-10-20 10:25:34 +02:00
- commands
- connections
- files_tables
- innodb_bpool
- innodb_bpool_act
2017-10-20 10:25:34 +02:00
- innodb_insert_buf
- innodb_io
2017-10-20 10:25:34 +02:00
- innodb_io_pend
- innodb_log
- innodb_rows
- innodb_semaphores
- myisam_indexes
2017-10-20 10:25:34 +02:00
- network_traffic
- qcache
- qcache_mem
2017-10-20 10:25:34 +02:00
- select_types
- slow
- sorts
2017-10-20 10:25:34 +02:00
- table_locks
- tmp_tables
notify: restart munin-node
2016-12-16 01:19:31 +01:00
when: munin_node_plugins_config.stat.exists
tags:
- mysql
- munin