Add Prometheus Mysqld exporter
Change-Id: I670597179b701aab1ca8e433be2f3abf1e78650a
This commit is contained in:
parent
322d014d04
commit
1c0bd2ae11
@ -34,3 +34,26 @@ Install node_exporter
|
||||
|
||||
cd /opt/openstack-ansible-ops/prometheus
|
||||
openstack-ansible installNodeExporter.yml
|
||||
|
||||
|
||||
If you want to deploy the mysqld_exporter, you need to create the Galera user for it first
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
galera_additional_users:
|
||||
- name: "exporter"
|
||||
host: '%'
|
||||
password: "{{ prometheus_mysqld_exporter_galera_password }}"
|
||||
priv: '*.*:PROCESS,REPLICATION CLIENT,SELECT,SLAVE MONITOR'
|
||||
resource_limits:
|
||||
MAX_USER_CONNECTIONS: 3
|
||||
check_hostname: false
|
||||
state: present
|
||||
|
||||
|
||||
Then install the mysqld_exporter
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd /opt/openstack-ansible-ops/prometheus
|
||||
openstack-ansible installMysqldExporter.yml
|
||||
|
17
prometheus/installMysqldExporter.yml
Normal file
17
prometheus/installMysqldExporter.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
|
||||
|
||||
- name: Refresh local facts
|
||||
hosts: galera_all
|
||||
tasks:
|
||||
- name: refresh local facts
|
||||
setup:
|
||||
|
||||
- name: mysqld_exporter
|
||||
hosts: galera_all
|
||||
roles:
|
||||
- role: prometheus.prometheus.mysqld_exporter
|
||||
vars:
|
||||
mysqld_exporter_host: "{{ ansible_host }}"
|
||||
mysqld_exporter_password: "{{ prometheus_mysqld_exporter_galera_password }}"
|
||||
mysqld_exporter_web_listen_address: "{{ ansible_host }}:9104"
|
Loading…
Reference in New Issue
Block a user