Introduction

The Kubernetes apiserver validates and configures data for the api objects which include pods, services, replicationcontrollers, and others. The kube-apiserver services the REST operations and provides the frontend to the cluster shared state through which all other components interact.

By default, the kube-apiserver runs on port 6443 and exposes the metrics of /metrics in openMetric format. The Agent hits the endpoint with the kubernetes client and fetches the metrics automatically. Therefore, no extra configuration or detection logic is required.

Go to Infrastructure > Resources tab to check if your resources are onboarded and the metrics are collected.

G1 Monitoring

Collector Type: Agent

Category: Application Monitors

Application Name: K8sApiServer

Global Template Name: Kubernetes ApiServer

Collected Metrics

Metric NameDisplay NameDescription
apiserver.go.threads.totalKube apiserver Go Threads TotalNumber of OS threads created.
apiserver.authenticated.user.requestsKube apiserver Authenticated User RequestsCounter of authenticated requests broken out by username.
apiserver.http.requests.total.countKube apiserver HTTP Requests Total CountTotal number of HTTP requests made.
apiserver.authenticated.user.requests.countKube apiserver Authenticated User Requests CountCounter of authenticated requests broken out by username.
docker_container_size-rootfs-95percentileRoot Filesystem Size 95Percentile95th percentile of docker.container.size_rootfs.
apiserver.dropped.requests.totalKube apiserver Dropped Requests TotalAccumulated number of requests dropped with Try-again-later response.
apiserver.http.requests.totalKube apiserver HTTP Requests TotalTotal number of HTTP requests made.
apiserver.audit.event.totalKube apiserver Audit Event TotalCounter of audit events generated and sent to the audit backend.
apiserver.rest.client.requests.totalKube apiserver Rest Client Requests TotalNumber of HTTP requests, partitioned by status code, method, and host.
apiserver.request.countKube apiserver Request CountCounter of apiserver requests broken out for each verb, group, version, resource, scope, component, client, and HTTP response contentType and code.
apiserver.request.count.countKube apiserver Request Count CountCounter of apiserver requests broken out for each verb, group, version, resource, scope, component, client, and HTTP response contentType and code.
apiserver.dropped.requests.total.countKube apiserver Dropped Requests Total CountMonotonic count of requests dropped with Try-again-later response.
apiserver.inflight.requestsKube apiserver Inflight RequestsMaximal number of currently used inflight request limit of this apiserver per request kind in last second.
apiserver.go.goroutinesKube apiserver GoroutinesNumber of goroutines that currently exist.
apiserver.APIServiceRegistrationController.depthKube apiserver APIService Registration Controller DepthCurrent depth of workqueue: APIServiceRegistrationController.
apiserver.etcd.object.countsKube apiserver ETCD Object CountsNumber of stored objects at the time of last check split by kind.
apiserver.rest.client.requests.total.countKube apiserver Rest Client Requests Total CountNumber of HTTP requests, partitioned by status code, method, and host.
apiserver_request_duration_seconds_bucketKube apiserver Request Duration Seconds BucketThe Response latency distribution in seconds for each verb, dry run value, group, version, resource, sub-resource, scope, and component.

G2 Monitoring

Collector Type: Agent

Category: Application Monitors

Application Name: K8sApiServer

G2 Monitor Name: Agent G2 - Linux - Kubernetes ApiServer - v2

Global Template Name: Agent G2 - Linux - Kubernetes ApiServer - v2

Collected Metrics

Metric NameDisplay NameDescription
apiserver.go.threads.totalKube apiserver Go Threads TotalNumber of OS threads created.
apiserver.authenticated.user.requestsKube apiserver Authenticated User RequestsCounter of authenticated requests broken out by username.
apiserver.http.requests.total.countKube apiserver HTTP Requests Total CountTotal number of HTTP requests made.
apiserver.authenticated.user.requests.countKube apiserver Authenticated User Requests CountCounter of authenticated requests broken out by username.
docker_container_size-rootfs-95percentileRoot Filesystem Size 95Percentile95th percentile of docker.container.size_rootfs.
apiserver.dropped.requests.totalKube apiserver Dropped Requests TotalAccumulated number of requests dropped with Try-again-later response.
apiserver.http.requests.totalKube apiserver HTTP Requests TotalTotal number of HTTP requests made.
apiserver.audit.event.totalKube apiserver Audit Event TotalCounter of audit events generated and sent to the audit backend.
apiserver.rest.client.requests.totalKube apiserver Rest Client Requests TotalNumber of HTTP requests, partitioned by status code, method, and host.
apiserver.request.countKube apiserver Request CountCounter of apiserver requests broken out for each verb, group, version, resource, scope, component, client, and HTTP response contentType and code.
apiserver.request.count.countKube apiserver Request Count CountCounter of apiserver requests broken out for each verb, group, version, resource, scope, component, client, and HTTP response contentType and code.
apiserver.dropped.requests.total.countKube apiserver Dropped Requests Total CountMonotonic count of requests dropped with Try-again-later response.
apiserver.inflight.requestsKube apiserver Inflight RequestsMaximal number of currently used inflight request limit of this apiserver per request kind in last second.
apiserver.go.goroutinesKube apiserver GoroutinesNumber of goroutines that currently exist.
apiserver.APIServiceRegistrationController.depthKube apiserver APIService Registration Controller DepthCurrent depth of workqueue: APIServiceRegistrationController.
apiserver.etcd.object.countsKube apiserver ETCD Object CountsNumber of stored objects at the time of last check split by kind.
apiserver.rest.client.requests.total.countKube apiserver Rest Client Requests Total CountNumber of HTTP requests, partitioned by status code, method, and host.
apiserver_request_duration_seconds_bucketKube apiserver Request Duration Seconds BucketThe Response latency distribution in seconds for each verb, dry run value, group, version, resource, sub-resource, scope, and component.
apiserver_request_terminations_totalKube Apiserver Request Terminations TotalNumber of requests which apiserver terminated in self-defense.
apiserver_request_duration_seconds_sumKube Apiserver Request Duration Seconds SumThe response latency distribution in seconds for each verb, dry run value, group, version, resource, sub-resource, scope, and component.
apiserver_request_duration_seconds_countKube Apiserver Request Duration Seconds CountThe response latency distribution in seconds for each verb, dry run value, group, version, resource, sub-resource, scope, and component count.
apiserver_upKube Apiserver Up Uptime of apiserver instance. Returns 0, if instance is down and 1 if instance is up.