Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ping Internal Appearing in Access Log #12751

@Torreip

Description

@Torreip

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?

While implementing observability, I was going over Traefik Access Log and noticed and high amount of localhost call After a bit of digging I narrowed it down to the ping@internal (as they disapear when ping is disabled and they don't register inside the metrics). I use the /ping endpoint to verify the reverse proxy state (which is done from another machine on the same network) and it's implemented in a Dynamic configuration.

What did you see instead?

A higher baseline (see first and second image) of logs looking like the following:

{"ClientAddr":"127.0.0.1:50036","ClientHost":"127.0.0.1","ClientPort":"50036","ClientUsername":"-","DownstreamContentSize":19,"DownstreamStatus":404,"Duration":49121,"GzipRatio":0,"OriginContentSize":0,"OriginDuration":0,"OriginStatus":0,"Overhead":49121,"RequestAddr":":443","RequestContentSize":0,"RequestCount":158,"RequestHost":"","RequestMethod":"HEAD","RequestPath":"/ping","RequestPort":"443","RequestProtocol":"HTTP/1.1","RequestScheme":"http","RetryAttempts":0,"StartLocal":"2026-03-02T15:18:49.563546864Z","StartUTC":"2026-03-02T15:18:49.563546864Z","entryPointName":"websecure","level":"info","msg":"","time":"2026-03-02T15:18:49Z"}

The actual head scratcher being that this log line is alone and is missing the actual "caller" (the machine calling the /ping endpoint) whom seems to be correctly filtered. Following are two images, the first a log baseline with ping enabled and the second one without ping

Ping enabled Log Quantity Ping disabled Log Quantity

What version of Traefik are you using?

Version: 3.6.9
Codename: ramequin
Go version: go1.25.7
Built: 2026-02-23T17:12:19Z
OS/Arch: linux/amd64

What is your environment & configuration?

Treafik.yml

global:
  checkNewVersion: true
  sendAnonymousUsage: false

entryPoints:
  web:
    address: ":80"
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
      sanitizePath: true
      encodedCharacters:
        allowEncodedSlash: false
        allowEncodedBackSlash: false
        allowEncodedNullCharacter: false
        allowEncodedSemicolon: false
        allowEncodedPercent: false
        allowEncodedQuestionMark: false
        allowEncodedHash: false
  websecure:
    address: ":443"
    http:
      tls:
        certResolver: letsencrypt
        domains:
          - main: REDACTED
            sans:
              - REDACTED
      sanitizePath: true
      encodedCharacters:
        allowEncodedSlash: false
        allowEncodedBackSlash: false
        allowEncodedNullCharacter: false
        allowEncodedSemicolon: false
        allowEncodedPercent: false
        allowEncodedQuestionMark: false
        allowEncodedHash: false
    forwardedHeaders:
      trustedIPs:
        - "173.245.48.0/20"
        - "103.21.244.0/22"
        - "103.22.200.0/22"
        - "103.31.4.0/22"
        - "141.101.64.0/18"
        - "108.162.192.0/18"
        - "190.93.240.0/20"
        - "188.114.96.0/20"
        - "197.234.240.0/22"
        - "198.41.128.0/17"
        - "162.158.0.0/15"
        - "104.16.0.0/13"
        - "104.24.0.0/14"
        - "172.64.0.0/13"
        - "131.0.72.0/22"
        - 2400:cb00::/32
        - 2606:4700::/32
        - 2803:f800::/32
        - 2405:b500::/32
        - 2405:8100::/32
        - 2a06:98c0::/29
        - 2c0f:f248::/32
        - "127.0.0.1/32"
        - "10.0.0.0/8"
        - "192.168.0.0/16"
        - "172.16.0.0/12"

  ssh:
    address: ":22"

log:
  filePath: /var/log/traefik/traefik.log
  format: json
  level: INFO

accessLog:
  filePath: /var/log/traefik/access.log
  format: json
  filters:
    statusCodes:
      - "200-201"
      - "400-404"
      - "500-503"
  addInternals: false

metrics:
  otlp:
    grpc:
      insecure: true
  addInternals: false

providers:
  file:
    directory: /etc/traefik/conf.d
    watch: true

certificatesResolvers:
  letsencrypt:
    acme:
      email: REDACTED
      storage: /etc/traefik/acme.json
      profile: "shortlived"
      certificatesDuration: 160
      dnsChallenge:
        provider: cloudflare
        resolvers:
          - "1.1.1.1:53"
          - "8.8.8.8:53"
api: {}

ping:
  entryPoint: websecure
  manualRouting: true

Custom Ping Router

http:
  routers:
    ping:
      rule: Host(`REDACTED`) && PathPrefix(`/ping`)
      service: ping@internal
      tls:
        certResolver: letsencrypt
        domains:
          - main: REDACTED
          - sans:
              - REDACTED
      entryPoints:
        - web
        - websecure
      middlewares:
        - trusted-ips

VM running Ubuntu 24.04, and Traefik running inside a SystemD Service

If applicable, please paste the log output in DEBUG level

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions