fix aws apigateway and kinesis
This commit is contained in:
parent
a0996663ff
commit
318df142f2
|
@ -150,10 +150,13 @@ sub manage_selection {
|
||||||
);
|
);
|
||||||
foreach my $metric (@{$self->{aws_metrics}}) {
|
foreach my $metric (@{$self->{aws_metrics}}) {
|
||||||
foreach my $statistic (@{$self->{aws_statistics}}) {
|
foreach my $statistic (@{$self->{aws_statistics}}) {
|
||||||
next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) && !defined($self->{option_results}->{zeroed}));
|
next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)})
|
||||||
|
&& !defined($self->{option_results}->{zeroed}));
|
||||||
|
|
||||||
$self->{metrics}->{$instance}->{display} = $instance;
|
$self->{metrics}->{$instance}->{display} = $instance;
|
||||||
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic;
|
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic;
|
||||||
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ?
|
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} =
|
||||||
|
defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ?
|
||||||
$metric_results{$instance}->{$metric}->{lc($statistic)} : 0;
|
$metric_results{$instance}->{$metric}->{lc($statistic)} : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,12 +152,14 @@ sub manage_selection {
|
||||||
|
|
||||||
foreach my $metric (@{$self->{aws_metrics}}) {
|
foreach my $metric (@{$self->{aws_metrics}}) {
|
||||||
foreach my $statistic (@{$self->{aws_statistics}}) {
|
foreach my $statistic (@{$self->{aws_statistics}}) {
|
||||||
next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) && !defined($self->{option_results}->{zeroed}));
|
next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)})
|
||||||
|
&& !defined($self->{option_results}->{zeroed}));
|
||||||
|
|
||||||
$self->{metrics}->{$instance}->{display} = $instance;
|
$self->{metrics}->{$instance}->{display} = $instance;
|
||||||
$self->{metrics}->{$instance}->{availability_zone} = $self->{option_results}->{availability_zone};
|
|
||||||
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic;
|
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic;
|
||||||
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? $metric_results{$instance}->{$metric}->{lc($statistic)} : 0;
|
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} =
|
||||||
|
defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ?
|
||||||
|
$metric_results{$instance}->{$metric}->{lc($statistic)} : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,12 +190,16 @@ sub manage_selection {
|
||||||
);
|
);
|
||||||
foreach my $metric (@{$self->{aws_metrics}}) {
|
foreach my $metric (@{$self->{aws_metrics}}) {
|
||||||
foreach my $statistic (@{$self->{aws_statistics}}) {
|
foreach my $statistic (@{$self->{aws_statistics}}) {
|
||||||
next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) && !defined($self->{option_results}->{zeroed})
|
next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)})
|
||||||
|| defined($metrics_mapping{$metric}->{stats}->{lc($statistic)}) && $metrics_mapping{$metric}->{stats}->{lc($statistic)} eq "false");
|
&& !defined($self->{option_results}->{zeroed})
|
||||||
|
|| defined($metrics_mapping{$metric}->{stats}->{lc($statistic)})
|
||||||
|
&& $metrics_mapping{$metric}->{stats}->{lc($statistic)} eq "false");
|
||||||
|
|
||||||
$self->{metrics}->{$instance}->{display} = $instance;
|
$self->{metrics}->{$instance}->{display} = $instance;
|
||||||
$self->{metrics}->{$instance}->{availability_zone} = $self->{option_results}->{availability_zone};
|
|
||||||
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic;
|
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic;
|
||||||
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? $metric_results{$instance}->{$metric}->{lc($statistic)} : 0;
|
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} =
|
||||||
|
defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ?
|
||||||
|
$metric_results{$instance}->{$metric}->{lc($statistic)} : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,12 +166,16 @@ sub manage_selection {
|
||||||
);
|
);
|
||||||
foreach my $metric (@{$self->{aws_metrics}}) {
|
foreach my $metric (@{$self->{aws_metrics}}) {
|
||||||
foreach my $statistic (@{$self->{aws_statistics}}) {
|
foreach my $statistic (@{$self->{aws_statistics}}) {
|
||||||
next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)}) && !defined($self->{option_results}->{zeroed})
|
next if (!defined($metric_results{$instance}->{$metric}->{lc($statistic)})
|
||||||
|| defined($metrics_mapping{$metric}->{stats}->{lc($statistic)}) && $metrics_mapping{$metric}->{stats}->{lc($statistic)} eq "false");
|
&& !defined($self->{option_results}->{zeroed})
|
||||||
|
|| defined($metrics_mapping{$metric}->{stats}->{lc($statistic)})
|
||||||
|
&& $metrics_mapping{$metric}->{stats}->{lc($statistic)} eq "false");
|
||||||
|
|
||||||
$self->{metrics}->{$instance}->{display} = $instance;
|
$self->{metrics}->{$instance}->{display} = $instance;
|
||||||
$self->{metrics}->{$instance}->{availability_zone} = $self->{option_results}->{availability_zone};
|
|
||||||
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic;
|
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{display} = $statistic;
|
||||||
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} = defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ? $metric_results{$instance}->{$metric}->{lc($statistic)} : 0;
|
$self->{metrics}->{$instance}->{statistics}->{lc($statistic)}->{$metric} =
|
||||||
|
defined($metric_results{$instance}->{$metric}->{lc($statistic)}) ?
|
||||||
|
$metric_results{$instance}->{$metric}->{lc($statistic)} : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue