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

InfluxDB Metrics provider not working in v3.0 #10500

Closed
2 tasks done
mira-miracoli opened this issue Mar 5, 2024 · 3 comments
Closed
2 tasks done

InfluxDB Metrics provider not working in v3.0 #10500

mira-miracoli opened this issue Mar 5, 2024 · 3 comments

Comments

@mira-miracoli
Copy link

mira-miracoli commented Mar 5, 2024

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?

I am running traefik as docker swarm service, and before I added these following lines to my docker swarm configuration, everything worked fine:

      - --metrics.influxdb=true
      - --metrics.influxdb.pushinterval=10s
      - --metrics.influxdb.address={{ influxdb.url }}
      - --metrics.influxdb.protocol=http
      - --metrics.influxdb.database={{ influxdb.node.database }}
      - --metrics.influxdb.username={{ influxdb.node.username }}
      - --metrics.influxdb.password={{ influxdb.node.password }}

I am deploying with ansible, in case you are wondering about the {{ variables }}.

What did you see instead?

When I check the service with docker service inspect traefik I see the following:

traefik.1.semllbuvwmso@XXXXXXX | {"level":"error","error":"command traefik error: failed to decode configuration from flags: field not found, node: influxdb","time":"2024-03-05T14:03:55Z","message":"Command error"}

What version of Traefik are you using?

v3.0

What is your environment & configuration?

It may look a bit strange because traefik is deployed as docker swarm service by my own ansible role

traefik_containers:
  - name: traefik
    image: traefik:v3.0
    url: "https://traefik.{{ tailscale_domain }}/dashboard/#/" # this is a special var for my ansible health check
    state: started
    replicas: 1
    restart_policy: on-failure
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    environment:
      CLOUDFLARE_DNS_API_TOKEN_FILE: "/run/secrets/cloudflare_zone_token"
    networks:
      - traefik
    command:
      - --ping
      - --ping.entryPoint=websecure
      - --api=true
      - "--providers.swarm.exposedByDefault=false"
      - "--providers.swarm.endpoint=unix:///var/run/docker.sock"
      - --api.dashboard=true
      - --api.insecure=false
      - --global.sendAnonymousUsage=false
      - --global.checkNewVersion=false
      - --entryPoints.web.address=:80
      - --entryPoints.websecure.address=:443
      - --entrypoints.web.http.redirections.entrypoint.to=websecure
      - --entrypoints.web.http.redirections.entrypoint.scheme=https
      - "--entryPoints.websecure.http.tls.domains[0].main={{ traefik_domain }}"
      - --entryPoints.https.http.tls.certresolver=dns-cloudflare
      - "--entryPoints.websecure.http.tls.domains[0].sans=*.{{ traefik_domain }}"

      # Influx Metrics
      - --metrics.influxdb=true
      - --metrics.influxdb.pushinterval=10s
      - --metrics.influxdb.address={{ influxdb.url }}
      - --metrics.influxdb.protocol=http
      - --metrics.influxdb.database={{ influxdb.node.database }}
      - --metrics.influxdb.username={{ influxdb.node.username }}
      - --metrics.influxdb.password={{ influxdb.node.password }}



      - "--providers.file.directory=/rules"
      - "--providers.file.watch=true"
      ## DNS Challenge
      - --certificatesResolvers.ts.tailscale=true
      - --certificatesResolvers.dns-cloudflare.acme.storage=/letsencrypt/acme.json
      - --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.provider=cloudflare
      - --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.resolvers=1.1.1.1:53,1.0.0.1:53
      - --certificatesresolvers.dns-cloudflare.acme.caserver=https://acme-v02.api.letsencrypt.org/directory

      # Enable Logging
      - "--log=true"
      - "--log.level=INFO"

    labels:
      "traefik.enable": "true"
      #"traefik.http.routers.traefik.rule": "Host(`{{ traefik_domain }}`) || Host(`www.{{ traefik_domain }}`)"
      "traefik.http.routers.traefik.rule": "Host(`traefik.{{ tailscale_domain }}`)"
      "traefik.http.routers.traefik.entrypoints": "websecure,web"
      "traefik.http.routers.traefik.tls": "true"
      "traefik.http.routers.traefik.tls.certresolver": "ts"
      "traefik.http.routers.traefik.tls.domains[0].main": "traefik.{{ tailscale_domain }}"
      "traefik.http.routers.traefik.service": "api@internal"
      "traefik.http.services.dummy-svc.loadbalancer.server.port": "9999"

    security_opts:
      - "label:type:container_runtime_t"

    mode: replicated

    mounts:
      - source: "/var/run/docker.sock"
        target: "/var/run/docker.sock"
        type: bind
        readonly: true
      - source: "/var/run/tailscale"
        target: "/var/run/tailscale"
        type: bind
        readonly: true
      - source: "/etc/traefik/rules/"
        target: "/rules"
        type: bind
        readonly: true
      - source: "/etc/traefik/acme.json"
        target: "/letsencrypt/acme.json"
        type: bind
        readonly: false
      - source: "/var/log/traefik/"
        target: "/var/log/traefik"
        type: bind
        readonly: false

    publish:
      - target_port: 80
        published_port: 80
        protocol: tcp
      - target_port: 443
        published_port: 443
        protocol: tcp
      - target_port: 8080
        published_port: 8080
        protocol: tcp

    secrets:
      - secret_name: cloudflare_zone_token

If applicable, please paste the log output in DEBUG level

{"level":"error","error":"command traefik error: failed to decode configuration from flags: field not found, node: influxdb","time":"2024-03-05T14:31:03Z","message":"Command error"}

@rtribotte
Copy link
Member

Hello @mira-miracoli,

Thanks for your interest in Traefik!

Indeed, InfluxDB (1) support has been dropped in v3, please check out the dedicated section of our migration guide.
However, InfluxDB2 is supported.

I'm closing this issue as a question accordingly.

@mira-miracoli
Copy link
Author

Thanks, then it would be nice to mark that accordingly, because I found this page, and nothing on it stated, that it was dropped in v3. would be nice to have a bar or something that shows the traefik version I am looking at in the docs

@rtribotte
Copy link
Member

Hello @mira-miracoli,

I think "emphasize the version selector" in issue #9549 is tracking what you are suggesting, and it is definitively something we want to improve.

Until v3 is GA, the latest version is still v2.x, and the documentation version selector (which is at the bottom of the left-side menu) selects the latest version by default.

@traefik traefik locked and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants