Bug 1398665 - There is no metric available "Non Heap Max", but referred on alert creation
Summary: There is no metric available "Non Heap Max", but referred on alert creation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Control
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 5.8.0
Assignee: Lucas Ponce
QA Contact: Sunil Kondkar
URL:
Whiteboard: Hawkular
Depends On:
Blocks: 1400213
TreeView+ depends on / blocked
 
Reported: 2016-11-25 14:04 UTC by Jeeva Kandasamy
Modified: 2019-08-06 20:03 UTC (History)
7 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1400213 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:05:41 UTC
Category: ---
Cloudforms Team: Middleware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
on gui (177.26 KB, image/png)
2016-11-25 14:04 UTC, Jeeva Kandasamy
no flags Details
hawkular-trigger-json (2.57 KB, text/plain)
2016-11-25 14:05 UTC, Jeeva Kandasamy
no flags Details

Description Jeeva Kandasamy 2016-11-25 14:04:37 UTC
Created attachment 1224364 [details]
on gui

Description of problem:
When we create alert for middleware server, we have an option "JVM Non Heap Used", when we select this, we have get parameter like "Non Heap Max (%)". AFAIK, This parameter never available on JVM also in Hawkular gauges metrics. I checked it on hawkular alerts/trigger, how alert created for this condition and it creates for Heap Max (NOT Non Heap Max). 

Version-Release number of selected component (if applicable):
Version: 5.7.0.12-rc2.20161123111642_a4a65ce
Server Name: EVM
User Name: Administrator
User Role: EvmRole-super_administrator
Browser: Firefox
Browser Version: 50
Browser OS: Linux
----
Middleware Manager Services:	Running	0.21.0.Final-redhat-1 (commit b7c207f5b74a5f96d77d25231118e80c4540b32c)	
Middleware Manager Metrics:	Running	0.21.5.Final-redhat-1 (commit 632f908a52d3e45b3a0bafa84e117ec6ca87bb19)	
Middleware Manager Alerts:	Running	1.3.2.Final-redhat-1 (commit 49ee44c49f38606772197fbf5dbe7eda2e1f42da)	
Middleware Manager Inventory:	Running	1.1.1.Final-redhat-1 (commit e9de950dec9c5d606d77a10fae95473c9c8e2554)

How reproducible:
100%


Steps to Reproduce:
1. Create an alert for middleware server with "JVM Non Heap Used" as evaluate option.
2. Now check the same alert on Hawkular alert service with REST API.

Actual results:
In GUI it shows comparison parameter as "Non Heap Max". AFAIK, This parameter never available in JVM. And on back-end "JVM Heap Max" used in the place of "JVM Non Heap Max".

Expected results:
We should address this correctly on GUI as well as on back-end.

Additional info: Screenshot and REST API JSON log file are attached.

Comment 2 Jeeva Kandasamy 2016-11-25 14:05:45 UTC
Created attachment 1224365 [details]
hawkular-trigger-json

Comment 3 Heiko W. Rupp 2016-11-25 14:22:12 UTC
I consider this as "not a bug", but a feature.
The alert is using a COMPARE condition (check the json you attached) to compare
the actual (non) heap usage with the max one. This can be done without a single metric of this name. The "compare" condition uses 2 metrics as input for this.

Comment 4 Jeeva Kandasamy 2016-11-25 14:30:22 UTC
Kindly note in attached GUI screen it shows as "Non Heap Max". But on back-end(json) we use "Heap Max". 

Non Heap Max != Heap Max

Comment 5 Heiko W. Rupp 2016-11-25 14:32:06 UTC
Now I get it...

Lucas the trigger seems to compare "Non Heap Used" with "Heap Max"  (and still this comparison may be misleading, as Heap Max does not necessarily be the same as -Xmx)

Comment 6 Lucas Ponce 2016-11-25 15:04:00 UTC
I guess this is a typo in the UI.

Or do we want to change the metrics used for the triggers ?

Hawkular Metrics involved are:

hm_g_MI~R~[c66c9a79-fb8a-4704-b9a1-deee6eaad9b8/Local~~]~MT~WildFly Memory Metrics~NonHeap Used
hm_g_MI~R~[c66c9a79-fb8a-4704-b9a1-deee6eaad9b8/Local~~]~MT~WildFly Memory Metrics~Heap Max

1) Are those metrics the correct ones desired for this alert ?

Note, that for Middleware Sever, available metrics are:

  - WildFly Memory Metrics~Heap Used: mw_heap_used
  - WildFly Memory Metrics~Heap Max: mw_heap_max
  - WildFly Memory Metrics~Heap Committed: mw_heap_committed
  - WildFly Memory Metrics~NonHeap Used: mw_non_heap_used
  - WildFly Memory Metrics~NonHeap Committed: mw_non_heap_committed
  - WildFly Memory Metrics~Accumulated GC Duration: mw_accumulated_gc_duration


2) If yes, we can fix the UI.

Comment 7 Lucas Ponce 2016-11-25 17:11:09 UTC
Correct.
As discussed, this is a bug.
NonHeap Used should compare with NonHeap Committed.

Sent a PR with the fix on:
https://github.com/ManageIQ/manageiq/pull/12861

Comment 8 CFME Bot 2016-11-29 15:51:14 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3d08a1e38e01f5b515c6e4b3cb9e701a73e07d49

commit 3d08a1e38e01f5b515c6e4b3cb9e701a73e07d49
Author:     Lucas Ponce <ponce.ballesteros>
AuthorDate: Fri Nov 25 18:05:11 2016 +0100
Commit:     Lucas Ponce <ponce.ballesteros>
CommitDate: Fri Nov 25 18:25:25 2016 +0100

    Fix alert definition: compare Middleware NonHeap with NonCommitted
    https://bugzilla.redhat.com/show_bug.cgi?id=1398665

 .../manageiq/providers/hawkular/middleware_manager/alert_manager.rb   | 4 +++-
 app/models/miq_alert.rb                                               | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

Comment 9 CFME Bot 2016-11-29 16:06:24 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/ccc8aeb5325730cd5d24202abaf0d46d8c70ae45

commit ccc8aeb5325730cd5d24202abaf0d46d8c70ae45
Author:     Adam Grare <agrare>
AuthorDate: Tue Nov 29 10:47:53 2016 -0500
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Tue Nov 29 11:01:00 2016 -0500

    Merge pull request #12861 from lucasponce/bz-1398665
    
    Fix alert definition: compare Middleware NonHeap with NonCommitted
    (cherry picked from commit 3cd63c5a963b06d21b288ce2fa7cee9fcc853443)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1398665

 .../manageiq/providers/hawkular/middleware_manager/alert_manager.rb   | 4 +++-
 app/models/miq_alert.rb                                               | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

Comment 12 Sunil Kondkar 2017-02-13 14:30:24 UTC
Verified on Version 5.8.0.0

JVM Non Heap Used is now compared with Non Heap Committed.


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