Skip to content

fix(inputs.system): Demote missing utmp debug log to trace#18911

Merged
srebhan merged 1 commit into
influxdata:masterfrom
skartikey:fix/system-utmp-trace-log
May 19, 2026
Merged

fix(inputs.system): Demote missing utmp debug log to trace#18911
srebhan merged 1 commit into
influxdata:masterfrom
skartikey:fix/system-utmp-trace-log

Conversation

@skartikey

Copy link
Copy Markdown
Contributor

Summary

On systems without /var/run/utmp (newer Ubuntu, distroless containers, etc.), the users collection in inputs.system logs Reading users: ... no such file or directory every gather interval. The plugin already silently drops n_users / n_unique_users in this case, so the message is just diagnostic noise for anyone running with debug logging enabled.

This demotes that one log line (the os.IsNotExist branch) from debug to trace. The os.IsPermission case stays at debug (actionable) and unexpected errors stay at warn.

The include option added in #18533 will let users skip users entirely starting in v1.39.0, but the default config still gathers it, so the noise survives that change without this fix.

Checklist

Related issues

resolves #

The 'Reading users: ... no such file or directory' message fires every
gather interval on systems without /var/run/utmp (newer Ubuntu, distroless
containers, etc.). The plugin already silently skips n_users and
n_unique_users in this case, so the message is purely diagnostic noise
for any user running with debug logging enabled.

Demote only the os.IsNotExist branch to trace level. The os.IsPermission
case stays at debug (actionable) and unexpected errors stay at warn.
@telegraf-tiger telegraf-tiger Bot added area/system fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels May 13, 2026
@telegraf-tiger

Copy link
Copy Markdown
Contributor

@skartikey skartikey added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label May 19, 2026

@srebhan srebhan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @skartikey!

@srebhan srebhan merged commit fb05f3a into influxdata:master May 19, 2026
26 of 27 checks passed
@github-actions github-actions Bot added this to the v1.38.5 milestone May 19, 2026
@srebhan srebhan modified the milestones: v1.38.5, v1.39.0 Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/system fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants