Update connections.pm

fix ; $metric_type (servers, flexibleServers) don't exist in $metrics_mapping hash (active_connections, connections_failed)
same bug in several modes of this plugin.
This commit is contained in:
matoy 2021-05-17 17:27:02 +02:00 committed by GitHub
parent 9125d889e4
commit 014e03f310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ sub check_options {
my $metrics_mapping_transformed;
foreach my $metric_type (@{$resource_mapping->{$resource_type}}) {
$metrics_mapping_transformed->{$metric_type} = $self->{metrics_mapping}->{$metric_type};
$metrics_mapping_transformed->{$metric_type} = $self->{resource_mapping}->{$metric_type};
}
foreach my $metric (keys %{$self->{metrics_mapping_transformed}}) {