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

"Failed to get disk metrics, permission denied" log message is unhelpful #328

Closed
dekobon opened this issue Jun 2, 2023 · 0 comments · Fixed by #329
Closed

"Failed to get disk metrics, permission denied" log message is unhelpful #328

dekobon opened this issue Jun 2, 2023 · 0 comments · Fixed by #329

Comments

@dekobon
Copy link
Contributor

dekobon commented Jun 2, 2023

This message is output from src/core/metrics/sources/disk.go:43. What appears to be going on here is that we loop through each mount point and collect disk usage metrics based on each one. However, if the operation fails for a given mount point there we do not output for which mount point an error was encountered.

As such, I'd suggest a change where we replace line 43 with the following:

c.logger.Log(fmt.Sprintf("Failed to get disk metrics for mount point %s, %v", part.Mountpoint, err))

If everyone is amenable, I'll submit a PR for this.

dekobon added a commit to dekobon/agent that referenced this issue Jun 2, 2023
Dean-Coakley pushed a commit that referenced this issue Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant