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
SNMP - Cannot find module #4896
Comments
What is the output of this command?
|
|
Hi there,
but when I tries to use Telegraf 1.9.4, it can't find the module:
config:
System:
|
Actually I have find a root cause, thanks to @dustnic.
But the proper one is missing within the container with telegraf:
Are there any ideas how to fix that? |
Ok, so there is a workaround: Basically I just copy all the MIBs from local host to container (probably, this is vey dirty solution), but afterwards I get snmpwalk from container running:
|
Unfortunatelly, the workournd turned to be not working, as despite the fact the SNMPWALK from container is working now, the telegraf itself continue to show errors in logs:
|
I'm not sure what the cause is, my only guess is that it is permission related. Can you show steps starting from the official telegraf container that allow the error to be reproduced? |
Hi @danielnelson, sure, see below, please:
Any ideas? Thanks and BR, |
Presumably you are restarting Telegraf after copying the MIBS over and Telegraf is running as root in the container? |
nope, I don't restart telegraf. Despite adding persistent storage the MIBs aren't saved after the restart, hence I would need to copy them back again. |
Interesting, I have somewhat the same problem. I get this error: Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none) |
Basically you should have in /usr/share/snmp/mibs/ all the files you are trying to poll. |
Finally solved by restarting the container: After the restart, the telegraf container starts polling the counters properly |
Closing, since this doesn't appear to be a Telegraf issue. |
Is it possible to restart Telegraf in the container without killing PID1? Some binaries like nginx support doing this so I thought I would ask. I'm running the container on Kubernetes, so the MIBs are copied in when the pod (container) is deployed as persistent volumes are not handled the same way in Kubernetes.... |
You can reload Telegraf by sending it a SIGHUP, it will reread the configuration and restart the plugins without exiting. |
I had to install this: apt install snmp snmp-mibs-downloader After setting the router's IP, all errors went away and everything started working. Don't forget to entire the router IP in the Dashboard |
The 1.14.5-alpine now works fine the 1.14.5 does not work and still suffers from this problem |
Relevant telegraf.conf:
System info:
Telegraf : 1.8.1
OS: Centos 7
Activated plugins - vsphere, snmp, system
Steps to reproduce:
Expected behavior:
To be able to get SNMP metrics and pushed to Influx output
Actual behavior:
When running the telegraf test for config, fetches other metrics for System but no SNMP metrics
$telegraf --config /etc/telegraf/telegraf.conf --test
Also when checking the status
Additional info:
I also tried doing a snmpwalk, which works perfectly fine for the ip address.
[Include gist of relevant config, logs, etc.]
The text was updated successfully, but these errors were encountered: