mysql: new munin graph to follow binlog_days over time
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2625|7|2618|5|:-1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/360//ansiblelint">Evolix » ansible-roles » unstable #360</a>
gitea/ansible-roles/pipeline/head This commit looks good
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2625|7|2618|5|:-1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/360//ansiblelint">Evolix » ansible-roles » unstable #360</a>
gitea/ansible-roles/pipeline/head This commit looks good
This commit is contained in:
parent
ee6bd8cec4
commit
a65230b5e0
|
@ -31,6 +31,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
* fail2ban: add `fail2ban_sshd_port` variable to configure sshd port
|
* fail2ban: add `fail2ban_sshd_port` variable to configure sshd port
|
||||||
* kvm-host: release 23.09.1 for migrate-vm.sh
|
* kvm-host: release 23.09.1 for migrate-vm.sh
|
||||||
* metricbeat/logstash: fix Ansible syntax
|
* metricbeat/logstash: fix Ansible syntax
|
||||||
|
* mysql: new munin graph to follow binlog_days over time
|
||||||
* nagios-nrpe: add a NRPE check-local command with completion.
|
* nagios-nrpe: add a NRPE check-local command with completion.
|
||||||
* nagios-nrpe: add a proper monitoring plugin for GlusterFS (on servers, not for clients)
|
* nagios-nrpe: add a proper monitoring plugin for GlusterFS (on servers, not for clients)
|
||||||
* php: add new variable to disable overriding settings of php-fpm default pool (www)
|
* php: add new variable to disable overriding settings of php-fpm default pool (www)
|
||||||
|
|
44
mysql/files/mysql_binlog_days
Normal file
44
mysql/files/mysql_binlog_days
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
output_config() {
|
||||||
|
echo "graph_title MySQL - Value of expire_logs_days variable"
|
||||||
|
echo "graph_category mysql"
|
||||||
|
echo "binlogdays.label Number of days of storage of binary logs"
|
||||||
|
echo "binlogdays.draw AREA"
|
||||||
|
echo 'graph_args -l 0'
|
||||||
|
echo 'graph_scale no'
|
||||||
|
}
|
||||||
|
|
||||||
|
output_values() {
|
||||||
|
printf "binlogdays.value %d\n" $(binlog_days)
|
||||||
|
}
|
||||||
|
|
||||||
|
binlog_days() {
|
||||||
|
mysql --skip-column-names --silent --execute "show variables like 'expire_logs_days';" | awk '{print $2}'
|
||||||
|
}
|
||||||
|
|
||||||
|
output_usage() {
|
||||||
|
printf >&2 "%s - munin plugin to graph value of MySQL expire_logs_days system variable\n" ${0##*/}
|
||||||
|
printf >&2 "Usage: %s [config]\n" ${0##*/}
|
||||||
|
}
|
||||||
|
|
||||||
|
case $# in
|
||||||
|
0)
|
||||||
|
output_values
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
case $1 in
|
||||||
|
config)
|
||||||
|
output_config
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
output_usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
output_usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -66,6 +66,15 @@
|
||||||
- replication
|
- replication
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
|
|
||||||
|
- name: Install custom plugin for binlog retention tracking
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: mysql_binlog_days
|
||||||
|
dest: /etc/munin/plugins/mysql_binlog_days
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
notify: restart munin-node
|
||||||
|
|
||||||
- name: verify Munin configuration for mysql < Debian 11
|
- name: verify Munin configuration for mysql < Debian 11
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
dest: /etc/munin/plugin-conf.d/munin-node
|
dest: /etc/munin/plugin-conf.d/munin-node
|
||||||
|
|
Loading…
Reference in a new issue