Skip to main content
Version: 1.17

Okteto Insights

Okteto inherently generates a lot of data from developers using the platform. This includes product usage and behavior data (i.e. developer activities) as well as infrastructure utilization and performance data (i.e. infrastructure and platform activities).

Okteto Insights makes this data 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.

This feature is disabled by default. To enable it you need to set the helm setting insights.enabled to true and upgrade your Okteto instance. If you are an Okteto SaaS user, please reach out to your support contact to turn this feature on.

How to consume Okteto Insights data

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.

Next 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
caution

Okteto 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.

What data is available

Okteto will progressively make more data available through this endpoint. The following metrics are available today:

Node Metrics

  • okteto_system_node: This metric is a gauge which represents the number of nodes running Okteto. This metric does not have any labels.
  • okteto_system_node_memory_bytes: This metric is a gauge which represents the total memory (in bytes) available for allocating to a node. It has the following labels:
    • node_name: It contains the node name.
  • okteto_system_node_memory_requested_bytes: This metric is a gauge which represents the total memory (in bytes) requested for a node. It has the following labels:
    • node_name: It contains the node name.
  • okteto_system_node_memory_usage_bytes: This metric is a gauge which represents the total memory (in bytes) in use for a node. It has the following labels:
    • node_name: It contains the node name.
  • okteto_system_node_cpu_cores: This metric is a gauge which represents the total CPU cores available for allocating to a node. It has the following labels:
    • node_name: It contains the node name.
  • okteto_system_node_cpu_requested_cores: This metric is a gauge which represents the total CPU cores requested for a node. It has the following labels:
    • node_name: It contains the node name.
  • okteto_system_node_cpu_usage_cores: This metric is a gauge which represents the total CPU cores in use for a node. It has the following labels:
    • node_name: It contains the node name.

Pod Metrics

  • okteto_system_pod_container_cpu_requests_cores: This metric is a gauge which represents the total CPU requested of a pod and standard container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_container_cpu_limits_cores: This metric is a gauge which represents the CPU limits of a specific pod and standard container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_init_container_cpu_requests_cores: This metric is a gauge which represents the CPU requests of a specific pod and init container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_init_container_cpu_limits_cores: This metric is a gauge which represents the CPU limits of a specific pod and init container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_container_cpu_usage_cores: This metric is a gauge which represents the CPU usage of a specific pod and standard container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_container_memory_requests_bytes: This metric is a gauge which represents the memory requested for a specific pod and standard container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_container_memory_limits_bytes: This metric is a gauge which represents the memory limits for a specific pod and standard container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_init_container_memory_requests_bytes: This metric is a gauge which represents the memory requested for a specific pod and init container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_init_container_memory_limits_bytes: This metric is a gauge which represents the memory limits for a specific pod and init container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.
  • okteto_system_pod_container_memory_usage_bytes: This metric is a gauge which represents the memory usage of a specific pod and standard container at that point in time. It has the following labels:
    • container_name: It contains the name of the container being represented.
    • pod_name: It contains the name of the pod being represented.
    • namespace: It contains the namespace name.
    • node_name: It contains the node name.

Build Metrics

  • okteto_usage_build_duration_seconds: This metric is a histogram which represent metrics related to build times of the images that are being built within Okteto. It has the following labels:
    • buildkit_hostname: It contains the buildkit hostname that owns the time series.
    • registry: It contains the registry where the container image was pushed in the format of a hostname. It may include a port number if the registry config specifies it.
    • image: It contains the repository and image name used to push the container image, split by an /.
    • tag: It contains the tag used to push the container image.

All metrics provided by Okteto will have the prefix okteto_