We currently have checks set up to look at free memory using check_nt MEMUSE. But this check includes both swap and physical memory. I saw online something that mentioned using a check_nrpe command, check_memory, and that you could pass an argument so that it is checking only physical memory (check_nrpe -H <ipaddress> -c check_memory -a 'type=physical'). I figured out that I had to modify the nrpe.cfg (linux) and nsclient.ini (win) files to allow arguments to be sent and did that.
When I run the command against a Windows server, it works. But when I try and run the check against a linux server, I get an error: NRPE: Command 'check_memory' not defined.
When I look at the /usr/local/nagios/libexec directory on either the Nagios server or the server being monitored, check_memory does not exist. I don't understand how to proceed from here. Is check_memory a file I have to download from somewhere? If I obtain the file, do I just put it in that directory and problem solved? Or does it need to be defined somewhere else after that? I don't see a check_memory file on the Windows server anywhere so I'm not understanding why it works on one but not the other.
Trying to use check_nrpe for memory check
Re: Trying to use check_nrpe for memory check
Hello @dxb74
Thanks for reaching out, about checking memory. Sounds like you have figured out that the 'check_memory' plugin is available for Windows. You would want to use the 'custom_check_mem' on the Linux os. There is also the 'check_mem' from the plugin exchange you can look into as well.
For total physical memory, you can make adjustments to the script to meet your needs (echo "total="$total"MB").
Thanks,
Perry
Thanks for reaching out, about checking memory. Sounds like you have figured out that the 'check_memory' plugin is available for Windows. You would want to use the 'custom_check_mem' on the Linux os. There is also the 'check_mem' from the plugin exchange you can look into as well.
For total physical memory, you can make adjustments to the script to meet your needs (echo "total="$total"MB").
Thanks,
Perry