-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Added custom snmp v2 community parameter. #80
base: master
Are you sure you want to change the base?
Conversation
Thank you for rising this! And sorry for insanely late response! One thing I do not quite understand is how do you address the individual simulated agents? My immediate guess would be that you do that by network address (e.g. local or remote endpoint). In that case, snmpsim should work out of the box if you arrange your .snmprec files like this:
...if you select your agents by client address or like this:
...if you select your agent by the address/port it is listening on. The doc explains that in greater details. Would that work for you? Or your use-case is different? I am eager to learn than! ;-) |
Hi, Sorry for the delay with answering. Previously we used a different app to simulate snmp data, but at some point, it became very unstable, and we decided to move to snmpsimd. At the moment, we are using filenames to store a different kind of data (bug-id, device_type, etc.), and cannot change them to: But if we add a flag to specify snmp-community it allows us to override community from the filename, and use the same community on all the recordings. To run all these recordings we create a set of subinterfaces on a Linux server and assign ips based on the folder names I can share commands we use to run snmpsimd. Thank you, |
One thing I am not sure I understand is how do you map subinterfaces to .snmprec files? The only thought that comes to my mind is to do it through through SNMP transport-id OID... BTW, you can also symlink your .snmprec files to the names that snmpsimd would use for addressing. |
Hi, Let's say we created eth0:0 subinterface with IP 172.22.10.10, so we are adding Thank you, |
So you have snmpsimd listening at 172.22.10.10 and you have a bunch of .snmprec files laying around under strange names. How do you make snmpsimd picking the right file even if it trusts some known community name? That's what I am missing! |
Oh now I see, the command looks like: {recording_folder} = /home/user/recordings/recording1 |
Right, I see, thanks! That perhaps means that with the patch you are using, one snmpsimd process can serve just one .snmprec file under given community name.... BTW, if I got it right, you have one dedicated snmpsimd process per one local interface each serving one .snmprec file. So you might have lots of snmpsimd processes running? If that's the case, the entire foot print seems huge... The snmpsimd process is asynchronous internally so a single daemon can serve many (thousands) of interfaces if you just list the on the command line. That might be way more efficient. But then you will need to symlink your .snmprec files... |
Wow, and how that could be done from the command side? |
Just repeat --agent-udpv4-endpoint option as many times as you need to. If you run out of command-line length, you can use |
I see, will give it a test later. |
I think snmpsim should be fine serving many large recordings at once. It does not load much into RAM, mostly operating on disk files. |
Cool, I did try to make it work with one process, but symlinks are not useful since they require an extra step to adding each recording. Also, the minus of running snmpsimd as one process - it requires to restart it every time I add the new recording, which affects everyone who is using the simulator. So, If we can somehow eliminate the necessity of symlinks by supplying community names to snmpsimd by parameter or folder structure (ip/community/whatever-name-of-recording) or any other way, I would take a look at how to automatically load new recordings on the go. Thank you, |
Hi,
We have a lot of recordings and want to set the same community name for each of them.
That simplifies the testing process a lot.
Thank you,
Costya
P.S. Unfortunately we cannot share any of those recordings, but if you want I can run a few tests on them for you.