Okteto Insights
Okteto inherently generates a lot of data from developers using the platform. This includes product usage and behavior data such as developer usage, as well as infrastructure utilization and performance data like infrastructure and platform activities.
Analyzing this data can be helpful for understanding the performance of your Okteto cluster, including overall health, trends in build and deploy times, and the activity of users on the platform.
How to consume Okteto Insights data
Okteto SaaS and Bring Your Own Cloud Instances
Okteto Insights is available by default for all SaaS and Bring Your Own Cloud instances. To access the Insights Dashboards, navigate to Admin
-> General
and scroll to the Settings
section. Click on "Open Grafana" to see the Okteto Insights Grafana Dashboards.
Okteto Self Hosted Instances
Insights data is available to admin
users via API endpoints that can be scraped using Prometheus. This provides a way for Okteto administrators to obtain and consume this data programmatically. For a quick setup, follow the below steps to turn on Insights and get your bearer token. Then, deploy our open-source Insights Dashboards to get started visualizing your Okteto data.
This feature is disabled
by default for Self Hosted instances. To enable
it you will need to set the helm setting insights.enabled
to true
and upgrade your Okteto instance.
Once you enable the feature, Okteto will create a new endpoint accessible through https://okteto.SUBDOMAIN/metrics
where data will be available in Prometheus format. This new endpoint is protected with a bearer token which is auto-generated by Okteto. Alternatively, you can specify your own token using the secret defined in this helm setting.
To retrieve your Insights bearer token from the Okteto Admin UI, navigate to Admin
-> General
and scroll to the Settings
section. You can copy your bearer token by clicking on the Show Insights Token
button in the Insights panel.
To begin collecting and visualizing Insights data, use our sample repository. It includes setups for deploying Prometheus and Grafana, along with sample dashboards.
If you'd like to configure this yourself, you'll need to configure a scraper to connect to this endpoint using the proper token. An example of a Prometheus scraper configuration is:
- job_name: "okteto_scrapper"
scrape_interval: 5m
scheme: http
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 does not provide a Prometheus instance or storage for this data. You must deploy your own Prometheus instance (or other collector platform) to consume this data and manage counters and metrics restart with the functions Prometheus provides.
Insights Dashboards
Okteto provides open source Grafana dashboards based on the Insights data made available. These dashboards should enable to you quickly get started using Okteto Insights and serve as a base to build more customized metrics for your organization.
Dashboards available:
- Node Metrics Dashboard
- Pod Metrics Dashboard
- Build and Deploy Metrics Dashboard
- Namespace, Preview, and Deploy Metrics Dashboard
Get started with the dashboards here: https://github.com/okteto/insights-dashboards
What data is available
As part of Okteto Insights, we are offering the following metric groupings:
- Node Metrics: CPU and Memory stats on your Okteto Nodes
- Pod Metrics: CPU and Memory stats on your Okteto Pods
- Build Metrics: Information on Build times and results by environment
- Deploy Metrics: Information on Deploy times and results by environment
- Namespace Metrics: Information on the Sleeping and Awake Namespaces
- Preview Metrics: Information on Sleeping and Awake Preview Environments
- User Metrics: Information on User activity
All metrics provided by Okteto will have the prefix okteto_
Okteto will progressively make more data available through this endpoint. The following metrics are available today:
Node Metrics
Metric Name | Type | Description | Labels |
---|---|---|---|
okteto_system_node | gauge | This metric represents the number of nodes running Okteto. | none |
okteto_system_node_memory_bytes | gauge | This metric represents the total memory (in bytes) available for allocating to a node. | node_name |
okteto_system_node_memory_requested_bytes | gauge | This metric represents the total memory (in bytes) requested for a node. | node_name |
okteto_system_node_memory_usage_bytes | gauge | This metric represents the total memory (in bytes) in use for a node. | node_name |
okteto_system_node_cpu_cores | gauge | This metric represents the total CPU cores available for allocating to a node. | node_name |
okteto_system_node_cpu_requested_cores | gauge | This metric represents the total CPU cores requested for a node. | node_name |
okteto_system_node_cpu_usage_cores | gauge | This metric represents the total CPU cores in use for a node. | node_name |
- Node Metrics label definitions:
node_name
: Contains the name of the node represented
Pod Metrics
Metric Name | Type | Description | Labels |
---|---|---|---|
okteto_system_pod_container_cpu_requests_cores | gauge | This metric represents the total CPU requested of a pod and standard container 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 | This metric represents the CPU limits of a specific pod and standard container 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 | This metric represents the CPU requests of a specific pod and init container 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 | This metric represents the CPU limits of a specific pod and init container 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 | This metric represents the CPU usage of a specific pod and standard container 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 | This metric represents the memory requested for a specific pod and standard container 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 | This metric represents the memory limits for a specific pod and standard container 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 | This metric represents the memory requested for a specific pod and init container 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 | This metric represents the memory limits for a specific pod and init container 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 | This metric represents the memory usage of a specific pod and standard container 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
: Contains the name of the container being representedpod_name
: Contains the name of the pod being representednamespace
: Contains the namespace namenode_name
: Contains the node namedevenv_name
: If defined, this represents the name of the deployed development environment it is linked topod_type
: It determines if the pod is in development mode or not, values can bedevelopment
orstandard
controller_type
: Represents the type of the top controller that created the pod, values can bedeployment
orstatefulset
controller_name
: Contains the name of the top controller that created the pod