Monitor Memory Usage on Linux host

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Monitor Memory Usage on Linux host

Post by neworderfac33 »

Good afternoon,

Whilst the 2.1.1 plugins I installed on my Linux hosts included check_users, check_load, check_disk and check_procs, I don't seem to be able to find anything for checking memory usage (unless it's lurking in there under a different name!)

What plugin would you recommend for monitoring memory on a Linux host, please?

I'm using nagios Core 4.0.8, by the way.
Master and hosts run on Redhat Enterprise Linux Server 6.6.
Hosts have check_nrpe 2.15 installed

I Googled this, but it doesn't indicate compatibility with my version of Core.
https://exchange.nagios.org/directory/P ... pl/details

Thanks in advance

Pete
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitor Memory Usage on Linux host

Post by rkennedy »

Take a look at this plugin which should work fine -
https://exchange.nagios.org/directory/P ... sh/details

As an example -

Code: Select all

[root@centos7x64 libexec]# wget -O 'check_mem' 'https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=4174&cf_id=24'
--2016-11-23 12:31:00--  https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=4174&cf_id=24
Resolving exchange.nagios.org (exchange.nagios.org)... 66.228.58.94, 2600:3c02::f03c:91ff:fedf:d653
Connecting to exchange.nagios.org (exchange.nagios.org)|66.228.58.94|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3418 (3.3K) [application/octet-stream]
Saving to: ‘check_mem’

100%[======================================>] 3,418       --.-K/s   in 0.001s

2016-11-23 12:31:01 (3.97 MB/s) - ‘check_mem’ saved [3418/3418]

[root@centos7x64 libexec]# chmod +x check_mem
[root@centos7x64 libexec]# ./check_mem
[MEMORY] Total: 3791 MB - Used: 905 MB - 23% [SWAP] Total: 2047 MB - Used: 0 MB - 0% | MTOTAL=3975606272;;;; MUSED=947126272;;;; MCACHE=944615424;;;; MBUFFER=1855488;;;; STOTAL=2147479552;;;; SUSED=0;;;;
Former Nagios Employee
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Monitor Memory Usage on Linux host

Post by avandemore »

There are a lot of plugins which check memory:

https://exchange.nagios.org/directory/P ... ics/Memory

The plugin you reference should work on Core 4.x
Previous Nagios employee
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Monitor Memory Usage on Linux host

Post by neworderfac33 »

I managed to get check_mem working successfully - thank you very much for the recommendation and the installation instructions, rkennedy! :-)

This thread can now be closed

Pete
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitor Memory Usage on Linux host

Post by rkennedy »

No problem! :D

/closed
Former Nagios Employee
Locked