This repository has been archived by the owner on May 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 264
Add metrics support documentation #579
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
## Kube-batch Monitoring | ||
|
||
## Introduction | ||
Currently users can leverage controller logs and job events to monitor kube-batch. While useful for debugging, none of this options is particularly practical for monitoring kube-batch behaviour over time. There's also requirement like to monitor kube-batch in one view to resolve critical performance issue in time [#427](https://github.com/kubernetes-sigs/kube-batch/issues/427). | ||
|
||
This document describes metrics we want to add into kube-batch to better monitor performance. | ||
|
||
|
||
## Metrics | ||
In order to support metrics, kube-batch needs to expose a metrics endpoint which can provide golang process metrics like number of goroutines, gc duration, cpu and memory usage, etc as well as kube-batch custom metrics related to time taken by plugins or actions. | ||
|
||
All the metrics are prefixed with `kube_batch_`. | ||
|
||
### kube-batch execution | ||
This metrics track execution of plugins and actions of kube-batch loop. | ||
|
||
| Metric name | Metric type | Labels | Description | | ||
| ----------- | ----------- | ------ | ----------- | | ||
| e2e_scheduling_latency | histogram | | E2e scheduling latency in seconds | | ||
| plugin_latency | histogram | `plugin`=<plugin_name> | Schedule latency for plugin | | ||
| action_latency | histogram | `action`=<action_name> | Schedule latency for action | | ||
| task_latency | histogram | `job`=<job_id> `task`=<task_id> | Schedule latency for each task | | ||
|
||
|
||
### kube-batch operations | ||
This metrics describe internal state of kube-batch. | ||
|
||
| Metric name | Metric type | Labels | Description | | ||
| ----------- | ----------- | ------ | ----------- | | ||
| pod_schedule_errors | Counter | | The number of kube-batch failed due to an error | | ||
| pod_schedule_successes | Counter | | The number of kube-batch success in scheduling a job | | ||
| pod_preemption_victims | Counter | | Number of selected preemption victims | | ||
| total_preemption_attempts | Counter | | Total preemption attempts in the cluster till now | | ||
| unschedule_task_count | Counter | `job`=<job_id> | The number of tasks failed to schedule | | ||
| unschedule_job_counts | Counter | | The number of job failed to schedule in each iteration | | ||
| job_retry_counts | Counter | `job`=<job_id> | The number of retry times of one job | | ||
|
||
|
||
### kube-batch Liveness | ||
Healthcheck last time of kube-batch activity and timeout |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems we need a empty line above to make it as table :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Will add extra line here.