NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
177 stars 95 forks source link

Change NCPA memory/virtual to memory/physical #497

Open gaudxh opened 5 years ago

gaudxh commented 5 years ago

Change NCPA memory/virtual to memory/physical to ensure accurate understanding of the metric.

In NCPA memory/virtual is simple a measure of the RAM free/used, it doesn't include swap.

You can compare it to the output of "free -m":

[root@centos75 tmp]# free -m total used free shared buff/cache available Mem: 1838 168 1053 8 616 1473 Swap: 2047 0 2047

Which shows memory and swap separately, same as the API:

{ "virtual": { "available": [ 1.44, "GiB" ], "total": [ 1.8, "GiB" ], "percent": [ 19.8, "%" ], "free": [ 1.03, "GiB" ], "used": [ 0.2, "GiB" ] } }

ranjithkodumbu commented 5 years ago

When you make changes from virtual to physical in next versions, please also ensure to include current name(virtual), because many of them would have enabled with virtual in some of their automations, this will break if we are going to remove virtual in newer versions. So, my request is when you add physical; retain virtual as well.

jomann09 commented 5 years ago

Of course, if we do this we would keep the old endpoints at least until the next major version.