diff --git a/cloud/azure/database/mysql/mode/connections.pm b/cloud/azure/database/mysql/mode/connections.pm index 48d0e6a28..ed7fed9a0 100644 --- a/cloud/azure/database/mysql/mode/connections.pm +++ b/cloud/azure/database/mysql/mode/connections.pm @@ -126,7 +126,7 @@ sub check_options { $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; diff --git a/cloud/azure/database/mysql/mode/replication.pm b/cloud/azure/database/mysql/mode/replication.pm index ea1c89602..24bade192 100644 --- a/cloud/azure/database/mysql/mode/replication.pm +++ b/cloud/azure/database/mysql/mode/replication.pm @@ -112,7 +112,7 @@ sub check_options { $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; diff --git a/cloud/azure/database/mysql/mode/storage.pm b/cloud/azure/database/mysql/mode/storage.pm index ab262d643..8596b89fc 100644 --- a/cloud/azure/database/mysql/mode/storage.pm +++ b/cloud/azure/database/mysql/mode/storage.pm @@ -149,7 +149,7 @@ sub check_options { $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;