Bug 967744

Summary: Unable to create alert definition with Event condition type
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.8CC: theute
Target Milestone: ---   
Target Release: RHQ 4.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-11 09:53:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Libor Zoubek 2013-05-28 08:34:17 UTC
Description of problem: I a not able to create alert condition of 'Drift' type. Issue is very similar to Bug 967488


Version-Release number of selected component (if applicable):
4.8-master

How reproducible: always


Steps to Reproduce:
do POST /alert/definitions?resourceId=xxx

with body

{"dampeningCategory": "NONE", "conditions": [{"category": "EVENT", "name": "INFO", "option": ".*"}], "conditionMode": "ALL", "enabled": true, "name": "rest-condition-event"}

Actual results:
Can not construct instance of org.rhq.core.domain.alert.AlertConditionOperator from String value 'INFO': value not one of declared Enum instance names\n at [Source: org.apache.catalina.connector.CoyoteInputStream@327cc96c; line: 1, column: 66] (through reference chain: org.rhq.enterprise.server.rest.domain.AlertDefinitionRest[\"conditions\"]->org.rhq.enterprise.server.rest.domain.AlertConditionRest[\"name\"])

Expected results:

alert definition is created. When creating a definition of type "EVENT", "name" should be interpreted as "event severity" enum and "option" is a regular expression to match message.

Comment 1 Heiko W. Rupp 2013-06-04 19:09:35 UTC
master e718326

Comment 2 Heiko W. Rupp 2013-09-11 09:53:46 UTC
Bulk closing of old issues now that HRQ 4.9 is in front of the door.

If you think the issue has not been solved, then please open a new bug and mention this one in the description.