diff --git a/cloud/azure/database/mysql/mode/storage.pm b/cloud/azure/database/mysql/mode/storage.pm index c8e323642..8596b89fc 100644 --- a/cloud/azure/database/mysql/mode/storage.pm +++ b/cloud/azure/database/mysql/mode/storage.pm @@ -146,10 +146,10 @@ sub check_options { my $metrics_mapping_transformed; foreach my $metric_type (@{$resource_mapping->{$resource_type}}) { - $self->{metrics_mapping_transformed}->{$metric_type} = $self->{metrics_mapping}->{$metric_type}; + $metrics_mapping_transformed->{$metric_type} = $self->{metrics_mapping}->{$metric_type}; } - foreach my $metric (keys %{$self->{metrics_mapping_transformed}}) { + foreach my $metric (keys %{$metrics_mapping_transformed}) { next if (defined($self->{option_results}->{filter_metric}) && $self->{option_results}->{filter_metric} ne '' && $metric !~ /$self->{option_results}->{filter_metric}/); push @{$self->{az_metrics}}, $metric;