Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions integrations/mysql/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the other example, we can update https://github.com/GoogleCloudPlatform/prometheus-engine/blob/main/examples/mysql/exporter.yaml.snippet directly (after addressing the other comments here)

But unlike the consul example, this PR doesn't become completely obsolete -- we do still need to update this file because of the change you made in line 70 (additional_install_info).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, just for clarity I wanted to make sure that the line you're mentioning here doesn't need to be changed? We just want to update things in this repo and the other one, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

kind: StatefulSet
metadata:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down