MySQL Forums
Forum List  »  MySQL & Kubernetes

Re: Question regarding MySQL Operator
Posted by: Prasad Kris
Date: November 23, 2023 04:11AM

It looks like there is an issue/bug with the metrics provider. The docs ( suggest that we can pass the exporter command-line arguments as options (InnoDBCluster.spec.metrics.options), but it ignores the options passed

enable: true
image: prom/mysqld-exporter
monitor: true
monitorSpec: {}
- --mysqld.address=localhost:3306
- --mysqld.username=root

and just starts the mysqld_exporter without any options, resulting in the log messages as mentioned above.

$ mysqld_exporter
ts=2023-11-23T10:07:05.058Z caller=mysqld_exporter.go:220 level=info msg="Starting mysqld_exporter" version="(version=0.15.0, branch=HEAD, revision=6ca2a42f97f3403c7788ff4f374430aa267a6b6b)"
ts=2023-11-23T10:07:05.058Z caller=mysqld_exporter.go:221 level=info msg="Build context" build_context="(go=go1.20.5, platform=linux/amd64, user=root@c4fca471a5b1, date=20230624-04:09:04, tags=netgo)"
ts=2023-11-23T10:07:05.058Z caller=config.go:150 level=error msg="failed to validate config" section=client err="no user specified in section or parent"
ts=2023-11-23T10:07:05.058Z caller=mysqld_exporter.go:225 level=info msg="Error parsing host config" err="no configuration found"

This seems to be a bug that needs to be fixed. A workaround would be to create a custom Docker image with modified ENTRYPOINT/COMMAND including the required arguments, so it will work as intended, Thanks!

Options: ReplyQuote

Written By
Re: Question regarding MySQL Operator
November 23, 2023 04:11AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.