check_mem output differ from what we see on the server

Bancal Samuel <[email protected]> Mon, 31 Oct 2016 12:42:16 +0100
Newsgroups gmane.network.nagios.devel,gmane.network.monitoring.plugins.devel
Message-ID <[email protected]>
Hi,

We discovered some quite strange result from the check_mem plugin :

root@server:~# /usr/lib/nagios/plugins/check_mem --version
check_mem v$Revision: 1.8 $ (monitoring-plugins 2.1.2)
The Monitoring Plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

It says that no memory is used and some swap is. By looking the output from free, we read completely different values :

root@server:~# /usr/lib/nagios/plugins/check_mem -w 85,25 -c 92,50
<b>WARNING: Memory Usage (W> 85, C> 92): 0% <br>Swap Usage (W> 25, C> 50): 27%</b>|MemUsed=0%;85;92 SwapUsed=27%;25;50

root@server:~# free -k
               total        used        free      shared buff/cache   available
Mem:        2039560      804156      435688       21404 799716     1010344
Swap:        975868           0      975868

The host is a VM (VMware) running Ubuntu 16.04 server. Any idea on this inconsistency?

Regards,
Samuel Bancal


-- 
Samuel Bancal
ENAC-IT
EPFL