Hello everyone,
I install nagios core 3.2.1 with the recents plugins on Ubuntu Server 10.04 LTS. All goes normal. But when i add a windows server to monitoring... in the services page it shows
Memory usage: total:4330.61 Mb - used: 1776.48 Mb (41%) - free: 2554.14 Mb (59%)
But my server only have 2 GB (It shows page file and system mem).
service is configure as
define service{
use generic-service
host_name serverad
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
How change this command or use other check, i mean check_nrpe
define service{
use generic-service
host_name serverad
service_description Memory Usage
check_command check_nrpe ???????????? what command go here
}
This command runs in command line, but in the check_command do not work
/usr/local/nagios/libexec$ sudo ./check_nrpe -H '192.168.1.11' -t 30 -c CheckMem -a MaxCrit=100% ShowAll type=physical
OK: physical memory: 1.61G|'physical memory %'=80%;822083633;100 'physical memory'=1.61G;16430728.01;1.99;0;1.99
Any have ideas
Thanks
Monitor mem usage without pagefile
Re: Monitor mem usage without pagefile
This is a result of how the check_nt plugin calculates memory values. The preferred solution for most users seems to be to use the check_nrpe plugin to distinguish the memory types.
GreatWolfResorts wrote:I essentially created the following custom command:
check_xi_service_nrpe:
Note: You will need to enable some NRPE commands in the nsc.ini file on the remote device. Specifically: allow_arguments=1Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c $ARG1$ -a MaxWarn=$ARG2$% MaxCrit=$ARG3$% $ARG4$ $ARG5$ $ARG4$ = "type=physical"
Alternatively, a full understanding of the check_nt MEMUSE command helps when reviewing the values returned. Windows refers to the sum of memory and swap files, that is, the entire available virtual memory. Windows regularly swaps program and data code from the main memory, even when it still has spare reserves. In this respect the load of the entire virual memory in Windows is the more important parameter to observe over simply physical or swap.
So in the end, the values returned weren't necessarily a bug in NagiosXI or nsclient++, but rather a view of the virtual memory of the machine.
Hope this helps!
Re: Monitor mem usage without pagefile
Hi everyone
This is the command I need to congifure en services file, but i'm don't know how to create that configuration... and I use Nagios Core, not Nagios XI.
agriffin you can tell me how and what files i need to edit or mod to monitor ram correctly.
Thanks
This is the command I need to congifure en services file, but i'm don't know how to create that configuration... and I use Nagios Core, not Nagios XI.
agriffin you can tell me how and what files i need to edit or mod to monitor ram correctly.
Thanks
Re: Monitor mem usage without pagefile
The information I provided applies just as well to Nagios Core as to Nagios XI. I've changed a few details here for simplicity. First you will need NRPE installed on the Windows machine (there's pretty good documentation on that here. In commands.cfg, add the following command:
Then add the following service definition to one of your Nagios config files:
Restart Nagios and it should work! Hope that helps!
Code: Select all
define command{
command_name check_windows_memory
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c checkMem -a MaxWarn=$ARG1$% MaxCrit=$ARG2$% type=physical $ARG3$
}
Code: Select all
define service{
use generic-service
host_name serverad
service_description Memory Usage
check_command check_windows_memory!80!90
}