[ZBX-17654] Unneeded use of JS in template "Memory utilization" Created: 2020 Apr 29 Updated: 2024 Apr 10 Resolved: 2020 Jun 04 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Templates (T) |
Affects Version/s: | 4.4.8 |
Fix Version/s: | 5.0.1rc1, 5.0.2rc1, 5.2.0alpha1, 5.2 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | patrik uytterhoeven | Assignee: | Tikhon Uskov (Inactive) |
Resolution: | Fixed | Votes: | 1 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() |
Team: | |
Sprint: | Sprint 64 (May 2020), Sprint 65 (Jun 2020) |
Story Points: | 0.25 |
Description |
in the memory template for "Memory utilization" the option vm.memory.size[pavailable] is used to calculate the % free memory and in preprocessing JS is used to calculate the % in use. why not just use pused instead of pavailable with JS ? this is complicating readability of this trigger a lot {TEMPLATE_NAME:vm.memory.size[pavailable].min(5m)} >{$MEMORY.UTIL.MAX} as one would think that 10% free memory over 5min needs to be bigger then 90 to fire off the trigger and this makes no sence of course. So it took me some time to figure out what was the catch. https://github.com/zabbix/zabbix/tree/master/templates/os/linux_active also for passive |
Comments |
Comment by Edgar Akhmetshin [ 2020 May 05 ] |
Hello Patrik, In terms of memory utilisation pused will show data differently: $ zabbix_agentd -t vm.memory.size[pavailable] vm.memory.size[pavailable] [d|48.995366] $ zabbix_agentd -t vm.memory.size[pused] vm.memory.size[pused] [d|88.454704] https://www.kernel.org/doc/Documentation/filesystems/proc.txt Also please note, description of the item is provided correctly:
Regards, |
Comment by patrik uytterhoeven [ 2020 May 13 ] |
ok i see your point avaialable is showing more then free also buffers etc. so indeed pused is not an option.
still the trigger is confusing due to the javascript as one would think available memory is ex 36% but with the JS now we have 63% as value so for the macro in our trigger we have to use a macro of 90% for pavailable instead of 10% this makes the trigger very confusing
Problem: {[someserver:vm.memory.size[pavailable]|https://monitor.cumuli.be/items.php?form=update&itemid=2295482].*min(*30m*)*} >{$MEMORY.UTIL.MAX}
|
Comment by Edgar Akhmetshin [ 2020 May 13 ] |
Hello Patrik, Template description: Memory used percentage is calculated as (100-pavailable)
Simplified: Memory utilization > macro {$MEMORY.UTIL.MAX} = report problem, if changes required - set this value lower or higher. There is no separate key for measuring memory utilization. If use your example, the data element and trigger settings will operate with different values, which will lead to confusion: item name - utilization, key and value - memory available, trigger - memory available < X. Using different item name and trigger also confusing. Currently where is no indication for items if preprocessing is used, you need to open preprocessing tab, covered by: Please suggest. Regards, |
Comment by patrik uytterhoeven [ 2020 May 13 ] |
my point was that JS is not needed here and making the trigger more confusing
i don't know if others agree or not documentation is ok that was never my issue
i really don't see the point of using JS in this item and then building a trigger on this item that works all the way different as one would expect without looking at the preprocessing tabs in the item. |
Comment by Tikhon Uskov (Inactive) [ 2020 Jun 03 ] |
Available in :
|