adds mysql exporter. Installs on database host

This commit is contained in:
2025-11-07 20:07:21 +01:00
parent 069f1c59ad
commit 871b42855c
8 changed files with 89 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
---
- name: Create mysqld_exporter service file
template:
src: "mysqld_exporter.service.j2"
dest: "/etc/systemd/system/mysqld_exporter.service"
mode: '0644'
tags:
- create_service
- name: Reload systemd to pick up the mysqld_exporter service
systemd:
daemon_reload: yes
tags:
- reload_systemd
- name: Enable and start the mysqld_exporter service
systemd:
name: mysqld_exporter
state: started
enabled: yes
tags:
- start_mysqld_exporter