enh(plugin)add TargetGroup dimension elbv2 resolves #1968

This commit is contained in:
Sims24 2020-05-02 13:33:39 +02:00
parent 9c3548f30f
commit deb65967e2
3 changed files with 15 additions and 0 deletions

View File

@ -115,6 +115,7 @@ sub new {
"availability-zone:s" => { name => 'availability_zone' },
"filter-metric:s" => { name => 'filter_metric' },
"statistic:s@" => { name => 'statistic' },
"target-group:s" => { name => 'target_group' }
});
return $self;
@ -138,6 +139,10 @@ sub check_options {
$self->{aws_timeframe} = defined($self->{option_results}->{timeframe}) ? $self->{option_results}->{timeframe} : 600;
$self->{aws_period} = defined($self->{option_results}->{period}) ? $self->{option_results}->{period} : 60;
if (defined($self->{option_results}->{target_group}) && self->{option_results}->{target_group} ne '') {
push @{$self->{aws_dimensions}}, { Name => 'TargetGroup', Value => $self->{option_results}->{target_group} };
}
$self->{aws_statistics} = ['Sum'];
if (defined($self->{option_results}->{statistic})) {
$self->{aws_statistics} = [];

View File

@ -129,6 +129,7 @@ sub new {
"name:s@" => { name => 'name' },
"availability-zone:s" => { name => 'availability_zone' },
"filter-metric:s" => { name => 'filter_metric' },
"target-group:s" => { name => 'target_group' }
});
return $self;
@ -152,6 +153,10 @@ sub check_options {
$self->{aws_timeframe} = defined($self->{option_results}->{timeframe}) ? $self->{option_results}->{timeframe} : 600;
$self->{aws_period} = defined($self->{option_results}->{period}) ? $self->{option_results}->{period} : 60;
if (defined($self->{option_results}->{target_group}) && self->{option_results}->{target_group} ne '') {
push @{$self->{aws_dimensions}}, { Name => 'TargetGroup', Value => $self->{option_results}->{target_group} };
}
$self->{aws_statistics} = ['Sum'];
if (defined($self->{option_results}->{statistic})) {
$self->{aws_statistics} = [];

View File

@ -105,6 +105,7 @@ sub new {
"availability-zone:s" => { name => 'availability_zone' },
"filter-metric:s" => { name => 'filter_metric' },
"statistic:s@" => { name => 'statistic' },
"target-group:s" => { name => 'target_group' }
});
return $self;
@ -128,6 +129,10 @@ sub check_options {
$self->{aws_timeframe} = defined($self->{option_results}->{timeframe}) ? $self->{option_results}->{timeframe} : 600;
$self->{aws_period} = defined($self->{option_results}->{period}) ? $self->{option_results}->{period} : 60;
if (defined($self->{option_results}->{target_group}) && self->{option_results}->{target_group} ne '') {
push @{$self->{aws_dimensions}}, { Name => 'TargetGroup', Value => $self->{option_results}->{target_group} };
}
$self->{aws_statistics} = ['Average'];
if (defined($self->{option_results}->{statistic})) {
$self->{aws_statistics} = [];