-
Notifications
You must be signed in to change notification settings - Fork 10
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
Need a simple way of selecting large range of OIDs #28
Comments
I have the same need. I can't write directly in code which IP address will be addressed. I need this to be configurable from a variable. Can we contribute with a solution? I'm trying to put all of this into matrices to see if I can increase the monitoring size. |
Perhaps I should clarify: I wanted it to be easier to poll entire ranges of octets on a single network device. In my specific situation, I want to be able to poll the number of packets coming in and out of all (or up to) 48 of the ports on my core network switch. I have worked out how to scan entire ranges of octets, and got some functional code working for it. I can scan up to 30 ports before I have issues with the device crashing for reason I do not know. I will attach the code that I have worked out. - with some caveats:
I hope this works. :) |
Thanks @JonnyPhenomenon I think your example may help others and I appreciate all the comments you've added, though a couple slightly misunderstand what's going on, but those can be easily fixed. I'll leave the code here for now, but I might look to add a version of it (with credit to you) to the examples section when a find a bit of spare time. What I really like to do is create a more flexible option where a device can be defined/modelled to make it easier to poll multiple and different devices for differing data. Where data is available in tables, like switch ports, ideally the size of the table should be able to be calculated and data structures created to support the variable size of the tables, rather than using hard coded values. However finding the time, and managing this complexity in a ESP32 library would be quite time consuming, especially when you can there are existing Standard libraries for Linux which would allow relatively low power devices like a Raspberry Pi to do this already. An SNMP Manager (not agent) on an ESP32 is pretty niche, in a space where usage of SNMP is also relatively limited. |
I imagine this is more of a feature request than an issue, please forgive me.
I want to use an esp32 to poll the ifInOctets and ifOutOctets for up to 48 ports on a network switch, so I can control several addressable LED strips in the classroom to show where the network traffic is flowing.
Is there an easier way to create entire ranges of variables and callbacks and oid handlers and so on?
Currently, there is like 20 different locations that I have to create a new mention of each of the oid's I want to poll and process, and I would love to be able to just say "grab all the oid's from .1.3.6.1.2.1.2.2.1.10.1 through 48", but I don't know what I am doing . :(
can someone help us out here?
The text was updated successfully, but these errors were encountered: