Red Hat Bugzilla – Bug 744262
[RFE] Request adding parent and grandparent resource name to SNMP Alerts
Last modified: 2013-05-28 12:56:14 EDT
Description of problem:
Request ability to have the name of the JBoss instance as part of the SNMP alerts, which is in most cases the parent or the grand parent of the monitored resource.
Version-Release number of selected component (if applicable):
Assigned to Larry base on new RFE process
As for email alert, we can include the resourceHierarchy(obtained via the ResourceManager.getResourcesAncestry) in the information sent by the SnmpTrapSender.sendSnmpTrap.
The customer need is to directly identify the AS instance when alerts happen on resources such as MemoryPools or web connectors.
Created attachment 548879 [details]
Patch for the MIB change
Created attachment 548880 [details]
SNMP plugin change path file
47086c0 in master
Pushing back to ONQA to understand more about how this was tested. SNMP alert notifications would be a good thing to automate the testing of
1) Added keyword: "NeedsTestCase"
2) Documenting existing testcases
Alert Sender SNMP Testcase:
Email Alert Sender Testcases (from comment #2):
General Alert Sender Testcases
https://tcms.engineering.redhat.com/plan/2883/ ... testcases 62040 thru 62051
Sunil ... please add or update a TCMS testcase for the change in this specific BZ, and schedule a regression test of these 2 testcases:
Jeeva ... please consider adding a CLI test for this ... perhaps building on the existing developer-owned Alert CLI test named testAlerts.js located in rhq/modules/cli-tests
Upgrades need to be tested, such that existing customers that have SNMP alerts set can continue to work unchanged.
FYI: when I run the unit test that came with this patch ResourceManagerBeanTest.testResourceLineage (which, btw, has tabs in the source - a no-no), it succeeds the first time, but fails the second time and thereafter:
ERROR 16-02 21:20:31,611 [org.hibernate.util.JDBCExceptionReporter] (JDBCExceptionReporter.java:logExceptions:78) -ERROR: duplicate key value violates unique constraint "rhq_agent_name_unique"
Detail: Key (name)=(hamza007) already exists.
Unless I'm missing something, this test needs to be fixed.
moving to ASSIGNED - as far as I can tell, the unit test is broken and needs to be fixed.
ips confirms this on his box too - this test doesn't clean up after itself and fails on the 2nd attempt and thereafter.
I fixed the unit test.
Changing to Verified.
Steps to test:
1) Start an SNMP listener (for example, run comand 'snmptrapd -Lf /tmp/snmpd.log)
2) Create alert on a resource
3) Add condition (for example, resource goes down)
3) Add SNMP notification to alert and point to the SNMP listener
4) Save alert
5) Trigger the alert (for example, cause the resource to go down)
6) Verify alert shows in history for the resource in the JON UI
7) Verify the SNMP listener received the notification (for example, check /tmp/snmpd.log)