Bug 1319019 - Alert definition with conditions which are using threshold values for metrics with % as base unit created via REST are incorrectly displayed in UI
Summary: Alert definition with conditions which are using threshold values for metrics...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: REST, UI
Version: JON 3.3.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: JON 3.3.6
Assignee: Michael Burman
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-18 12:46 UTC by Filip Brychta
Modified: 2016-06-02 15:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-02 15:29:45 UTC
Type: Bug


Attachments (Terms of Use)
screen shot (67.54 KB, image/png)
2016-03-18 12:46 UTC, Filip Brychta
no flags Details

Description Filip Brychta 2016-03-18 12:46:10 UTC
Created attachment 1137772 [details]
screen shot

Description of problem:
Condition with threshold value set to 4% is displayed as 400% in UI.

Version-Release number of selected component (if applicable):
JON3.3.5

How reproducible:
Always

Steps to Reproduce:
1. create following alert definition via rest:
curl -ivX POST -u rhqadmin:rhqadmin -H "Content-Type: application/json" -H "accept: application/json" -d '{"recoveryId": 0, "name": "Test alert", "conditionMode": "ANY", "enabled": true, "priority": "MEDIUM", "notifications": [{"config": {"emailAddress": "blabla"}, "senderName": "Direct Emails"}], "dampeningCategory": "NONE", "conditions": [{"category": "THRESHOLD", "threshold": 80, "measurementDefinition": 10027, "comparator": ">"}]}' fbr-jon330.bc.jonqe.lab.eng.bos.redhat.com:7080/rest/alert/definitions?resourceId=10001

Note that you need to change resourceId for your platform resourceId and measurementDefinition id must match System Load metrics and host must be changed as well.

This will create new alert definition
2. get the new alert definition:
curl -iv -u rhqadmin:rhqadmin -H "Content-Type: application/json" -H "accept: application/json" fbr-jon330.bc.jonqe.lab.eng.bos.redhat.com:7080/rest/alert/definition/10065

3. find the alert definition in UI and go to condition tab

Actual results:
After step 2:
{"id":10065,"name":"Test alert","enabled":true,"priority":"MEDIUM","recoveryId":0,"conditionMode":"ANY","conditions":[{"category":"THRESHOLD","id":10075,"threshold":80.0,"option":null,"triggerId":null,"comparator":">","measurementDefinition":10027,"name":"System Load"}],"notifications":[{"id":10025,"senderName":"Direct Emails","config":{"emailAddress":"blabla"},"extraConfig":{}}],"dampeningCategory":"NONE","dampeningCount":0,"dampeningPeriod":0,"dampeningUnit":null,"links":[{"coregui":{"href":"http://fbr-jon330.bc.jonqe.lab.eng.bos.redhat.com:7080/coregui/#Resource/10001/Alerts/Definitions/10065"}},{"resource":{"href":"http://fbr-jon330.bc.jonqe.lab.eng.bos.redhat.com:7080/rest/resource/10001"}}]}

threshold value is correctly shown as 80

After step 3 (see attached screen shot) threshold value is shown as 8000.0% which is incorrect


Expected results:
Threshold value should be correctly shown in UI.

Additional info:
This is not a regression, it's been there at least since JON3.2.3

Comment 4 Filip Brychta 2016-06-02 15:29:45 UTC
Triage: Larry, Simeon, Filip -> closing as not a bug. The behavior is expected.


Note You need to log in before you can comment on or make changes to this bug.