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

fix: log err when loading mibs #10735

Merged
merged 1 commit into from
Feb 28, 2022
Merged

fix: log err when loading mibs #10735

merged 1 commit into from
Feb 28, 2022

Conversation

reimda
Copy link
Contributor

@reimda reimda commented Feb 24, 2022

Log the error when loading mibs. This will give us more information in logs and hopefully clear up why users are seeing the "Couldn't stat target" log message.

@reimda reimda requested a review from MyaLongmire February 24, 2022 17:15
@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Feb 24, 2022
Copy link
Contributor

@MyaLongmire MyaLongmire left a comment

Choose a reason for hiding this comment

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

This will be super useful!

@telegraf-tiger
Copy link
Contributor

@Hipska
Copy link
Contributor

Hipska commented Feb 28, 2022

Example output from instances where they have mib loading problems:

Couldn't stat target /usr/share/snmp/mibs: lstat /usr/share/snmp/mibs/usr/share/snmp/mibs>

Not from me, but as reported in #10674 (comment) (it seems like the message is truncated)

@ericjohncarlson
Copy link

I also ran this binary (Telegraf 1.22.0-414f7780 (git: snmp-translate-log-err 414f7780)) and received the same output as Hipska:

2022-02-28T13:52:04Z W! [inputs.snmp] Couldn't stat target /usr/share/snmp/mibs: lstat /usr/share/snmp/mibs/usr/share/snmp/mibs: no such file or directory
2022-02-28T13:52:04Z W! [inputs.snmp] Couldn't stat target /usr/share/snmp/mibs: lstat /usr/share/snmp/mibs/usr/share/snmp/mibs: no such file or directory

@reimda reimda merged commit 79aa7f4 into master Feb 28, 2022
@reimda reimda deleted the snmp-translate-log-err branch February 28, 2022 18:37
MyaLongmire pushed a commit that referenced this pull request Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/snmp fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants