Docker-Raspberry-PI-Monitoring icon indicating copy to clipboard operation
Docker-Raspberry-PI-Monitoring copied to clipboard

SWAP Used is not available

Open recodyx opened this issue 1 year ago • 1 comments

All other metrics are working, but SWAP Used always shows N/A

Any idea what i can do?

Ubuntu 22.04

missing_swapbytes

P.S. on my raspberry pi 4 it works without problem

recodyx avatar Feb 08 '24 19:02 recodyx

it is deletion by zero...

Fix: change ((node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes) / (node_memory_SwapTotal_bytes)) * 100 to ((node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes) / (node_memory_SwapTotal_bytes + 1)) * 100

recodyx avatar Feb 09 '24 12:02 recodyx