influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.53k stars 5.56k forks source link

DBus envvar message #15934

Open knollet opened 4 days ago

knollet commented 4 days ago

Relevant telegraf.conf

None. The message appears directly **before**

telegraf[1564]: 2024-09-15T23:07:55Z I! Loading config: /etc/telegraf/telegraf.conf

Logs from Telegraf

telegraf[1564]: time="2024-09-16T01:07:55+02:00" level=warning msg="DBUS_SESSION_BUS_ADDRESS envvar looks to be not set, this can lead to runaway dbus-daemon processes. To avoid this, set envvar DBUS_SESSION_BUS_ADDRESS=$XDG_RUNTIME_DIR/bus (if it exists) or DBUS_SESSION_BUS_ADDRESS=/dev/null." func="gosnowflake.(*defaultLogger).Warn" file="log.go:244"

System info

telegraf 1.31.3 + telegraf 1.32.0, RHEL8

Docker

No response

Steps to reproduce

  1. Install telegraf 1.31.3 or telegraf 1.32.0 on RHEL8
  2. look at the journal (journalctl -u telegraf)

Expected behavior

We'd either expect no message, if it works without this envvar or we'd expect documentation, that we should set this variable and what to.

Actual behavior

This warning message, worrying us.

Additional info

No response

1tft commented 1 day ago

We also get this warning when we execute (under root or telegraf user) telegraf --version:

telegraf --version
WARN[0000]log.go:244 gosnowflake.(*defaultLogger).Warn DBUS_SESSION_BUS_ADDRESS envvar looks to be not set, this can lead to runaway dbus-daemon processes. To avoid this, set envvar DBUS_SESSION_BUS_ADDRESS=$XDG_RUNTIME_DIR/bus (if it exists) or DBUS_SESSION_BUS_ADDRESS=/dev/null.
Telegraf 1.31.3 (git: HEAD@ecf94b12)

with Telegraf 1.30.3 we dont get this warning:

telegraf --version
Telegraf 1.30.3 (git: HEAD@fd4af886)

So it seems not directly related to https://github.com/influxdata/telegraf/pull/14539

Currently for telegraf user this dbus variable is not set. printenv DBUS_SESSION_BUS_ADDRESS result is empty. So maybe this variable should be set during telegraf installation?