plz / E-Series-Graphite-Grafana

Collect Metrics from NetApp E-Series Storage appliances and dispatch them to graphite.
Apache License 2.0
13 stars 6 forks source link

Type of arg 1 to keys must be hash (not hash element) #4

Closed dutchiechris closed 7 years ago

dutchiechris commented 7 years ago

[root@vm1 graphite-collector]# ./eseries-metrics-collector.pl -n -c proxy-config.conf Type of arg 1 to keys must be hash (not hash element) at ./eseries-metrics-collector.pl line 334, near "} ) " Type of arg 1 to keys must be hash (not hash element) at ./eseries-metrics-collector.pl line 336, near "} ) " Execution of ./eseries-metrics-collector.pl aborted due to compilation errors.

[root@vm1 graphite-collector]# perl -V Summary of my perl5 (revision 5 version 24 subversion 0) configuration:

On another system with 5.16 no problem, but 5.24 has the problem.

I made some updates like this and it fixed it:

diff eseries-metrics-collector.pl eseries-metrics-collector-v2.pl 334c334

< foreach my $vols ( keys $met_coll->{$system} ) {

    foreach my $vols ( keys %{$met_coll->{$system}} ) {

336c336

< foreach my $mets ( keys $met_coll->{$system}->{$vols} ) {

        foreach my $mets ( keys %{$met_coll->{$system}->{$vols}} ) {

If you can fix in master please. Thanks!

plz commented 7 years ago

Thanks @dutchiechris

Applied via https://github.com/plz/E-Series-Graphite-Grafana/commit/52759f605e7958f9b7ed31dd599c148f15ceeb48