-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
SnmpTrap cant specify "Generic-Trap" Pysnmp version 4.4.3 #123
Comments
This looks confusing to me. You are sending enterprise OID and generic trap (e.g. Looking at this code, if you pass |
Hi Etingof, Thanks for replay and my apologies for the delay. I already read that code,
Watch the bold numbers. You cant specify (by rfc), the last number of the OID (9). It is translated inmediatly into "Generic-Trap". Try to throw the last command and, after, try to throw through your library. I dont know if you are understanding me Thank you so! |
So you want to send
However generic trap type 10 does not exist according to RFC1157:
That explains why pysnmp resets unknown trap types to Why do you need to generate SNMP TRAPs with supposedly non-compliant TRAP types? For reference, this is how you send custom specific-type with pysnmp. |
Hello Etingof, Thanks, I am agree with you. This is not a bug, cause you are following RFC1157 rules. Maybe this could be a "feature" like command snmptrap does. Why do we need this? So, dont worry, we should change our OID´s configuration following the RFC. I think so. Thanks for your time! |
Hello Etingof,
Version pysnmp (4.4.3)
I have an issue with "snmptrap" and you cant specify "Generic-Trap" like the original command "snmptrap".
snmptrap -v1 -c public 192.168.1.1 1.3.6.1.4.1.41019.2.7.1.1 127.0.0.1 3 9 12345 1.3.6.1.4.1.41019.2.7.1.0.5 s "minor" 1.3.6.1.4.1.41019.2.7.1.0.3 s "Test Alarm Request"
In command line, you can specify "Generic-Trap" with 3 and specific trap with 9. However with library you cannot.
When you use this it sends "Generic Trap" with 6
As you can see, you cant send that "Generic Trap". It always is set with "6"
I put another example:
snmptrap -v1 -c public 192.168.1.1 1.3.6.1.4.1.41019.2.7.1.1 127.0.0.1 10 9 12345 1.3.6.1.4.1.41019.2.7.1.0.5 s "minor" 1.3.6.1.4.1.41019.2.7.1.0.3 s "Test Alarm Request"
Generic Trap => 10
Specific Trap => 9
Pysnmp example:
As you can see, it sends "enterpriseSpecific" like Generic-Trap instead of 10.
Can you help us?
Thank you so!
The text was updated successfully, but these errors were encountered: