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.
Created attachment 1224365 [details] hawkular-trigger-json
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.
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
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)
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.
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
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(-)
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(-)
Verified on Version 5.8.0.0 JVM Non Heap Used is now compared with Non Heap Committed.