check_nrpe and check_mem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

check_nrpe and check_mem

Post by xlin125 »

A service was added to check the memory usage on a remote Linux server using check_nrpe from a Nagios XI server. The service status on the Nagios XI web interface showed the memory usage status on the remote Linux server. However, the /usr/local/nagios/libexec/check_mem does not exist. . Where is the check_mem file? The installation of the Nagios XI server or Nagios NRPE agent does not come with a check_mem but the files like check_swap, check_load, and check_procs are copied over to /usr/local/nagios/libexec directory when installing a Nagios XI server or a NRPE agent.

I wanted to add a service to monitor memory usage status on a Nagios XI server locally, just like I do for cpu (check_local_load/check_load), swap (check_local_swap/check_swap), and processes (check_local_procs/check_procs), but check_mem is not available/does not exist by default installation. Any recommendation for a check_mem plugin? Thanks!
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: check_nrpe and check_mem

Post by gormank »

Try the following:

[root@txslm2mlnag001 etc]# pwd
/usr/local/nagios/etc

[root@txslm2mlnag001 etc]# grep check_mem commands.cfg
[root@txslm2mlnag001 etc]#

[root@txslm2mlnag001 etc]# locate check_mem
/usr/local/nagios/libexec/custom_check_mem
/usr/local/nrdp/plugins/SunOS/custom_check_mem

[root@txslm2mlnag001 etc]# ll /usr/local/nagios/libexec/custom_check_mem
-rwxr-xr-x 1 root root 3060 Mar 10 22:10 /usr/local/nagios/libexec/custom_check_mem

[root@txslm2mlnag001 etc]# grep check_mem nrpe.cfg
[root@txslm2mlnag001 etc]# grep check_mem nrpe/common.cfg
command[check_mem]=/usr/local/nagios/libexec/custom_check_mem -n $ARG1$

So on my system the check_mem command is defined in common.cfg, and refers to the custom_check_mem file...
xlin125
Posts: 172
Joined: Mon Jan 19, 2015 6:01 pm

Re: check_nrpe and check_mem

Post by xlin125 »

It works. Thank you!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_nrpe and check_mem

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked