-
Notifications
You must be signed in to change notification settings - Fork 50
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 basic snmptrap configuration. #185
Conversation
Hi @deligatedgeek thanks for the contribution I have reviewed it, and this code will need some adjustment - as you note, it works in your environment, but it will break some environments, and I think we need to consider the overall structure (using a define). Some quick notes on the code as written:
Re the overall structure - the way this is structured really depends on whether you can have multiple instances of triggers defined - or can you only ever have one? If you can only have one set of trigger configuration, then I think this makes sense to change this to be a class, or maybe just have it in the main |
Hi @deligatedgeek would you like to attack these changes, or would you prefer someone else to take this on? |
Hi @nward, I'm back to this project at work so will be happy to make the changes |
Hi @nward, The trigger.conf file is written to use snmptraps, but could be easily rewrite to call a web hook or any other cli method, and I think I overthought this solution because of that. I pulled in the latest changes which appear to have broken tests |
This reverts commit e8de0af.
Exceeded my git abilities to revert the changes made when I merged origin master into my branch. Will create a new PR once unwound |
This includes the trigger.conf and allows configuration of trap destination and community string.
I think installing snmp OS packages, and the Freeradius bibs, which are installed by RHEL derivatives but not Debian, should be handled by module users, as instructed by Freeradius.
Thinking in the future to add a hash which would enable a set of traps