Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqld.address never applied #854

Open
SponsorAds opened this issue Jul 12, 2024 · 0 comments
Open

mysqld.address never applied #854

SponsorAds opened this issue Jul 12, 2024 · 0 comments

Comments

@SponsorAds
Copy link

SponsorAds commented Jul 12, 2024

I am trying to use the exporter in docker with mysqld on the host machine.
Both inside docker ("localhost) does work.

Exporter does not seem to take the host setting, no matter what I try. It seems the host is hardcoded to localhost in the latest version.

You can clearly see in the log it is using localhost. Even changing the port does nothing.

compose:

  mysqld-exporter:
    image: prom/mysqld-exporter:latest
    container_name: monitoring_mysqld_exporter
    environment:
      - MYSQLD_EXPORTER_PASSWORD=xx
    volumes:
      - /var/docker_images/mysqld_exporter.cnf:/cfg/mysqld_exporter.cnf
    command:
      #- "--config.my-cnf=/cfg/mysqld_exporter.cnf"
      - "--mysqld.username=exporter"
      - "--mysqld.address=xxx:3306"
      - "--no-collect.slave_status"
    restart: unless-stopped
    ports:
      - 9104:9104
    expose:
      - 9104
    networks:
      - traefik
    labels:
      - "traefik.enable=false"

Log:

ts=2024-07-12T22:39:35.295Z caller=mysqld_exporter.go:220 level=info msg="Starting mysqld_exporter" version="(version=0.15.1, branch=HEAD, revision=cc349684494b5038ec5a52233bdca9eb9291e6f2)"
ts=2024-07-12T22:39:35.295Z caller=mysqld_exporter.go:221 level=info msg="Build context" build_context="(go=go1.21.5, platform=linux/amd64, user=root@d89c15b9f5ad, date=20231212-07:55:09, tags=unknown)"
ts=2024-07-12T22:39:35.295Z caller=mysqld_exporter.go:233 level=info msg="Scraper enabled" scraper=global_status
ts=2024-07-12T22:39:35.295Z caller=mysqld_exporter.go:233 level=info msg="Scraper enabled" scraper=global_variables
ts=2024-07-12T22:39:35.295Z caller=mysqld_exporter.go:233 level=info msg="Scraper enabled" scraper=info_schema.innodb_cmp
ts=2024-07-12T22:39:35.295Z caller=mysqld_exporter.go:233 level=info msg="Scraper enabled" scraper=info_schema.innodb_cmpmem
ts=2024-07-12T22:39:35.295Z caller=mysqld_exporter.go:233 level=info msg="Scraper enabled" scraper=info_schema.query_response_time
ts=2024-07-12T22:39:35.295Z caller=tls_config.go:274 level=info msg="Listening on" address=[::]:9104
ts=2024-07-12T22:39:35.295Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=[::]:9104
ts=2024-07-12T22:40:36.766Z caller=exporter.go:152 level=error msg="Error pinging mysqld" err="dial tcp [::1]:3306: connect: connection refused"
ts=2024-07-12T22:41:36.765Z caller=exporter.go:152 level=error msg="Error pinging mysqld" err="dial tcp [::1]:3306: connect: connection refused"
ts=2024-07-12T22:42:36.765Z caller=exporter.go:152 level=error msg="Error pinging mysqld" err="dial tcp [::1]:3306: connect: connection refused"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant