Zabbix Memory Used key

user2307236 picture user2307236 · Sep 11, 2016 · Viewed 8.1k times · Source

I have an item that has vm.memory.size[used] as a key, this returns the memory used, this also included the cached and the buffers.

I need to subtract vm.memory.size[cached] and vm.memory.size[buffers] from the vm.memory.size[used] to get the value that I need.

How can I do this please since I cannot find a way to do this, this what I tried lately but deos not work. enter image description here

Answer

Richlv picture Richlv · Sep 11, 2016

If you want to calculate it in a separate item, you must have used, cached and buffers already monitored as normal items. Once you have them, the calculated item formula would be last(vm.memory.size[used])-last(vm.memory.size[cached])-last(vm.memory.size[[buffers]) .

You can also calculate that directly in a trigger, removing the need for the calculated item.

And maybe even simpler than that - vm.memory.size[available] and vm.memory.size[pavailable] item keys can give you the (raw and percentage, respectively) amount of the available memory - already excluding cache & buffers - that you might be able to alert on directly.