-
Notifications
You must be signed in to change notification settings - Fork 384
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
Slowness in SNMPInterfaceCollector skips other collector runs, making it Threaded does not work. #263
Comments
Because we're using derivative to convert the counters into metrics, we can't use a threaded method |
What is it about the current implementation of derivatives that makes them non-threadsafe? I'm very interested in using Diamond for SNMP, since collectd's support is painfully rough around the edges, but we also have some fairly long-running stats collections that need to be ironed out. |
The threads are short lived. They get destroyed after the scheduled collector run and then spawned anew on the next one. Any modifications to the local state get destroyed. We would need to synchronize the derivative deltas back to the main thread before we destroy the running thread. It's perfectly doable, just not done. |
I run into similar problem when I was trying to monitor a pair of Cat6Ke's. Timeouts and skipped interfaces. Part of the problem is that snmp is walking through the interfaces using individual snmpget. I think it's better to do snmpbulkget, and then walk through that instead. |
I agree, but it's a little complex. I'd happily accept a pull request that implemented it. |
Hopefully, this will help some folks. I encounter this same issue and re-wrote the collector itself to be multi-threaded. It likely needs work since I'm no python developer but you might try it out: |
Hi,
SNMP devices can be very slow. If you run with the default collector set and enable the SNMPInterfaceCollector, I have noticed scheduled runs for the default collectors get skipped.
I assume because the SNMPInterfaceCollector is working and blocking the thread in which the other collectors also run.
I have tried including "method=Threaded" in the SNMPInterfaceCollector.conf, but that gave me errors like:
... and ...
Since I get these errors after enabling threading, I guess the SNMPInterfaceCollector is not thread safe. "pysnmp" should be threadsafe (http://stackoverflow.com/a/10384203) "as long as you use a dedicated CommandGenerator per thread".
Any thoughts?
The text was updated successfully, but these errors were encountered: