Okteto Insights Metrics
Okteto Insights exposes a metrics endpoint that you can scrape to collect data on resource usage, builds, and deployments. The data comes from developer activity on the platform: product usage, infrastructure utilization, and performance. Use it to monitor the health of your Okteto cluster, track trends in build and deploy times, and measure user activity.
On Bring Your Own Cloud (BYOC), Okteto Insights comes with preconfigured Grafana dashboards. Okteto Insights Dashboards explains how to open them and what they show. Use this page only if you want another tool to read the Insights data.

Consuming Okteto Insights Data
Okteto Insights serves its data on an endpoint that tools such as Prometheus can scrape, so Admins can consume it programmatically. To set it up, enable Insights, get your bearer token, and deploy the open-source Insights Dashboards to visualize your Okteto data.
Enabling the Metrics Endpoint
Okteto Insights is disabled by default on Self-Hosted instances. To enable it, set the Helm setting insights.enabled to true and upgrade your Okteto instance.
Okteto then serves the data in Prometheus format at https://okteto.SUBDOMAIN/metrics. A bearer token that Okteto generates protects the endpoint. To use your own token instead, store it in the secret that the insights Helm setting defines.
Retrieving Your Bearer Token
In the Admin Dashboard, Admin > Integrations > General has your Insights bearer token. Click Show Insights Token in the Insights row to see it and copy it.
Setting Up the Dashboards
To collect and visualize Insights data, start from the Okteto Insights Dashboards repository. It includes setups to deploy Prometheus and Grafana, and sample dashboards.
To configure it yourself, set up a scraper that connects to the endpoint with your bearer token. For example, this Prometheus scrape configuration:
- job_name: "okteto_scraper"
scrape_interval: 5m
scrape_timeout: 30s
scheme: https
static_configs:
- targets: ["okteto.SUBDOMAIN:443"] # replace SUBDOMAIN with your Okteto subdomain
authorization:
type: Bearer
credentials: <bearer-token> # replace <bearer-token> with the token generated by Okteto
Okteto Self-Hosted doesn't include a Prometheus instance or storage for this data. Deploy your own Prometheus instance, or another data collection platform, to consume the data and manage counters and metrics with Prometheus' built-in features.
The Okteto Insights Dashboards repository includes a Prometheus configuration to start from.
What data is available
Okteto Insights has these groups of metrics:
- Build Metrics: build times and results, by environment
- Deploy Metrics: deploy times and results, by environment
- Namespace Metrics: sleeping and awake Namespaces
- Node Metrics: CPU and memory of your Okteto nodes
- Pod Metrics: CPU and memory of your Okteto pods
- Preview Metrics: sleeping and awake Preview Environments
- Test Metrics: test times and results, by environment
- User Metrics: user activity
Every metric that Okteto provides has the okteto_ prefix.
Okteto adds metrics to this endpoint over time. These are the metrics available today:
Build Metrics
Only successful builds are tracked with okteto_usage_build_duration_seconds.
| Metric Name | Type | Description | Labels |
|---|---|---|---|
okteto_usage_build_duration_seconds | histogram | Time to build each image that Okteto builds. It only reflects successful builds. | devenv_name, image_name, namespace, repository |
okteto_usage_build_result | counter | Result of each image build in Okteto. | devenv_name, image_name, namespace, repository, result |
- Build Metrics label definitions:
devenv_name: The name of the deployed application environment that the build belongs to, if anyimage_name: The name of the image, as it appears in the Okteto Manifestnamespace: The Okteto CLI context that the request came fromrepository: The Git repository that hosts the Okteto Manifest that defines the imageresult: The status of the build:success,failure, orskipped
Deploy Metrics
Only successful deployments are tracked with okteto_usage_deploy_duration_seconds.
| Metric Name | Type | Description | Labels |
|---|---|---|---|
okteto_usage_deploy_duration_seconds | histogram | Time to deploy an application environment. It only reflects successful deployments. | devenv_name, namespace, repository, phase |
okteto_usage_deploy_result | counter | Result of each deployment of an application environment. | devenv_name, namespace, repository, result |
- Deploy Metrics label definitions:
devenv_name: The name of the deployed application environmentnamespace: The Okteto CLI context that the request came fromrepository: The Git repository that hosts the Okteto Manifest that defines the application environmentphase: The phase of the deployment that the time series measures:composefor the Compose section orcommandsfor the Commands section of the Okteto Manifest'sdeploysection. The sum of both time series is the total length of a deployment.result: The status of the deployment:successorfailure
Namespace Metrics
| Metric Name | Type | Description | Labels |
|---|---|---|---|
okteto_system_namespace_status_condition | gauge | Status of a Namespace. It doesn't include the Namespaces of Preview Environments. | namespace, condition, owner_id |
okteto_system_namespace_created_time | gauge | Creation time of a Namespace. | namespace, owner_id |
- Namespace Metrics label definitions:
namespace: The name of the Namespacecondition: The condition of the Namespace:activeorsleepingowner_id: The ID of the Namespace's owner
Node Metrics
| Metric Name | Type | Description | Labels |
|---|---|---|---|
okteto_system_node | gauge | Number of nodes that run Okteto. | none |
okteto_system_node_memory_bytes | gauge | Total memory (in bytes) that a node can allocate. | node_name |
okteto_system_node_memory_requested_bytes | gauge | Total memory (in bytes) requested on a node. | node_name |
okteto_system_node_memory_usage_bytes | gauge | Total memory (in bytes) in use on a node. | node_name |
okteto_system_node_cpu_cores | gauge | Total CPU cores that a node can allocate. | node_name |
okteto_system_node_cpu_requested_cores | gauge | Total CPU cores requested on a node. | node_name |
okteto_system_node_cpu_usage_cores | gauge | Total CPU cores in use on a node. | node_name |
- Node Metrics label definitions:
node_name: The name of the node
Pod Metrics
| Metric Name | Type | Description | Labels |
|---|---|---|---|
okteto_system_pod_container_cpu_requests_cores | gauge | CPU requested for a standard container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_container_cpu_limits_cores | gauge | CPU limits of a standard container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_init_container_cpu_requests_cores | gauge | CPU requests of an init container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_init_container_cpu_limits_cores | gauge | CPU limits of an init container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_container_cpu_usage_cores | gauge | CPU usage of a standard container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_container_memory_requests_bytes | gauge | Memory requested for a standard container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_container_memory_limits_bytes | gauge | Memory limits of a standard container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_init_container_memory_requests_bytes | gauge | Memory requested for an init container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_init_container_memory_limits_bytes | gauge | Memory limits of an init container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
okteto_system_pod_container_memory_usage_bytes | gauge | Memory usage of a standard container of a pod, at that point in time. | container_name, pod_name, namespace, node_name, devenv_name, pod_type, controller_type, controller_name |
- Pod Metrics label definitions:
container_name: The name of the containerpod_name: The name of the podnamespace: The name of the Namespacenode_name: The name of the nodedevenv_name: The name of the deployed application environment that the pod belongs to, if anypod_type: Whether the pod is in development mode:developmentorstandardcontroller_type: The type of the top controller that created the pod:deploymentorstatefulsetcontroller_name: The name of the top controller that created the pod
Preview Metrics
| Metric Name | Type | Description | Labels |
|---|---|---|---|
okteto_system_preview_status_condition | gauge | Status of a Preview Environment. | namespace, condition, scope, owner_id |
okteto_system_preview_created_time | gauge | Creation time of a Preview Environment. | namespace, scope, owner_id |
- Preview Metrics label definitions:
namespace: The name of the Namespacecondition: The condition of the Preview Environment:activeorsleepingscope: The scope of the Preview Environment:personalorglobalowner_id: The ID of the Preview Environment's owner
Test Metrics
Only successful tests are tracked with okteto_usage_test_duration_seconds.
| Metric Name | Type | Description | Labels |
|---|---|---|---|
okteto_usage_test_duration_seconds | histogram | Time to run a test. It only reflects successful tests. | devenv_name, namespace, repository, test_name |
okteto_usage_test_result | counter | Result of each test of an application environment. | devenv_name, namespace, repository, test_name, result |
- Test Metrics label definitions:
devenv_name: The name of the application environmentnamespace: The Okteto CLI context that the request came fromrepository: The Git repository that hosts the Okteto Manifest that defines the application environmenttest_name: The name of the testresult: The status of the test:successorfailure
User Metrics
| Metric Name | Type | Description | Labels |
|---|---|---|---|
okteto_system_user_last_seen_time | gauge | Time of a user's last activity. | id, external_id, role |
- User Metrics label definitions:
id: The user's IDexternal_id: The user's external IDrole: The user's role
Troubleshooting
Metrics Server Availability
Okteto Insights relies on the Kubernetes Metrics Server. If the Metrics Server is unavailable, requests to the /metrics endpoint fail, including the requests from a configured scraper. See the Metrics Server documentation to troubleshoot it.