diff --git a/integrations/mysql/documentation.yaml b/integrations/mysql/documentation.yaml index cc17e4654e..2fd432c8a5 100644 --- a/integrations/mysql/documentation.yaml +++ b/integrations/mysql/documentation.yaml @@ -11,6 +11,16 @@ minimum_exporter_version: v0.14.0 multiple_dashboards: false dashboard_display_name: {{app_name_short}} Prometheus Overview config_mods: | + + apiVersion: v1 + + kind: ConfigMap + + metadata: + + name: mysql-exporter-config + + data: + + my.cnf: | + + [client] + + user=root + + password=password + --- apiVersion: apps/v1 kind: StatefulSet metadata: @@ -27,15 +37,18 @@ config_mods: | spec: containers: + - name: exporter - + image: prom/mysqld-exporter:v0.14.0 - + env: - + - name: DATA_SOURCE_NAME - + value: root:password@(localhost:3306)/ + + image: prom/mysqld-exporter:v0.15.0 + + args: + + - --config.my-cnf=/home/my.cnf + ports: + - containerPort: 9104 + name: prometheus - - image: mysql:5.7 - name: mysql + + volumeMounts: + + - mountPath: /home/my.cnf + + subPath: my.cnf + + name: mysql-exporter-config + - name: mysql + image: mysql:5.7 env: - name: MYSQL_ROOT_PASSWORD value: password @@ -47,7 +60,13 @@ config_mods: | value: sbtest ports: - containerPort: 3306 - name: mysql + + volumes: + + - name: mysql-exporter-config + + configMap: + + name: mysql-exporter-config + + items: + + - key: my.cnf + + path: my.cnf podmonitoring_config: | apiVersion: monitoring.googleapis.com/v1 kind: PodMonitoring @@ -68,7 +87,7 @@ podmonitoring_config: | additional_prereq_info: | For information about creating a least-privileged user, see [Required Grants](https://github.com/prometheus/mysqld_exporter#required-grants){:class=external}. additional_install_info: - Update the `DATA_SOURCE_NAME` environment variable with credentials that work with your {{app_name}} instance. + Update the `--config.my-cnf` argument with a path to a configuration file with credentials that work with your {{app_name}} instance sample_promql_query: up{job="mysql", cluster="{{cluster_name}}", namespace="{{namespace_name}}"} alerts_config: | apiVersion: monitoring.googleapis.com/v1