Skip to content
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

Trap receiver support #72

Open
iwanb opened this issue Sep 11, 2017 · 5 comments
Open

Trap receiver support #72

iwanb opened this issue Sep 11, 2017 · 5 comments

Comments

@iwanb
Copy link

iwanb commented Sep 11, 2017

I would like to receive SNMP traps and parse them with Snimpy's MIB manager.

Do you have an idea how it could be added?
I would guess something like a trap_receiver(port) on the manager, which would listen on the port and give you a manager-like way to navigate the traps, to see if they are active, to suppress them, to count how many were received. Some filtering would also be useful to support larger amounts of traps.

I can have a try at it if you would be interested in such a feature.

@vincentbernat
Copy link
Owner

I don't have an opinion on this. This doesn't seem an easy fit for Snimpy API style, but if you manage to find a way to integrate into the existing style, why not.

@iwanb
Copy link
Author

iwanb commented Sep 15, 2017

I looked a bit into it and I think the way it would fit is:

  • adding agent or at least in memory table support (like Add agent support #6 but without serving),
  • each trap/notification would create an in memory "agent" from the variable bindings,
  • you can browse the trap content as if you were querying the agent, e.g. agent.snmpTrapOID.

With this the notification receiver could be completely separate and would not pollute the API.

@vincentbernat
Copy link
Owner

I like this plan. 👍

But I cannot help right now.

@iwanb
Copy link
Author

iwanb commented Sep 18, 2017

In case somebody would be interested, I found an easier alternative: I use the Net-Snmp smpd server with the snmptrapd receiver as a subagent, and connect to the SNMP server with snimpy.
The notifications can be accessed in the NOTIFICATION-LOG-MIB

I had to use this trick to make it work (or I guess you could configure SNMPv3):
http://freesnmp.com/net-snmp/faqs/#trapdlog

@vincentbernat
Copy link
Owner

Didn't know about that. Nice workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants