apiserver metrics: what is the difference between rest_client_requests_total and apiserver_request_total?

805 views Asked by At

Run the following command to get the help message of apiserver_request_total and rest_client_requests_total:

$ kubectl get  --raw '/metrics' | grep -E 'HELP apiserver_request_total|HELP rest_client_requests_total'
# HELP apiserver_request_total [ALPHA] Counter of apiserver requests broken out for each verb, dry run value, group, version, resource, scope, component, and HTTP response contentType and code.
# HELP rest_client_requests_total [ALPHA] Number of HTTP requests, partitioned by status code, method, and host.

What is the difference between rest_client_requests_total and apiserver_request_total metric?

1

There are 1 answers

0
Mayur Kamble On

From the blog by VICTOR HERNANDO you can find that:

apiserver_request_total: This metric can be used to count the number of requests to the Kubernetes API server, where they are coming from, to which component it's accessing, and whether it was successful or not.

The verbs in this case are HTTP verbs; WATCH, PUT, POST, PATCH, LIST, GET, DELETE, and CONNECT.

rest_client_requests_total: This metric provides the number of HTTP client requests for kube-controller-manager by HTTP response code.