Configure delegate metrics
This topic explains how to configure the Prometheus monitoring tool for metrics collection and the Grafana analytics tool for metrics display.
Harness captures delegate agent metrics for delegates with an immutable image type. This process requires a delegate an immutable image. For more information, go to Delegate image types.
The delegate is instrumented for the collection of the following delegate agent metrics.
All metrics reset when you restart the delegate.
Metric name | Description |
---|---|
io_harness_custom_metric_task_execution_time | The amount of time it took to complete a task (in seconds). |
io_harness_custom_metric_tasks_currently_executing | The number of tasks currently in an executing state. |
io_harness_custom_metric_task_timeout_total # | The total number of tasks that timed out before completion. |
io_harness_custom_metric_task_completed_total # | The total number of tasks completed. |
io_harness_custom_metric_task_failed_total # | The total number of failed tasks. |
io_harness_custom_metric_task_rejected_total * # | The number of tasks rejected because of a high load on the delegate. |
io_harness_custom_metric_delegate_connected | Indicates whether the delegate is connected. Values are 0 (disconnected) and 1 (connected). |
io_harness_custom_metric_resource_consumption_above_threshold * | Delegate CPU/memory is above a threshold (defaults to 80%). Provide DELEGATE_RESOURCE_THRESHOLD as the env variable in the delegate YAML to configure the threshold. For more information, go to Configure delegate resource threshold. |
Metrics with * above are only visible if you start your delegate with DYNAMIC_REQUEST_HANDLING
set to true
in your delegate YAML. Go to Configure delegate resource threshold for more information.
Also note that the above metrics are available only if your delegate version is later than 23.05.79311.
Metrics with # above the include the suffix _total
as of Harness Delegate 23.11.81403. Delegate versions earlier than 23.11.81403 do not include the suffix _total
in the metric name.
This topic includes example YAML files you can use to create application manifests for your Prometheus and Grafana configurations.