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

Use of uninitialized value $speed_real in concatenation (.) or string at check_snmp_int.pl line 976. #54

Open
zxyz opened this issue Jun 26, 2018 · 3 comments

Comments

@zxyz
Copy link

zxyz commented Jun 26, 2018

Hello,
thanks for maintaining the manubulon plugins!

I've go problems getting values for the interface speed:

./check_snmp_int.pl -2 -C public -H test.dwelle.de -n "Port-channel4"  -feS

Use of uninitialized value $speed_real in concatenation (.) or string at check_snmp_int.pl line 976.
Port-channel43:UP:1 UP: OK | 'Port-channel43_in_octet'=1267227190c 'Port-channel43_out_octet'=1689980575c 'Port-channel43_in_error'=0c 'Port-channel43_in_discard'=0c 'Port-channel43_out_error'=0c 'Port-channel43_out_discard'=0c 'Port-channel43_speed_bps'=

As you can see, there is no return value for the speed of the interface. I tried to find the error by myself, but not knowing perl I failed. The OIDs are correct and snmpwalk returns the expected values.

Interestingly the following kinda works, apart from the "No usable data on file" part:

./check_snmp_int.pl --down -fe -t 60 -g -2 -C public -H test.example.net -n "Port-channel4" -S -u -B -kq -w 80,80,50,50,1000,1000 -c 90,90,100,100,2000,2000

`Port-channel43:UP No usable data on file (14 rows) :(1 UP): UNKNOWN | 'Port-channel43_in_octet'=10238223103986c 'Port-channel43_out_octet'=58543290756809c 'Port-channel43_in_error'=0c 'Port-channel43_in_discard'=0c 'Port-channel43_out_error'=0c 'Port-channel43_out_discard'=0c 'Port-channel43_speed_bps'=20000000000`

Thanks for any help!

@dnsmichi
Copy link
Collaborator

Figure out where $speed_real is set and dump its value with e.g. Data::Dumper.

@dnsmichi dnsmichi added the bug label Jul 10, 2018
@zxyz
Copy link
Author

zxyz commented Jul 24, 2018

I neared it down with a lot of print statements.

line 728:

- if (defined($o_checkperf) && $int_status == 1) {
+ if (defined($o_checkperf) || defined($o_perfs) && $int_status == 1) {

results in:

./check_snmp_int.pl -2 -C public -H test.example.net -n "Port-channel4"  -feS -g
Port-channel43:UP No usable data on file (4 rows) :(1 UP): UNKNOWN | 'Port-channel43_in_octet'=22674709984955c 'Port-channel43_out_octet'=146625280075840c 'Port-channel43_in_error'=0c 'Port-channel43_in_discard'=0c 'Port-channel43_out_error'=0c 'Port-channel43_out_discard'=0c 'Port-channel43_speed_bps'=20000000000

still the "No usable data" problem, but the interface speed is there.

@phsm
Copy link
Contributor

phsm commented Jan 9, 2019

I believe I've fixed this issue in my PR

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

No branches or pull requests

3 participants