The problem is I always get this result: Memory usage: total:0.00 Mb - used: 0.00 Mb (nan%) - free: 0.00 Mb (nan%)
I understand the command give me and advice when the memory is up to 60 and 90 %. But I always get 0 %. And this value should be the physical memory + the swap size.
I just checked the counter.defs file supplied with the latest nsclient and it looks like the win2k info is missing for both Spanish and Portugese. Looking at what is missing from the Spanish version (copy/paste from the English part):
I’m pretty sure this is what is causing your problems. It looks like you’d have to find out the SPanish equivalents for this and add them to your counters.defs file.
"\Processor(_total)\% Processor Time"
By the way this is a counter. Use the performance monitor to find the exact names of the counters you need to check
the version of counter.defs I’m using has the spanish definition. This is:
[0x0C0A]
Description = "Spanish"
NT4_SystemTotalProcessorTime = "\Sistema% Tiempo total de
procesador"
NT4_SystemSystemUpTime = "\Sistema\Tiempo de actividad del sistema"
NT4_MemoryCommitLimit = "\Memoria\Límite comprometido"
NT4_MemoryCommitByte = “\Memoria\Bytes comprometidos”
and all them return always 0. I understand I should have them defined in counters.defs in spanish language, but I don’t know how or where to find the correct name for a Windows 2000.
Well, what I’m seeing is in counter.defs the spanish definition has lines only for NT4 parameters. But on the english section there are also these lines for win2000:
I think you have two choices. Using CPU as the example.
Update the counter.defs on the checked machine with the correct counters. You can find them from running performance monitor on the box as Luca stated. You should then be able to use the -v CPULOAD switch in the command. So you have a command like
$USER1$/check_nt -H $HOSTADDRESS$ -v CPULOAD -w $ARG1$ -c $ARG2$
Change the check command to -v COUNTER and put the counter on your Nagios box. e.g.
$USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v COUNTER -l
"\Processor(0)% Processor Time",“CPU 1 Load” -w $ARG1$ -c $ARG2$
THe other thing is to check that you are using the latest version of pnsclient. I messed around for days getting zeroes before upgrading to 2.0.1 and everything suddenly started working…
Ok, both you where right: I went to Perfomance Monitor, and I’ve added some of them.
Then, all this commands are working fine (in spanish):
./check_nt -H 192.168.11.57 -v COUNTER -l “\Procesador(_Total)% tiempo de procesador”
./check_nt -H 192.168.11.57 -v COUNTER -l “\Interfaz de red(Realtek RTL8139_810x Family Fast Ethernet NIC)\Total de s.”