[v13] Add Prometheus metrics to Kubernetes Access#29970
Merged
tigrato merged 2 commits intobranch/v13from Aug 3, 2023
Merged
Conversation
tigrato
added a commit
that referenced
this pull request
Aug 3, 2023
When Kube prometheus metrics were originally introduced by #29970, I missed to register the join sessions metrics into the prometheus default registry. The metrics were collected but were unavailable via `/metrics` endpoint. Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
rosstimothy
approved these changes
Aug 3, 2023
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Aug 3, 2023
When Kube prometheus metrics were originally introduced by #29970, I missed to register the join sessions metrics into the prometheus default registry. The metrics were collected but were unavailable via `/metrics` endpoint. Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
r0mant
approved these changes
Aug 3, 2023
* Add Prometheus metrics to Kubernetes Access This PR adds several prometheus metrics to the Kubernetes Access package. The new metrics are: | Name | Type | Component | Description | | ----------------------------------------------------------------- | --------- | --------------------------- | --------------------------------------------------------------------------------------------------------- | | `teleport_kubernetes_client_in_flight_requests` | gauge | Teleport Kubernetes Service | In-flight requests waiting for the upstream response. | | `teleport_kubernetes_client_requests_total` | counter | Teleport Kubernetes Service | Total number of requests sent to the upstream teleport proxy, kube_service or Kubernetes Cluster servers. | | `teleport_kubernetes_client_tls_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of TLS handshakes. | | `teleport_kubernetes_client_got_conn_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of time to dial to the upstream server - using reversetunnel or direct dialer. | | `teleport_kubernetes_client_first_byte_response_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of time to receive the first response byte from the upstream server. | | `teleport_kubernetes_client_request_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of the upstream request time. | | Name | Type | Component | Description | | ----------------------------------------------------------- | --------- | --------------------------- | --------------------------------------------------- | | `teleport_kubernetes_server_in_flight_requests` | gauge | Teleport Kubernetes Service | In-flight requests currently handled by the server. | | `teleport_kubernetes_server_api_requests_total` | counter | Teleport Kubernetes Service | Total number of requests handled by the server. | | `teleport_kubernetes_server_request_duration_seconds` | histogram | Teleport Kubernetes Service | Latency distribution of the total request time. | | `teleport_kubernetes_server_response_size_bytes` | histogram | Teleport Kubernetes Service | Distribution of the response size. | | `teleport_kubernetes_server_exec_in_flight_sessions` | gauge | Teleport Kubernetes Service | Number of active kubectl exec sessions. | | `teleport_kubernetes_server_exec_sessions_total` | counter | Teleport Kubernetes Service | Total number of kubectl exec sessions. | | `teleport_kubernetes_server_portforward_in_flight_sessions` | gauge | Teleport Kubernetes Service | Number of active kubectl portforward sessions. | | `teleport_kubernetes_server_portforward_sessions_total` | counter | Teleport Kubernetes Service | Number of active kubectl portforward sessions. | | `teleport_kubernetes_server_join_in_flight_sessions` | gauge | Teleport Kubernetes Service | Number of active joining sessions, | | `teleport_kubernetes_server_join_sessions_total` | counter | Teleport Kubernetes Service | Total number of joining sessions. | Closes #29362 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com> * replace prometheus.MustRegister with metrics.RegisterPrometheusCollectors * Apply suggestions from code review Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com> --------- Signed-off-by: Tiago Silva <tiago.silva@goteleport.com> Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
6bfe750 to
3a7d93d
Compare
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #29363 to branch/v13