- put elb arn in host disco output (#3601)

- add missing entries in elb app help
This commit is contained in:
lchrdn 2022-04-20 10:16:22 +02:00 committed by GitHub
parent ecb7edd844
commit f5032d1684
5 changed files with 18 additions and 0 deletions

View File

@ -223,6 +223,10 @@ Set the instance name (Required) (Can be multiple).
Add Availability Zone dimension.
=item B<--target-group>
Add target group dimension.
=item B<--filter-metric>
Filter metrics (Can be: ActiveConnectionCount', 'NewConnectionCount',

View File

@ -60,6 +60,7 @@ sub run {
next if (!defined($load_balancer->{LoadBalancerArn}) || $load_balancer->{Type} ne 'application');
my %elb;
$elb{type} = "application";
$elb{arn} = $load_balancer->{LoadBalancerArn};
$elb{name} = $1 if ($load_balancer->{LoadBalancerArn} =~ /arn:aws:elasticloadbalancing:.*:loadbalancer\/(.*)/);
$elb{dns_name} = $load_balancer->{DNSName};
$elb{availability_zones} = $load_balancer->{AvailabilityZones};

View File

@ -237,6 +237,10 @@ Set the instance name (Required) (Can be multiple).
Add Availability Zone dimension.
=item B<--target-group>
Add target group dimension.
=item B<--filter-metric>
Filter metrics (Can be: 'HTTPCode_Target_2XX_Count', 'HTTPCode_Target_3XX_Count',

View File

@ -160,6 +160,10 @@ sub manage_selection {
if (defined($self->{option_results}->{availability_zone}) && $self->{option_results}->{availability_zone} ne '') {
push @{$self->{aws_dimensions}}, { Name => 'AvailabilityZone', Value => $self->{option_results}->{availability_zone} };
}
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} };
}
$metric_results{$instance} = $options{custom}->cloudwatch_get_metrics(
namespace => 'AWS/ApplicationELB',
dimensions => $self->{aws_dimensions},
@ -213,6 +217,10 @@ Set the instance name (Required) (Can be multiple).
Add Availability Zone dimension.
=item B<--target-group>
Add target group dimension.
=item B<--filter-metric>
Filter metrics (Can be: 'HealthyHostCount', 'UnHealthyHostCount')

View File

@ -60,6 +60,7 @@ sub run {
next if (!defined($load_balancer->{LoadBalancerArn}) || $load_balancer->{Type} ne 'network');
my %elb;
$elb{type} = "network";
$elb{arn} = $load_balancer->{LoadBalancerArn};
$elb{name} = $1 if ($load_balancer->{LoadBalancerArn} =~ /arn:aws:elasticloadbalancing:.*:loadbalancer\/(.*)/);
$elb{dns_name} = $load_balancer->{DNSName};
$elb{availability_zones} = $load_balancer->{AvailabilityZones};