Hello XI support
How to monitor CPU via NSclient with NRPE instead of NSclient commands?
Thank you
Windows NRPE commands for CPU monitoring
Re: Windows NRPE commands for CPU monitoring
There are usually some aliases for check_cpu, defined in the nsclient.ini file that you could use.
Example:
In the nsclient.ini:
Running a check from the CLI on the Nagios XI server:
As an alternative, you could use the "check_cpu" command (instead of using an alias, and "hardcoding" the args) and pass whatever arguments you need to.
Example:
For more info on the check_cpu usage, please review the NSClient++ documentation here:
https://docs.nsclient.org/reference/win ... #check_cpu
Hope this helps. Thank you!
Example:
In the nsclient.ini:
Code: Select all
alias_cpu_all = check_cpu filter=none "warn=load > 80" "crit=load > 90" time=5m time=1m time=30sCode: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c alias_cpu_all
OK: CPU load is ok.|'core 0 5m'=10%;80;90 'core 1 5m'=1%;80;90 'core 2 5m'=2%;80;90 'core 3 5m'=3%;80;90 'core 4 5m'=5%;80;90 'core 5 5m'=0%;80;90 'core 6 5m'=0%;80;90 'core 7 5m'=5%;80;90 'total 5m'=3%;80;90 'core 0 1m'=4%;80;90 'core 1 1m'=0%;80;90 'core 2 1m'=2%;80;90 'core 3 1m'=0%;80;90 'core 4 1m'=3%;80;90 'core 5 1m'=0%;80;90 'core 6 1m'=0%;80;90 'core 7 1m'=2%;80;90 'total 1m'=1%;80;90 'core 0 30s'=2%;80;90 'core 1 30s'=0%;80;90 'core 2 30s'=1%;80;90 'core 3 30s'=0%;80;90 'core 4 30s'=0%;80;90 'core 5 30s'=0%;80;90 'core 6 30s'=0%;80;90 'core 7 30s'=1%;80;90 'total 30s'=0%;80;90Example:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_cpu -a filter=none "warn=load > 80" "crit=load > 90"
OK: CPU load is ok.|'core 0 5m'=10%;80;90 'core 1 5m'=0%;80;90 'core 2 5m'=3%;80;90 'core 3 5m'=1%;80;90 'core 4 5m'=4%;80;90 'core 5 5m'=0%;80;90 'core 6 5m'=0%;80;90 'core 7 5m'=4%;80;90 'total 5m'=3%;80;90 'core 0 1m'=5%;80;90 'core 1 1m'=0%;80;90 'core 2 1m'=2%;80;90 'core 3 1m'=0%;80;90 'core 4 1m'=2%;80;90 'core 5 1m'=0%;80;90 'core 6 1m'=0%;80;90 'core 7 1m'=2%;80;90 'total 1m'=1%;80;90 'core 0 5s'=5%;80;90 'core 1 5s'=0%;80;90 'core 2 5s'=3%;80;90 'core 3 5s'=0%;80;90 'core 4 5s'=2%;80;90 'core 5 5s'=0%;80;90 'core 6 5s'=0%;80;90 'core 7 5s'=3%;80;90 'total 5s'=1%;80;90https://docs.nsclient.org/reference/win ... #check_cpu
Hope this helps. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Windows NRPE commands for CPU monitoring
Would this one work?lmiltchev wrote:There are usually some aliases for check_cpu, defined in the nsclient.ini file that you could use.
Example:
In the nsclient.ini:Running a check from the CLI on the Nagios XI server:Code: Select all
alias_cpu_all = check_cpu filter=none "warn=load > 80" "crit=load > 90" time=5m time=1m time=30sAs an alternative, you could use the "check_cpu" command (instead of using an alias, and "hardcoding" the args) and pass whatever arguments you need to.Code: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c alias_cpu_all OK: CPU load is ok.|'core 0 5m'=10%;80;90 'core 1 5m'=1%;80;90 'core 2 5m'=2%;80;90 'core 3 5m'=3%;80;90 'core 4 5m'=5%;80;90 'core 5 5m'=0%;80;90 'core 6 5m'=0%;80;90 'core 7 5m'=5%;80;90 'total 5m'=3%;80;90 'core 0 1m'=4%;80;90 'core 1 1m'=0%;80;90 'core 2 1m'=2%;80;90 'core 3 1m'=0%;80;90 'core 4 1m'=3%;80;90 'core 5 1m'=0%;80;90 'core 6 1m'=0%;80;90 'core 7 1m'=2%;80;90 'total 1m'=1%;80;90 'core 0 30s'=2%;80;90 'core 1 30s'=0%;80;90 'core 2 30s'=1%;80;90 'core 3 30s'=0%;80;90 'core 4 30s'=0%;80;90 'core 5 30s'=0%;80;90 'core 6 30s'=0%;80;90 'core 7 30s'=1%;80;90 'total 30s'=0%;80;90
Example:For more info on the check_cpu usage, please review the NSClient++ documentation here:Code: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_cpu -a filter=none "warn=load > 80" "crit=load > 90" OK: CPU load is ok.|'core 0 5m'=10%;80;90 'core 1 5m'=0%;80;90 'core 2 5m'=3%;80;90 'core 3 5m'=1%;80;90 'core 4 5m'=4%;80;90 'core 5 5m'=0%;80;90 'core 6 5m'=0%;80;90 'core 7 5m'=4%;80;90 'total 5m'=3%;80;90 'core 0 1m'=5%;80;90 'core 1 1m'=0%;80;90 'core 2 1m'=2%;80;90 'core 3 1m'=0%;80;90 'core 4 1m'=2%;80;90 'core 5 1m'=0%;80;90 'core 6 1m'=0%;80;90 'core 7 1m'=2%;80;90 'total 1m'=1%;80;90 'core 0 5s'=5%;80;90 'core 1 5s'=0%;80;90 'core 2 5s'=3%;80;90 'core 3 5s'=0%;80;90 'core 4 5s'=2%;80;90 'core 5 5s'=0%;80;90 'core 6 5s'=0%;80;90 'core 7 5s'=3%;80;90 'total 5s'=1%;80;90
https://docs.nsclient.org/reference/win ... #check_cpu
Hope this helps. Thank you!
-a show-all -a 'warn=load>80' 'crit=load>90' show-all
Thanks
Re: Windows NRPE commands for CPU monitoring
Here's the output on my text box, when using the "--show-all" option:
Note: I am using NSClient++ ver. 0.5.1.44.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_cpu -a 'warn=load>80' 'crit=load>90' show-all
OK: 5m: 3%, 1m: 1%, 5s: 0%|'total 5m'=3%;80;90 'total 1m'=1%;80;90 'total 5s'=0%;80;90Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Windows NRPE commands for CPU monitoring
Thank you.lmiltchev wrote:Here's the output on my text box, when using the "--show-all" option:
Note: I am using NSClient++ ver. 0.5.1.44.Code: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_cpu -a 'warn=load>80' 'crit=load>90' show-all OK: 5m: 3%, 1m: 1%, 5s: 0%|'total 5m'=3%;80;90 'total 1m'=1%;80;90 'total 5s'=0%;80;90
Would it be ok to use 0.5.2.x ?
Re: Windows NRPE commands for CPU monitoring
I don't see why not.Would it be ok to use 0.5.2.x ?
Let us know if you have any more questions or we can lock the thread. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Windows NRPE commands for CPU monitoring
Please locklmiltchev wrote:I don't see why not.Would it be ok to use 0.5.2.x ?
Let us know if you have any more questions or we can lock the thread. Thanks!