Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance data does not work (stack traces) #21

Closed
ckozler opened this issue Feb 5, 2016 · 4 comments
Closed

performance data does not work (stack traces) #21

ckozler opened this issue Feb 5, 2016 · 4 comments

Comments

@ckozler
Copy link

ckozler commented Feb 5, 2016

[root@host dell_monitors]# ./check_idrac -m /root/.snmp/mibs/idrac-smiv2.mib -H 74.201.248.76 -v2c -v2c -c public -w FAN#1 --fan-warn=4000,6000 --fan-crit=3000,7000 -p
Traceback (most recent call last):
File "./check_idrac", line 842, in
result, exit_code = PARSER().main()
File "./check_idrac", line 671, in main
perf_data = ' | RPM=%s;%s;%s;;' % (hw[3].split('(')[0], conf['fan_min_warn'], conf['fan_min_crit'])
KeyError: 'fan_min_warn'
[root@host dell_monitors]# vi check_idrac
[root@host dell_monitors]# ./check_idrac -m /root/.snmp/mibs/idrac-smiv2.mib -H 74.201.248.76 -v2c -v2c -c public -w FAN#1 --fan-warn=4000,6000 --fan-crit=3000,7000 -p -f conf.conf
Traceback (most recent call last):
File "./check_idrac", line 842, in
result, exit_code = PARSER().main()
File "./check_idrac", line 671, in main
perf_data = ' | RPM=%s;%s;%s;;' % (hw[3].split('(')[0], conf['fan_min_warn'], conf['fan_min_crit'])
KeyError: 'fan_min_warn'

And for all fans:

[root@host dell_monitors]# ./check_idrac -m /root/.snmp/mibs/idrac-smiv2.mib -H 74.201.248.76 -v2c -v2c -c public -w FAN --fan-warn=4000,6000 --fan-crit=3000,7000
System Board Fan1A: 4920 RPM - ENABLED/OK
System Board Fan1B: 4440 RPM - ENABLED/OK
System Board Fan2A: 4920 RPM - ENABLED/OK
System Board Fan2B: 4440 RPM - ENABLED/OK
System Board Fan3A: 4920 RPM - ENABLED/OK
System Board Fan3B: 4440 RPM - ENABLED/OK
System Board Fan4A: 4920 RPM - ENABLED/OK
System Board Fan4B: 4440 RPM - ENABLED/OK
System Board Fan5A: 4920 RPM - ENABLED/OK
System Board Fan5B: 4440 RPM - ENABLED/OK
System Board Fan6A: 4680 RPM - ENABLED/OK
System Board Fan6B: 4440 RPM - ENABLED/OK
[root@host dell_monitors]# ./check_idrac -m /root/.snmp/mibs/idrac-smiv2.mib -H 74.201.248.76 -v2c -v2c -c public -w FAN --fan-warn=4000,6000 --fan-crit=3000,7000 -p
Traceback (most recent call last):
File "./check_idrac", line 842, in
result, exit_code = PARSER().main()
File "./check_idrac", line 671, in main
perf_data = ' | RPM=%s;%s;%s;;' % (hw[3].split('(')[0], conf['fan_min_warn'], conf['fan_min_crit'])
KeyError: 'fan_min_warn'

But when run without -p

[root@host dell_monitors]# ./check_idrac -m /root/.snmp/mibs/idrac-smiv2.mib -H 74.201.248.76 -v2c -v2c -c public -w FAN#1 --fan-warn=4000,6000 --fan-crit=3000,7000
OK - System Board Fan1A: 4920 RPM - ENABLED/OK

@dangmocrang
Copy link
Owner

Sorry for long response. I checked script and found some mismatch in performance function. I will fix it soon.

@dangmocrang
Copy link
Owner

I fixed it. Help me to test :D

@mikehubert4012
Copy link

There is something wrong with temperature performance and fan performance.

/usr/lib/nagios/plugins/check_idrac.py -H 10.0.0.101 -v2c -c public -w SENSOR#1 --temp-warn=none,65 --temp-crit=none,75 -p
OK - System Board Inlet Temp: 17.0 C ENABLED/OK | Temperature=17.0C;none;65.0;none;75.0

Performance are : Value;WarnValue;CritValue;MinValue;MaxValue
So it should be :
OK - System Board Inlet Temp: 17.0 C ENABLED/OK | Temperature=17.0C;65.0;75.0;;;
MinValue could be 0 and MaxValue could be 100 (or the range of the sensor)

For the fan, If there is no threshhold, "none" may get to the perfdata. Which is a bad thing imo.

/usr/lib/nagios/plugins/check_idrac.py -p -H 10.0.0.101 -v2c -c public -w FAN#1
OK - System Board Fan1: 2160 RPM - ENABLED/OK | RPM=2160;;;none;none

I think it shoud be :
OK - System Board Fan1: 2160 RPM - ENABLED/OK | RPM=2160;;;;
And if threshhold are defined, if should be:
OK - System Board Fan1: 2160 RPM - ENABLED/OK | RPM=2160;3000;4000;;

Hope this can help.

The way it work now break graph in Adagios.

@dangmocrang
Copy link
Owner

Hi,

I decided to remove WARN and CRIT info from perf data cause script allow
you to define 4 values and nagios not support that format.

Check my git to get new release.

Regards,
Dung

On Tue, Mar 8, 2016 at 11:29 PM, mikehubert4012 notifications@github.com
wrote:

There is something wrong with temperature performance and fan performance.

/usr/lib/nagios/plugins/check_idrac.py -H 10.0.0.101 -v2c -c public -w
SENSOR#1 --temp-warn=none,65 --temp-crit=none,75 -p
OK - System Board Inlet Temp: 17.0 C ENABLED/OK |
Temperature=17.0C;none;65.0;none;75.0

Performance are : Value;WarnValue;CritValue;MinValue;MaxValue
So it should be :
OK - System Board Inlet Temp: 17.0 C ENABLED/OK |
Temperature=17.0C;65.0;75.0;;;
MinValue could be 0 and MaxValue could be 100 (or the range of the sensor)

For the fan, If there is no threshhold, "none" may get to the perfdata.
Which is a bad thing imo.

/usr/lib/nagios/plugins/check_idrac.py -p -H 10.0.0.101 -v2c -c public -w
FAN#1
OK - System Board Fan1: 2160 RPM - ENABLED/OK | RPM=2160;;;none;none

I think it shoud be :
OK - System Board Fan1: 2160 RPM - ENABLED/OK | RPM=2160;;;;
And if threshhold are defined, if should be:
OK - System Board Fan1: 2160 RPM - ENABLED/OK | RPM=2160;3000;4000;;

Hope this can help.

The way it work now break graph in Adagios.


Reply to this email directly or view it on GitHub
#21 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants