abednarik.mysqld-exporter

Ansible Role: MySQL Exporter

Build Status CircleCI

This Ansible Role installs MySQL Exporter on RedHat/CentOS or Debian/Ubuntu systems.

Requirements

MySQL User with the following permissions

CREATE USER 'exporter'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT PROCESS, REPLICATION CLIENT,
SELECT ON *.* TO 'exporter'@'localhost' WITH MAX_USER_CONNECTIONS 3;
FLUSH PRIVILEGES;

NOTE: It's a good idea to limit the number of connections for this user to prevent overloading the server during heavy monitoring.

Role Variables

Required variables

You need to provide a user, password, host, and port for mysql_exporter.

prometheus_mysqld_exporter_env: 'user:password@(hostname:port)/'

Optional variables: general settings

You can change these default settings:

prometheus_user:   prometheus
prometheus_group:  prometheus

prometheus_mysqld_exporter_version: 0.9.0

gosu_version: '1.10'

prometheus_install_path:  /opt/prometheus
prometheus_log_path:      /var/log/prometheus
prometheus_pid_path:      /var/run/prometheus

Dependencies

None.

Example Playbook

- hosts: all
  become: True
  roles:
    - abednarik.mysqld-exporter

  vars:
    prometheus_mysqld_exporter_env: 'exporter:password@(localhost:3306)/'

License

GPLv3

Author Information

This role was created in 2016 by Alejandro Bednarik.

Note

This role is based on the excellent work of William Yeh with ansible/prometheus. For more details, visit https://github.com/William-Yeh/ansible-prometheus.

Informazioni sul progetto

Install and configure mysqld_exporter

Installa
ansible-galaxy install abednarik.mysqld-exporter
Licenza
gpl-3.0
Download
489
Proprietario
Proactive and responsible DevOps / System Engineer and Technical Lead with over 10 years of experience in IT Systems and Open Source.