https://support.nagios.com/kb/article/m ... s-774.html
Unfortunately, this does not seem to be the case. Even the example that is given in the above document seems to include cached memory. In our situation, we end up with cached being added to total memory used and often exceed 100% of memory used. For example:If you do not want the cached memory to be part of the thresholds calculations the -n argument is used:
Code: Select all
root@pxe1:~# /usr/lib/nagios/plugins/custom_check_mem -w 20 -c 10 -n
OK - 6875 / 3951 MB (174%) Free Memory, Used: 335 MB, Shared: 40 MB, Buffers: 3027 MB, Cached: 3259 MB | total=3951MB free=6875MB used=335MB shared=40 buffers=3027MB cached=3259MB
root@pxe1:~# /usr/lib/nagios/plugins/custom_check_mem -w 20 -c 10
OK - 3617 / 3951 MB (91%) Free Memory, Used: 334 MB, Shared: 40 MB, Buffers: 3027 MB, Cached: 3259 MB | total=3951MB free=3617MB used=334MB shared=40 buffers=3027MB cached=3259MB[edit] - not a php file