Page 1 of 1

Check_NRPE CPULOAD

Posted: Wed May 27, 2015 3:21 am
by Expertise
hello it's possible to see the differente processor with CPULOAD ?

i find this but the commande donc run with me LOL

http://sites.box293.com/nagios/guides/c ... s/cpu-load

Code: Select all

Command:

    check_nrpe -H 10.25.14.2 -c CheckCounter -a 'Counter:% Processor Used Core 0=\Processor(0)\% Processor Time' ShowAll MaxWarn=80 MaxCrit=90

Output:

    OK: % Processor Used Core 0: 21.5381|'% Processor Used Core 0'=21.53809;80;90

MINE :

CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs for error messages.
but i do correctly install of NRPE now i'm block ...

Re: Check_NRPE CPULOAD

Posted: Wed May 27, 2015 12:14 pm
by jdalrymple
If you want all of the individual processors you'll have to query them each:

Code: Select all

[jdalrymple@localhost libexec]$ for core in `seq 0 7`; do ./check_nrpe -H <winhost> -c checkcounter -a "Counter=\\Processor($core)\\% Processor Time"; done
OK: \Processor(0)\% Processor Time = 0|'\Processor(0)\% Processor Timenone'=0;0;0
OK: \Processor(1)\% Processor Time = 0|'\Processor(1)\% Processor Timenone'=0;0;0
OK: \Processor(2)\% Processor Time = 3|'\Processor(2)\% Processor Timenone'=3;0;0
OK: \Processor(3)\% Processor Time = 0|'\Processor(3)\% Processor Timenone'=0;0;0
OK: \Processor(4)\% Processor Time = 1|'\Processor(4)\% Processor Timenone'=1;0;0
OK: \Processor(5)\% Processor Time = 1|'\Processor(5)\% Processor Timenone'=1;0;0
OK: \Processor(6)\% Processor Time = 0|'\Processor(6)\% Processor Timenone'=0;0;0
OK: \Processor(7)\% Processor Time = 9|'\Processor(7)\% Processor Timenone'=9;0;0
Alternatively there is a "_Total" option which gives the avg across all of your cores:

Code: Select all

[jdalrymple@localhost libexec]$ ./check_nrpe -H <winhost> -c checkcounter -a "Counter=\\Processor(_Total)\\% Processor Time"
OK: \Processor(_Total)\% Processor Time = 3|'\Processor(_Total)\% Processor Timenone'=3;0;0