Bug 1381500

Summary: Alerts don't send SNMP v1 traps
Product: Red Hat CloudForms Management Engine Reporter: Dmitry Misharov <dmisharo>
Component: ControlAssignee: Lucy Fu <lufu>
Status: CLOSED DUPLICATE QA Contact: Dmitry Misharov <dmisharo>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: cpelland, jhardy, obarenbo
Target Milestone: GA   
Target Release: cfme-future   
Hardware: All   
OS: All   
Whiteboard: alert
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-18 13:21:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Dmitry Misharov 2016-10-04 09:57:45 UTC
Description of problem:
Alerts don't send SNMP v1 traps.

Version-Release number of selected component (if applicable):
5.6.2.1.20160922130607_92d5b5e

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: v1
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 v1 trap is not sent. An error occurred:
ERROR -- : /var/www/miq/vmdb/app/models/miq_snmp.rb:153:in `agent_address'
/var/www/miq/vmdb/app/models/miq_snmp.rb:31:in `trap_v1'

Expected results:
SNMP v1 trap should be sent sent without errors in the log.

Comment 2 Greg McCullough 2016-10-04 17:30:14 UTC
Lucy - Looked into the stack trace for this one and I am thinking that 

miq_snmp.rb needs from change:
  VMDB::Config.new("vmdb").get(:server, :host)
to
  VMDB::Config.new("vmdb").config.fetch_path(:server, :host)

Comment 3 Lucy Fu 2016-10-18 13:21:51 UTC

*** This bug has been marked as a duplicate of bug 1381287 ***