Hi Team,
We have a HP-UX box for which CPU statistics is not showing data when we are running the script as a service.
However when we are running it manually on server it's working fine.
Server output:
/opt/nrpe/libexec/check_cpu.sh
CPU STATISTICS OK : user=0% system=0% iowait=0% idle=100% nice=0.00% steal=0.00% | CpuUser=0;CpuSystem=0;CpuIowait=0;CpuIdle=100;CpuNice=00.0;CpuSteal=00.0;70,40,30;90,60,40
Nagios error:
/usr/local/nagios/libexec/check_nrpe -H 172.24.x.x-t 60 -c check_cpu -n -a '-w 70,40,30 -c 90,40,30'
ERROR : Bad count parameter in Warning Threshold
Plugin Details:
# CPU Utilization Statistics plugin for Nagios
#
# Written by : Steve Bosek
# Patched by : Bas van der Doorn
# Release : 2.3
# Creation date : 8 September 2007
# Revision date : 11 December 2008
# Package : DTB Nagios Plugin
# Description : Nagios plugin (script) to check cpu utilization statistics.
# This script has been designed and written on Unix plateform (Lin
ux, Aix, Solaris),
# requiring iostat as external program. The locations of these can
easily
# be changed by editing the variables $IOSTAT at the top of the sc
ript.
# The script is used to query 6 of the key cpu statistics (user,sy
stem,iowait,steal,nice,idle)
# at the same time.
#
# USAGE : ./check_cpu_stats.sh Regards,
Sk Abdul Goffar
HP-UX CPU statistics is not working
HP-UX CPU statistics is not working
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: HP-UX CPU statistics is not working
We don't support custom plugins but here are some troubleshooting steps.
Run the plugin as the nrpe user, usually this is the user nagios. You can find it's definition in nrpe.cfg.
Run the plugin locally through nrpe, eg check_nrpe -H 127.0.0.1
Use the latest NRPE daemon and run in debug mode:
https://github.com/NagiosEnterprises/nrpe
Run the plugin as the nrpe user, usually this is the user nagios. You can find it's definition in nrpe.cfg.
Run the plugin locally through nrpe, eg check_nrpe -H 127.0.0.1
Use the latest NRPE daemon and run in debug mode:
https://github.com/NagiosEnterprises/nrpe
Previous Nagios employee
Re: HP-UX CPU statistics is not working
Just checking in since we have not heard from you in a while. Did @avandemore's post clear things up or has the issue otherwise been resolved?
Former Nagios employee
Re: HP-UX CPU statistics is not working
Hi ,
I believe this is nagios plugin. Also the plugin is working locally not working when we are configuring as a service.
However it's suddenly start throwing the error.
root@snguxap7 # su nagios
root@snguxap7 # id
uid=133(nagios) gid=122(nagios)
root@snguxap7 # pwd
/opt/nrpe/libexec
root@snguxap7 # ./check_cpu.sh
CPU STATISTICS OK : user=0% system=0% iowait=1% idle=99% nice=0.00% steal=0.00% | CpuUser=0;CpuSystem=0;CpuIowait=1;CpuIdle=99;CpuNice=00.0;CpuSteal=00.0;70,40,30;90,60,40
root@snguxap7 # exit
root@snguxap7 # id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
root@snguxap7 # ./check_cpu.sh
CPU STATISTICS OK : user=0% system=0% iowait=1% idle=98% nice=0.00% steal=0.00% | CpuUser=0;CpuSystem=0;CpuIowait=1;CpuIdle=98;CpuNice=00.0;CpuSteal=00.0;70,40,30;90,60,40
I believe this is nagios plugin. Also the plugin is working locally not working when we are configuring as a service.
However it's suddenly start throwing the error.
root@snguxap7 # su nagios
root@snguxap7 # id
uid=133(nagios) gid=122(nagios)
root@snguxap7 # pwd
/opt/nrpe/libexec
root@snguxap7 # ./check_cpu.sh
CPU STATISTICS OK : user=0% system=0% iowait=1% idle=99% nice=0.00% steal=0.00% | CpuUser=0;CpuSystem=0;CpuIowait=1;CpuIdle=99;CpuNice=00.0;CpuSteal=00.0;70,40,30;90,60,40
root@snguxap7 # exit
root@snguxap7 # id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
root@snguxap7 # ./check_cpu.sh
CPU STATISTICS OK : user=0% system=0% iowait=1% idle=98% nice=0.00% steal=0.00% | CpuUser=0;CpuSystem=0;CpuIowait=1;CpuIdle=98;CpuNice=00.0;CpuSteal=00.0;70,40,30;90,60,40
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: HP-UX CPU statistics is not working
The error
ERROR : Bad count parameter in Warning Threshold
It is caused by too many variables in the warning and critical threshold settings when you ran the check using the check_nrpe plugin.
Try this example below and see it it works for you.
ERROR : Bad count parameter in Warning Threshold
It is caused by too many variables in the warning and critical threshold settings when you ran the check using the check_nrpe plugin.
Try this example below and see it it works for you.
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 172.24.x.x-t 60 -c check_cpu -n -a '-w 70 -c 90'Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: HP-UX CPU statistics is not working
We are getting same error. Please find below the data:
[root@dfwlxngxi01 ~]# /usr/local/nagios/libexec/check_nrpe -H snguxap7.X.X. -t 60 -c check_cpu -n -a '-w 70 -c 90'
ERROR : Bad count parameter in Warning Threshold
[root@dfwlxngxi01 ~]# /usr/local/nagios/libexec/check_nrpe -H snguxap7.X.X -t 60 -c check_cpu -n
ERROR : Bad count parameter in Warning Threshold
[root@dfwlxngxi01 ~]# /usr/local/nagios/libexec/check_nrpe -H 172.24.X.X -t 60 -c check_cpu -n
ERROR : Bad count parameter in Warning Threshold
[root@dfwlxngxi01 ~]# /usr/local/nagios/libexec/check_nrpe -H 172.24.X.X -t 60 -c check_cpu -n -a '-w 70 -c 90'
ERROR : Bad count parameter in Warning Threshold
[root@dfwlxngxi01 ~]# /usr/local/nagios/libexec/check_nrpe -H snguxap7.X.X. -t 60 -c check_cpu -n -a '-w 70 -c 90'
ERROR : Bad count parameter in Warning Threshold
[root@dfwlxngxi01 ~]# /usr/local/nagios/libexec/check_nrpe -H snguxap7.X.X -t 60 -c check_cpu -n
ERROR : Bad count parameter in Warning Threshold
[root@dfwlxngxi01 ~]# /usr/local/nagios/libexec/check_nrpe -H 172.24.X.X -t 60 -c check_cpu -n
ERROR : Bad count parameter in Warning Threshold
[root@dfwlxngxi01 ~]# /usr/local/nagios/libexec/check_nrpe -H 172.24.X.X -t 60 -c check_cpu -n -a '-w 70 -c 90'
ERROR : Bad count parameter in Warning Threshold
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: HP-UX CPU statistics is not working
Can you post the nrpe.cfg file from the HP-UX server so we can see view the settings?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: HP-UX CPU statistics is not working
I have restarted the NRPE Agent and it's started working fine.
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Re: HP-UX CPU statistics is not working
Did you have any further (related) questions or are we okay to close this thread?
Former Nagios employee
Re: HP-UX CPU statistics is not working
Yes..U can close the thread.
Regards,
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5
Sk Abdul Goffar
Nagios Version:Nagios XI 5.4.8
OS:CentOS release 6.5