Métriques du serveur d'API Kubernetes

Métriques du serveur d'API Kubernetes

Agent Check Check de l'Agent

Linux Mac OS Windows OS Supported

Présentation

Ce check surveille Kube_apiserver_metrics.

Configuration

Installation

Le check Kube_apiserver_metrics est inclus avec le paquet de l'Agent Datadog : vous n’avez donc rien d’autre à installer sur votre serveur.

Configuration

Le check Kube_apiserver_metrics est principalement utilisé au niveau des clusters. Consultez la documentation relative aux checks de cluster. Vous pouvez annoter le service de votre apiserver avec ce qui suit :

Annotations:
  ad.datadoghq.com/endpoints.check_names: ["kube_apiserver_metrics"]
  ad.datadoghq.com/endpoints.init_configs: [{}]
  ad.datadoghq.com/endpoints.instances:
    [{ "prometheus_url": "https://%%host%%:%%port%%/metrics", "bearer_token_auth": "true" }]

L’Agent de cluster Datadog programme ensuite le ou les checks pour chaque endpoint sur le ou les Agents Datadog.

Vous pouvez également exécuter le check en configurant directement les endpoints dans le fichier kube_apiserver_metrics.d/conf.yaml, dans le dossier conf.d/ à la racine du répertoire de configuration de votre Agent. Consultez le fichier d’exemple kube_apiserver_metrics.d/conf.yaml pour découvrir toutes les options de configuration disponibles.

Par défaut, l’Agent qui exécute le check essaie d’obtenir le token de porteur du compte du service dans le but d’effectuer l’authentification auprès de APIServer. Si vous n’utilisez pas de système RBAC, définissez bearer_token_auth sur false.

Enfin, si vous exécutez l’Agent Datadog sur les nœuds principaux, vous pouvez faire appel à Autodiscovery pour programmer l’exécution du check. Si vous exécutez l’image officielle k8s.gcr.io/kube-apiserver, cette opération s’effectue automatiquement.

Validation

Lancez la sous-commande status de l’Agent et cherchez kube_apiserver_metrics dans la section Checks.

Données collectées

Métriques

kube_apiserver.longrunning_gauge
(gauge)
Gauge of all active long-running apiserver requests broken out by verb API resource and scope. Not all requests are tracked this way.
Shown as request
kube_apiserver.current_inflight_requests
(gauge)
Maximal number of currently used inflight request limit of this apiserver per request kind in last second.
kube_apiserver.audit_event
(gauge)
Accumulated number audit events generated and sent to the audit backend
Shown as event
kube_apiserver.go_threads
(gauge)
Number of OS threads created
Shown as thread
kube_apiserver.go_goroutines
(gauge)
Number of goroutines that currently exist
kube_apiserver.APIServiceRegistrationController_depth
(gauge)
Current depth of workqueue: APIServiceRegistrationController
kube_apiserver.etcd_object_counts
(gauge)
Number of stored objects at the time of last check split by kind
Shown as object
kube_apiserver.rest_client_requests_total
(gauge)
Accumulated number of HTTP requests partitioned by status code method and host
Shown as request
kube_apiserver.apiserver_request_count
(gauge)
Accumulated number of apiserver requests broken out for each verb API resource client and HTTP response contentType and code (deprecated since kubernetes 1.15)
Shown as request
kube_apiserver.apiserver_dropped_requests_total
(gauge)
Accumulated number of requests dropped with 'Try again later' response
Shown as request
kube_apiserver.http_requests_total
(gauge)
Accumulated number of HTTP requests made
Shown as request
kube_apiserver.authenticated_user_requests
(gauge)
Accumulated number of authenticated requests broken out by username
Shown as request
kube_apiserver.audit_event.count
(count)
Monotonic count of audit events generated and sent to the audit backend
Shown as event
kube_apiserver.rest_client_requests_total.count
(count)
Monotonic count of HTTP requests partitioned by status code method and host
Shown as request
kube_apiserver.apiserver_request_count.count
(count)
Monotonic count of apiserver requests broken out for each verb API resource client and HTTP response contentType and code (deprecated since kubernetes 1.15)
Shown as request
kube_apiserver.apiserver_dropped_requests_total.count
(count)
Monotonic count of requests dropped with 'Try again later' response
Shown as request
kube_apiserver.http_requests_total.count
(count)
Monotonic count of the number of HTTP requests made
Shown as request
kube_apiserver.authenticated_user_requests.count
(count)
Monotonic count of authenticated requests broken out by username
Shown as request
kube_apiserver.apiserver_request_total
(gauge)
Accumulated number of apiserver requests broken out for each verb API resource client and HTTP response contentType and code (Only present from kubernetes 1.15 to replace apiserver_request_count)
Shown as request
kube_apiserver.apiserver_request_total.count
(count)
Monotonic count of apiserver requests broken out for each verb API resource client and HTTP response contentType and code (Only present from kubernetes 1.15 to replace apiserver_request_count.count)
Shown as request
kube_apiserver.rest_client_request_latency_seconds.sum
(gauge)
Request latency in seconds broken down by verb and URL
Shown as second
kube_apiserver.rest_client_request_latency_seconds.count
(count)
Request latency in seconds broken down by verb and URL count
kube_apiserver.admission_webhook_admission_latencies_seconds.sum
(gauge)
Admission webhook latency identified by name and broken out for each operation and API resource and type (validate or admit)
Shown as second
kube_apiserver.admission_webhook_admission_latencies_seconds.count
(count)
Admission webhook latency identified by name and broken out for each operation and API resource and type (validate or admit) count
kube_apiserver.admission_step_admission_latencies_seconds.sum
(gauge)
Admission sub-step latency broken out for each operation and API resource and step type (validate or admit)
Shown as second
kube_apiserver.admission_step_admission_latencies_seconds.count
(count)
Admission sub-step latency histogram broken out for each operation and API resource and step type (validate or admit) count
kube_apiserver.admission_step_admission_latencies_seconds_summary.sum
(gauge)
Admission sub-step latency summary broken out for each operation and API resource and step type (validate or admit)
Shown as second
kube_apiserver.admission_step_admission_latencies_seconds_summary.count
(count)
Admission sub-step latency summary broken out for each operation and API resource and step type (validate or admit) count
kube_apiserver.admission_step_admission_latencies_seconds_summary.quantile
(gauge)
Admission sub-step latency summary broken out for each operation and API resource and step type (validate or admit) quantile
Shown as second
kube_apiserver.admission_controller_admission_duration_seconds.sum
(gauge)
Admission controller latency histogram in seconds identified by name and broken out for each operation and API resource and type (validate or admit)
Shown as second
kube_apiserver.admission_controller_admission_duration_seconds.count
(count)
Admission controller latency histogram in seconds identified by name and broken out for each operation and API resource and type (validate or admit) count
kube_apiserver.request_latencies.sum
(gauge)
Response latency distribution in microseconds for each verb, resource and subresource
Shown as microsecond
kube_apiserver.request_latencies.count
(count)
Response latency distribution in microseconds for each verb, resource and subresource count
kube_apiserver.request_duration_seconds.sum
(gauge)
Response latency distribution in seconds for each verb, dry run value, group, version, resource, subresource, scope and component
Shown as second
kube_apiserver.request_duration_seconds.count
(count)
Response latency distribution in seconds for each verb, dry run value, group, version, resource, subresource, scope and component count
kube_apiserver.registered_watchers
(gauge)
Number of currently registered watchers for a given resource
Shown as object
kube_apiserver.process_resident_memory_bytes
(gauge)
Resident memory size in bytes
Shown as byte
kube_apiserver.process_virtual_memory_bytes
(gauge)
Virtual memory size in bytes
Shown as byte
kube_apiserver.etcd_request_duration_seconds.sum
(gauge)
Etcd request latencies for each operation and object type
Shown as second
kube_apiserver.etcd_request_duration_seconds.count
(count)
Etcd request latencies count for each operation and object type
kube_apiserver.watch_events_sizes.sum
(gauge)
Watch event size distribution (Kubernetes 1.16+)
Shown as byte
kube_apiserver.watch_events_sizes.count
(count)
Watch event size distribution (Kubernetes 1.16+)
kube_apiserver.authentication_duration_seconds.sum
(gauge)
Authentication duration histogram broken out by result (Kubernetes 1.17+)
Shown as second
kube_apiserver.authentication_duration_seconds.count
(count)
Authentication duration histogram broken out by result (Kubernetes 1.17+)
kube_apiserver.authentication_attempts.count
(count)
Counter of authenticated attempts (Kubernetes 1.16+)
Shown as request
kube_apiserver.apiserver_request_terminations_total.count
(count)
Number of requests which apiserver terminated in self-defense (Kubernetes 1.17+)
Shown as request
kube_apiserver.grpc_client_handled_total
(count)
Total number of RPCs completed by the client regardless of success or failure
Shown as request
kube_apiserver.grpc_client_msg_received_total
(count)
Total number of gRPC stream messages received by the client
Shown as message
kube_apiserver.grpc_client_msg_sent_total
(count)
Total number of gRPC stream messages sent by the client
Shown as message
kube_apiserver.grpc_client_started_total
(count)
Total number of RPCs started on the client
Shown as request

Checks de service

Kube_apiserver_metrics n’inclut aucun check de service.

Événements

Kube_apiserver_metrics n’inclut aucun événement.

Dépannage

Besoin d’aide ? Contactez l’assistance Datadog.