galera-operator icon indicating copy to clipboard operation
galera-operator copied to clipboard

Passing parameters to the docker prom/mysql-exporter

Open plafosse-orange opened this issue 5 years ago • 1 comments

According to the documentation of the prom/mysqld-exporter docker, it is possible to pass parameters to the mysqld-exporter program to be able to collect or delete certain metrics. For this, the collect flags must be passed under the args tag

Example deployment file

apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysqld-exporter
  labels:
    app: mysqld-exporter
spec:
  selector:
    matchLabels:
      app: mysqld-exporter
  replicas: 1
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9104"
      labels:
        app: mysqld-exporter
    spec:
      containers:
      - name: mysqld-exporter
        image: prom/mysqld-exporter
        args: [--collect.auto_increment.columns, --no-collect.slave_status]
        env:
        - name: DATA_SOURCE_NAME
          value: root:password@(mysql:3306)/ 

Currently, the Galera operator does not interpret the args tag at the metric container

plafosse-orange avatar Jun 30 '20 08:06 plafosse-orange

So you want to add an "args" field instead of designing your exporter with the right argument ? It can be implemented.

sebs42 avatar Jul 01 '20 07:07 sebs42