Page 1 of 1
check_mem not work correctly
Posted: Tue Dec 13, 2016 2:59 pm
by baber
dear all
Hi
on my linux server i use check_mem.pl plugin for chk memory plugin status
Code: Select all
command[check_mem]=/usr/local/nagios/libexec/check_mem.pl -f -w 15 -c 10
and add this to service :
Code: Select all
define service{
use generic-service
host_name ntmbsrv
service_description Memory
check_command check_nrpe!check_mem
}
my problem is when my memory usage is high it will be appeaer critical but after 2 days server status is now ok and memory status is now decrease and is ok but my memory status is still appear critical and don't change to ok
what is problem ?
BR
Re: check_mem not work correctly
Posted: Tue Dec 13, 2016 3:18 pm
by dwhitfield
Please post your nrpe.cfg
Re: check_mem not work correctly
Posted: Tue Dec 13, 2016 4:27 pm
by baber
dwhitfield wrote:Please post your nrpe.cfg
This line is on remote host nrpe.cfg
command[check_mem]=/usr/local/nagios/libexec/check_mem.pl -f -w 15 -c 10
Re: check_mem not work correctly
Posted: Tue Dec 13, 2016 4:31 pm
by dwhitfield
Is that literally all that is in your nrpe.cfg? Seeing the settings will help us understand any issues you are having. If you are concerned about security, you can PM.
Re: check_mem not work correctly
Posted: Tue Dec 13, 2016 4:40 pm
by baber
dwhitfield wrote:Is that literally all that is in your nrpe.cfg? Seeing the settings will help us understand any issues you are having. If you are concerned about security, you can PM.
Thanks but this host using check_by_ssh not ise nrpe
Re: check_mem not work correctly
Posted: Tue Dec 13, 2016 4:55 pm
by dwhitfield
Did you post the right service definition? It says check_nrpe!check_mem
Re: check_mem not work correctly
Posted: Tue Dec 13, 2016 11:16 pm
by baber
dwhitfield wrote:Did you post the right service definition? It says check_nrpe!check_mem
Yes i hava defined service with check_mem and it is working now but problem is after 4 days percentage of memory usage that show not change in nagios but when ssh to remote host and get top command memory usage is 2% check_mem.pl plugin has problem?
BR
Re: check_mem not work correctly
Posted: Wed Dec 14, 2016 12:38 pm
by rkennedy
baber wrote:dwhitfield wrote:Is that literally all that is in your nrpe.cfg? Seeing the settings will help us understand any issues you are having. If you are concerned about security, you can PM.
Thanks but this host using check_by_ssh not ise nrpe
You are posting an NRPE command. Please post the ENTIRE definition to avoid any further confusion.
baber wrote:dear all
Hi
on my linux server i use check_mem.pl plugin for chk memory plugin status
Code: Select all
command[check_mem]=/usr/local/nagios/libexec/check_mem.pl -f -w 15 -c 10
and add this to service :
Code: Select all
define service{
use generic-service
host_name ntmbsrv
service_description Memory
check_command check_nrpe!check_mem
}
my problem is when my memory usage is high it will be appeaer critical but after 2 days server status is now ok and memory status is now decrease and is ok but my memory status is still appear critical and don't change to ok
what is problem ?
BR
Re: check_mem not work correctly
Posted: Thu Dec 15, 2016 8:19 am
by baber
rkennedy wrote:baber wrote:dwhitfield wrote:Is that literally all that is in your nrpe.cfg? Seeing the settings will help us understand any issues you are having. If you are concerned about security, you can PM.
Thanks but this host using check_by_ssh not ise nrpe
You are posting an NRPE command. Please post the ENTIRE definition to avoid any further confusion.
baber wrote:dear all
Hi
on my linux server i use check_mem.pl plugin for chk memory plugin status
Code: Select all
command[check_mem]=/usr/local/nagios/libexec/check_mem.pl -f -w 15 -c 10
and add this to service :
Code: Select all
define service{
use generic-service
host_name ntmbsrv
service_description Memory
check_command check_nrpe!check_mem
}
my problem is when my memory usage is high it will be appeaer critical but after 2 days server status is now ok and memory status is now decrease and is ok but my memory status is still appear critical and don't change to ok
what is problem ?
BR
i have added this to command.cfg file on nagios server
Code: Select all
define command{
command_name check_mem
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C '/usr/local/nagios/libexec/check_mem.pl -f -w 15 -c 10' -E
}
and added this on remote host for service
Code: Select all
define service{
use Mobile-service
host_name npmbsrv3
service_description Memory
check_command check_mem
}
now after 3 days status of memory on nagios show critical although my memory status is very low and attached pic from top on server why critical warning from monitoring not remove now ?
BR
Re: check_mem not work correctly
Posted: Thu Dec 15, 2016 2:42 pm
by rkennedy
You only have 150MB of memory free, I believe Nagios is reporting correctly. Take a look at the free -m command which may be a bit easier to visualize.