Wrong amount of memory returned


#1

Hi, and thanks for your help,

I just finished installing Nagios 3.1 on OpenSUSE 11. Everything seems to be working fine except for one thing.

I installed the NSClient on 3 different Windows 2003 R2 (French) and all returns wrong amount of memory. Exemple, this server has 1G of memory, and this is returned by the built in memory check for windows boxes "Memory usage: total:2469.50 Mb - used: 507.17 Mb (21%) - free: 1962.33 Mb (79%) ".

2 are VMs and 1 is physical. Is this a know issue, anybody has any clue regarding this?

Thanks a lot in advance!


#2

what command are you running?


#3

Thanks for the help,

Here is what I use :

define service{
use generic-service
host_name XXXXXX
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}

Thanks again,


#4

what’s in command.cfg for check_nt ? have you tried running ./check_nt from command line and see if it returns a different value?


#5

Here is what I have.

‘check_nt’ command definition

    command_name    check_nt
    command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s nagios -v $ARG1$ $ARG2$

What do I need to configure to be able to run this ./check_nt from the prompt of the server?


#6

I get the same value

CIT-MONITOR02:/usr/local/nagios/libexec # ./check_nt -H 172.16.0.2 -p 12489 -s nagios -v MEMUSE
Memory usage: total:2469.50 Mb - used: 470.68 Mb (19%) - free: 1998.82 Mb (81%) | ‘Memory usage’=470.68Mb;0.00;0.00;0.00;2469.50


#7

is this the Vserver or the physical server? no idea what’s happening… possibly the NSclient logs can give you some insight :slight_smile:


#8

It’s the physical server.

But the Nagios server is running on a VM.

Thanks again for your help, I will look into the NSClient logs.


#9

I found why the value are screwed up. The check_nt returns the total amount of RAM and virtual memory.

Is there any way I could modify my check so that it would return only the value for the RAM?

Thanks.