Description of problem: Alerts don't send SNMP traps. Version-Release number of selected component (if applicable): 5.7.0.3.20160927165516_075d0f3 How reproducible: Always Steps to Reproduce: 1. Enable "Notifier" role. 2. Create an alert with following parameters: Based On: VM and Instance What to Evaluate: Nothing Driving Event: VM Operation: VM Power Off Notification Frequency: 1 Minute Send SNMP Trap Host: localhost Version: v2 Trap Object ID: info Variable Object ID Type Value 1.2.3 Integer 1 3. Create VM and Instance alert profile. 4. Add the alert to the alert profile. 5. Assign the alert profile to "The Enterprise". 6. Power off a VM. Actual results: SNMP trap is not sent, there is an error in the log: ERROR -- : /var/www/miq/vmdb/app/models/miq_snmp.rb:75:in `trap_v2' - for SNMP v2 ERROR -- : /var/www/miq/vmdb/app/models/miq_snmp.rb:75:in `trap_v2' - for SNMP v1 Expected results: SNMP trap should be sent.
There was wrong copypaste in the first comment, should be: ERROR -- : /var/www/miq/vmdb/app/models/miq_snmp.rb:31:in `trap_v1' - for SNMP v1
https://github.com/ManageIQ/manageiq/pull/11988
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/e42a5311358b8b70f2d0e75ee5ea74353bfa24fe commit e42a5311358b8b70f2d0e75ee5ea74353bfa24fe Author: Lucy Fu <lufu> AuthorDate: Mon Oct 17 14:19:19 2016 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Oct 17 14:21:10 2016 -0400 Fix the issue that alerts don't send SNMP traps. Private methods can only be called without an explicit receiver. https://bugzilla.redhat.com/show_bug.cgi?id=1381287 app/models/miq_snmp.rb | 16 ++++++++-------- spec/models/miq_snmp_spec.rb | 12 ++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 spec/models/miq_snmp_spec.rb
*** Bug 1381500 has been marked as a duplicate of this bug. ***
New commit detected on ManageIQ/manageiq/euwe: https://github.com/ManageIQ/manageiq/commit/5c08fab4970337d274b35a49bbb64956efa42036 commit 5c08fab4970337d274b35a49bbb64956efa42036 Author: Oleg Barenboim <chessbyte> AuthorDate: Tue Oct 18 06:07:45 2016 -0500 Commit: Oleg Barenboim <chessbyte> CommitDate: Tue Oct 18 22:38:10 2016 -0500 Merge pull request #11988 from lfu/snmp_trap_1381287 Fix the issue that alerts don't send SNMP traps. (cherry picked from commit f62e14ec595b242db2a53cb910b6708049c1bb36) https://bugzilla.redhat.com/show_bug.cgi?id=1381287 app/models/miq_snmp.rb | 18 +++++++++--------- spec/models/miq_snmp_spec.rb | 12 ++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 spec/models/miq_snmp_spec.rb
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/a33cd9b6bbb2d6115a10be63b92854b59d707f00 commit a33cd9b6bbb2d6115a10be63b92854b59d707f00 Author: Lucy Fu <lufu> AuthorDate: Thu Oct 20 17:33:08 2016 -0400 Commit: Lucy Fu <lufu> CommitDate: Thu Oct 20 17:33:28 2016 -0400 Fix the issue that alerts don't send SNMP v1 traps. Private methods can only be called without an explicit receiver. https://bugzilla.redhat.com/show_bug.cgi?id=1381287 app/models/miq_snmp.rb | 6 +++--- spec/models/miq_snmp_spec.rb | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-)
Verified in 5.8.0.4.20170307183144_745a3d9. SNMP alerts is sent correctly.