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.
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.
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
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:
okteto_system_node
: This metric is a gauge which represents the number of nodes running Okteto. This metric does not have any label.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.
All metrics provided by Okteto will have the prefix
okteto_