Amazon Load Balancer

dashboard par défaut ELB

Présentation

Elastic Load Balancing (ELB) est un service AWS utilisé pour répartir le trafic Web entrant de vos applications sur vos instances de backend Amazon EC2, qui peuvent avoir différentes zones de disponibilité. ELB garantit une expérience utilisateur fluide et augmente la tolérance aux pannes, pour gérer les pics de trafic et les échecs d’instances EC2, sans interruption.

Datadog recueille les métriques et les métadonnées des trois types d’équilibreurs fournis par AWS : les Application Load Balancers, Network Load Balancers et Network Load Balancers.

Configuration

Installation

Si vous ne l’avez pas déjà fait, configurez d’abord l’intégration Amazon Web Services.

Collecte de métriques

  1. Dans la page de l’intégration AWS, vérifiez que ELB est activé dans l’onglet Metric Collection. Activez ApplicationELB et NetworkELB pour les métriques ELB de l’application et ELB réseau, respectivement.

  2. Ajoutez les autorisations suivantes à votre stratégie IAM Datadog afin de recueillir des métriques Amazon ELB. Pour en savoir plus, consultez la section relative aux stratégies ELB de la documentation AWS.

    Autorisation AWSDescription
    elasticloadbalancing:DescribeLoadBalancersÉnumérer les ELB et ajouter des tags et des métriques supplémentaires.
    elasticloadbalancing:DescribeTagsAjouter des tags ELB personnalisés aux métriques ELB.
    elasticloadbalancing:DescribeInstanceHealthAjouter le statut de vos instances.
    elasticloadbalancing:DescribeTargetGroupsDécrire les groupes cibles spécifiés ou l’ensemble de vos groupes cibles.
  3. Installez l’intégration Datadog/AWS ELB.

Collecte de logs

Activer la journalisation d’AWS ELB ou ALB

Commencez par activer la journalisation sur votre ELB ou ALB pour recueillir vos logs. Les logs ELB et ALB peuvent être écrits dans un compartiment AWS S3 et lus par une fonction Lambda. Pour en savoir plus, consultez la section Activer les journaux d’accès pour votre Classic Load Balancer.

activer les logs aws elb

Choisissez un intervalle de 5 minutes et définissez votre compartiment S3 et votre préfixe. Afin d’éviter toute ambiguïté pour la définition des notifications d’événements S3, assurez-vous d’utiliser un emplacement unique qui ne correspond pas à l’emplacement des logs d’un autre Load Balancer. Si plusieurs Load Balancers enregistrent leurs logs dans le même compartiment, assurez-vous d’utiliser un préfixe unique, comme my-bucket-for-elb-logs/my-elb-name, pour stocker les logs à différents emplacements.

configuration des logs aws elb

Envoyer des logs à Datadog

  1. Si vous ne l’avez pas déjà fait, configurez la fonction Lambda du Forwarder Datadog dans votre compte AWS.
  2. Une fois la configuration terminée, accédez à la fonction Lambda du Forwarder Datadog. Configurez automatiquement ou manuellement vos déclencheurs sur le compartiment S3 qui contient vos logs ELB. Pour une configuration manuelle, utilisez le type d’événement All object create events.
  3. Utilisez le Log Explorer pour explorer vos logs.

Pour en savoir plus sur la collecte de logs de services AWS, consultez la section Envoyer des logs de services AWS avec la fonction Lambda Datadog.

Données collectées

Les métriques sont recueillies sous les espaces de nommage suivants :

Espace de nommage DatadogService AWS
aws.applicationelbApplication Load Balancers
aws.elbClassic Elastic Load Balancing
aws.networkelbNetwork Load Balancers

Métriques

aws.elb.active_connection_count
(count)
The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets.
Shown as connection
aws.elb.backend_connection_errors
(rate)
Number of connections that were not successfully established between the load balancer and the registered instances.
Shown as error
aws.elb.client_tlsnegotiation_error_count
(count)
Number of TLS negotiation errors.
Shown as error
aws.elb.consumed_lbcapacity_units
(gauge)
Number of ELB capacity units consumed.
Shown as unit
aws.elb.consumed_lcus
(gauge)
The number of load balancer capacity units (LCU) used by your load balancer.
Shown as unit
aws.elb.estimated_albactive_connection_count
(count)
The estimated total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets.
Shown as connection
aws.elb.estimated_albconsumed_lcus
(gauge)
The estimated total number of load balancer capacity units (LCU) used by an Application Load Balancer.
Shown as unit
aws.elb.estimated_albnew_connection_count
(count)
The estimated total number of new TCP connections established from clients to the load balancer and from the load balancer to targets
Shown as connection
aws.elb.estimated_processed_bytes
(count)
The estimated total number of bytes processed by an Application Load Balancer.
Shown as byte
aws.elb.healthy_host_count
(gauge)
Average number of healthy instances in each Availability Zone.
Shown as host
aws.elb.healthy_host_count.maximum
(gauge)
Maximum number of healthy instances in each Availability Zone.
Shown as host
aws.elb.healthy_host_count.minimum
(gauge)
Minimum number of healthy instances in each Availability Zone.
Shown as host
aws.elb.healthy_host_count_deduped
(gauge)
The number of healthy instances per Availability Zone, regardless of if the Cross-Zone Load Balancing option is enabled or not.
Shown as host
aws.elb.httpcode_backend_2xx
(rate)
Number of HTTP 2XX response codes generated by registered instances.
Shown as response
aws.elb.httpcode_backend_3xx
(rate)
Number of HTTP 3XX response codes generated by registered instances.
Shown as response
aws.elb.httpcode_backend_4xx
(rate)
Number of HTTP 4XX response codes generated by registered instances.
Shown as response
aws.elb.httpcode_backend_5xx
(rate)
Number of HTTP 5XX response codes generated by registered instances.
Shown as response
aws.elb.httpcode_elb_4xx
(rate)
Number of HTTP 4XX client error codes generated by the load balancer.
Shown as response
aws.elb.httpcode_elb_5_0_0
(count)
The number of HTTP 500 error codes that originate from the load balancer.
Shown as response
aws.elb.httpcode_elb_5_0_2
(count)
The number of HTTP 502 error codes that originate from the load balancer.
Shown as response
aws.elb.httpcode_elb_5_0_3
(count)
The number of HTTP 503 error codes that originate from the load balancer.
Shown as response
aws.elb.httpcode_elb_5_0_4
(count)
The number of HTTP 504 error codes that originate from the load balancer.
Shown as response
aws.elb.httpcode_elb_5xx
(rate)
Number of HTTP 5XX client error codes generated by the load balancer.
Shown as response
aws.elb.httpcode_redirect
(count)
The number of redirect actions that were successful.
Shown as response
aws.elb.httpcode_target_2xx
(count)
Number of HTTP 2XX response codes generated by the targets.
Shown as response
aws.elb.httpcode_target_3xx
(count)
Number of HTTP 3XX response codes generated by the targets.
Shown as response
aws.elb.httpcode_target_4xx
(count)
Number of HTTP 4XX response codes generated by the targets.
Shown as response
aws.elb.httpcode_target_5xx
(count)
Number of HTTP 5XX response codes generated by the targets.
Shown as response
aws.elb.ipv_6processed_bytes
(count)
The total number of bytes processed by the load balancer over IPv6.
Shown as byte
aws.elb.ipv_6request_count
(count)
The number of IPv6 requests received by the load balancer.
Shown as request
aws.elb.latency
(gauge)
Average time elapsed after the request leaves the load balancer until a response is received. (ELB v1)
Shown as second
aws.elb.latency.maximum
(gauge)
Maximum time elapsed after the request leaves the load balancer until a response is received. (ELB v1)
Shown as second
aws.elb.latency.minimum
(gauge)
Minimum time elapsed after the request leaves the load balancer until a response is received. (ELB v1)
Shown as second
aws.elb.latency.p95
(gauge)
95th percentile of the time elapsed after the request leaves the load balancer until a response is received. (ELB v1)
Shown as second
aws.elb.latency.p99
(gauge)
99th percentile of the time elapsed after the request leaves the load balancer until a response is received. (ELB v1)
Shown as second
aws.elb.new_connection_count
(count)
The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.
Shown as connection
aws.elb.processed_bytes
(count)
The total number of bytes processed by the load balancer over IPv4 and IPv6.
Shown as byte
aws.elb.request_count
(rate)
Total number of completed requests that were received and routed to the registered instances.
Shown as request
aws.elb.request_count_per_target
(count)
The average number of requests received by each target in a target group.
Shown as request
aws.elb.rule_evaluations
(count)
The number of rules processed by the load balancer given a request rate averaged over an hour.
aws.elb.spillover_count
(rate)
Total number of requests that were rejected because the queue was full.
Shown as request
aws.elb.spillover_count.maximum
(rate)
Maximum number of requests that were rejected because the queue was full per load balancer node.
Shown as request
aws.elb.surge_queue_length
(gauge)
Maximum number of requests that are pending submission to a registered instance.
Shown as request
aws.elb.target_connection_error_count
(count)
Number of connections that were not successfully established between the load balancer and the registered instances.
Shown as error
aws.elb.target_response_time.average
(gauge)
Average time elapsed after the request leaves the load balancer until a response is received. Identical to aws.applicationelb.target_response_time.average.
Shown as second
aws.elb.target_response_time.maximum
(gauge)
Maximum time elapsed after the request leaves the load balancer until a response is received. Identical to aws.applicationelb.target_response_time.maximum.
Shown as second
aws.elb.target_response_time.p95
(gauge)
95th percentile of the time elapsed after the request leaves the load balancer until a response is received. Identical to aws.applicationelb.target_response_time.p95.
Shown as second
aws.elb.target_response_time.p99
(gauge)
99th percentile of the time elapsed after the request leaves the load balancer until a response is received. Identical to aws.applicationelb.target_response_time.p99.
Shown as second
aws.elb.un_healthy_host_count
(gauge)
Average number of unhealthy instances in each Availability Zone.
Shown as host
aws.elb.un_healthy_host_count.maximum
(gauge)
Maximum number of unhealthy instances in each Availability Zone.
Shown as host
aws.elb.un_healthy_host_count.minimum
(gauge)
Minimum number of unhealthy instances in each Availability Zone.
Shown as host
aws.elb.un_healthy_host_count_deduped
(gauge)
The number of unhealthy instances per Availability Zone, regardless of if the Cross-Zone Load Balancing option is enabled or not.
Shown as host

Chacune des métriques récupérées à partir d’AWS se voit assigner les mêmes tags que ceux qui apparaissent dans la console AWS, y compris, mais sans s’y limiter, le hostname et les groupes de sécurité.

Événements

L’intégration AWS Elastic Load Balancing n’inclut aucun événement.

Checks de service

L’intégration AWS Elastic Load Balancing n’inclut aucun check de service.

Dépannage

Besoin d’aide ? Contactez l’assistance Datadog.

Pour aller plus loin

Documentation, liens et articles supplémentaires utiles: