Check_NRPE CPULOAD

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Expertise
Posts: 20
Joined: Thu Apr 23, 2015 8:20 am

Check_NRPE CPULOAD

Post 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 ...
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Check_NRPE CPULOAD

Post 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
Locked