Monitor Remote Server Memory Usage
Posted: Tue Dec 29, 2015 4:19 pm
On my remote server, I'm running CentOS and I've installed "yum install nrpe nagios-plugins -all openssl".
My Nagios server is able to monitor CPU, SSH,Total Processes, and Logged in users on my remote server.
I would like to monitor memory on my remote server and visually see it on my Nagios web interface. Currently on my Nagios server, the memory service is displaying "status critical with NRPE: command 'check_mem' not defined."
On my remote server (client), I have configured NRPE to monitor memory usage. I used " wget https://raw.githubusercontent.com/justi ... eck_mem.pl" and was able to download and install it successfully. I say successfully because I can run ./check_mem -f -w 20 -c 10 and the output displays this "OK - 78.5% (3076688 kB) free.|TOTAL=3921616KB;;;; USED=844928KB;3137292;3529454;; FREE=3076688KB;;;; CACHES=713696KB;;;;"
As a result, the command is working on the remote client side. In addition, on the remote server side in /etc/nagios/nrpe.cfg I added this
"command[check_mem]=/usr/lib64/nagios/plugins/check_mem -f -w 20 -c 10"
What do I need to do on the Nagios server side recognize check_mem?
Also on the nagios server side in the /usr/local/nagios/etc/servers/client.cfg I have entered this
define service {
use generic-service
host_name NS1
service_description Memory
check_command check_nrpe!check_mem
}
When I run the command "/usr/local/nagios/libexec/check_nrpe -H 172.x.x.x -c check_mem
" from my Nagios server I get this error message "NRPE: Command 'check_mem' not defined"
My Nagios server is able to monitor CPU, SSH,Total Processes, and Logged in users on my remote server.
I would like to monitor memory on my remote server and visually see it on my Nagios web interface. Currently on my Nagios server, the memory service is displaying "status critical with NRPE: command 'check_mem' not defined."
On my remote server (client), I have configured NRPE to monitor memory usage. I used " wget https://raw.githubusercontent.com/justi ... eck_mem.pl" and was able to download and install it successfully. I say successfully because I can run ./check_mem -f -w 20 -c 10 and the output displays this "OK - 78.5% (3076688 kB) free.|TOTAL=3921616KB;;;; USED=844928KB;3137292;3529454;; FREE=3076688KB;;;; CACHES=713696KB;;;;"
As a result, the command is working on the remote client side. In addition, on the remote server side in /etc/nagios/nrpe.cfg I added this
"command[check_mem]=/usr/lib64/nagios/plugins/check_mem -f -w 20 -c 10"
What do I need to do on the Nagios server side recognize check_mem?
Also on the nagios server side in the /usr/local/nagios/etc/servers/client.cfg I have entered this
define service {
use generic-service
host_name NS1
service_description Memory
check_command check_nrpe!check_mem
}
When I run the command "/usr/local/nagios/libexec/check_nrpe -H 172.x.x.x -c check_mem
" from my Nagios server I get this error message "NRPE: Command 'check_mem' not defined"