I'm putting this on the Nagios forum too, as Nsclient forum is not very active sometimes and I would need an answer to this: (http://www.nsclient.org/forums/topic/check_cpu/
Is there a way to use check_CPU on NSClient 0.4.3.88 to get information about all cores, but only alert when warning or critical threshold for total cpu is exceeded?
So I have now:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H windows_server -t 30 -c Check_CPU -a filter=none time=1 time=5 time=15 “warn=load > 65″ “crit=load > 75″ ‘top-syntax=%(status): CPU Stats {%(list)}’ ‘detail-syntax={%(core), avg %(time)m: %(load)%}’
WARNING: CPU Stats {{core 0, avg 1m: 66%}, {core 1, avg 1m: 35%}, {total, avg 1m: 50%}, {core 0, avg 5m: 64%}, {core 1, avg 5m: 36%}, {total, avg 5m: 50%}, {core 0, avg 15m: 67%}, {core 1, avg 15m: 34%}, {total, avg 15m: 50%}}|’core 0 1’=66%;65;75 ‘core 1 1’=35%;65;75 ‘total 1’=50%;65;75 ‘core 0 5’=64%;65;75 ‘core 1 5’=36%;65;75 ‘total 5’=50%;65;75 ‘core 0 15’=67%;65;75 ‘core 1 15’=34%;65;75 ‘total 15’=50%;65;75
I’ve tried several combinations, but none seem to work. For example:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H windws_server -t 30 -c Check_CPU -a filter=none time=1 time=5 time=15 “warn=core = total and load > 40″ “crit=core=total and load > 75″ ‘top-syntax=%(status): CPU Stats {%(list)}’ ‘detail-syntax={%(core), avg %(time)m: %(load)%}’
OK: CPU Stats {{core 0, avg 1m: 66%}, {core 1, avg 1m: 40%}, {total, avg 1m: 53%}, {core 0, avg 5m: 68%}, {core 1, avg 5m: 37%}, {total, avg 5m: 53%}, {core 0, avg 15m: 66%}, {core 1, avg 15m: 42%}, {total, avg 15m: 54%}}|’core 0 1’=66%;40;75 ‘core 1 1’=40%;40;75 ‘total 1’=53%;40;75 ‘core 0 5’=68%;40;75 ‘core 1 5’=37%;40;75 ‘total 5’=53%;40;75 ‘core 0 15’=66%;40;75 ‘core 1 15’=42%;40;75 ‘total 15’=54%;40;75
Thanks for any help.
Willem