log.level setting is debug and --log.level flag is ignored

Bug #1982618 reported by Kay
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
prometheus-blackbox-exporter (Debian)
Fix Released
Unknown
prometheus-blackbox-exporter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The blackbox_exporter from the ubuntu jammy repository always logs with level 'debug' and ignores the flag to change the logging level.

# lsb_release -rd
Description: Ubuntu 22.04 LTS
Release: 22.04

# apt-cache policy prometheus-blackbox-exporter
prometheus-blackbox-exporter:
  Installed: 0.19.0-1
  Candidate: 0.19.0-1
  Version table:
 *** 0.19.0-1 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status

Expected behavior:

Starting the exporter via

# /usr/bin/prometheus-blackbox-exporter --web.listen-address=":9116" --log.level=error --config.file /etc/prometheus/blackbox.yml

and connecting interacting with it, e.g.

# curl -s 'localhost:9116/probe?module=tcp_connect&target=8.8.8.8:53'

Should only give output of level 'error' (nothing for me in this case). The original exporter

# wget 'https://github.com/prometheus/blackbox_exporter/releases/download/v0.19.0/blackbox_exporter-0.19.0.linux-amd64.tar.gz'

shows this behavior.

What happens instead:

Output of all levels, including 'debug' is returned on startup and when the exporter is queried

# ts=2022-07-22T21:32:36.105Z caller=main.go:224 level=info msg="Starting blackbox_exporter" version="(version=0.19.0, branch=debian/sid, revision=0.19.0-1)"
# ...
# ts=2022-07-22T21:32:36.107Z caller=main.go:259 level=debug routePrefix=/
# ...
# ts=2022-07-22T21:32:37.955Z caller=main.go:180 module=tcp_connect target=8.8.8.8:53 level=debug msg="Beginning probe" probe=tcp timeout_seconds=119.5

Tags: jammy
Revision history for this message
James Dingwall (a-james-launchpad) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in prometheus-blackbox-exporter (Ubuntu):
status: New → Confirmed
Revision history for this message
James Dingwall (a-james-launchpad) wrote :

I'm getting a syslog of ~2GB / week due to all the messages being recorded since upgrading to jammy.

tags: added: jammy
Changed in prometheus-blackbox-exporter (Debian):
status: Unknown → Fix Released
Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

Hitting this on jammy version 0.19.0-1ubuntu0.2 too

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.