Skip to content

How usage is collected

Seylo’s usage figures are CPU, memory, network, CPU throttling, restarts and OOM kills per container. They appear under each right-sizing on FinOps → Cost & savings → Savings and drive right-sizing recommendations. Separately, the managed vCPU figure your platform fee is metered on is read from the same in-cluster store.

The principle: collected once, summarised in your cluster

Section titled “The principle: collected once, summarised in your cluster”

The agent collects usage inside your cluster. It summarises each container over a reporting window (p50, p95, maximum and average for CPU and memory, plus network, throttling, restarts and OOM kills) and pushes that one summary over its existing outbound connection. Raw samples never leave the agent’s process, and Seylo stores only the summaries.

With the chart: the store is read instead of the kubelet

Section titled “With the chart: the store is read instead of the kubelet”

The chart’s VictoriaMetrics already scrapes every node’s kubelet and cAdvisor, every metrics.scrapeInterval (default 30s). From agent 0.2.5, on a cluster whose metrics source is the default kubelet, the agent reads usage from that store and does not scrape the kubelet itself. The kubelet is scraped once instead of twice, and the numbers are the same.

For this, you need:

  • Agent 0.2.5 or later. Earlier agents keep scraping the kubelet even when the store is installed.
  • Chart 0.2.5 for network figures. Earlier charts dropped the series that carry pod network traffic.
  • The metrics source left at kubelet, the default. If you set the cluster to prometheus with a URL, or to metrics-server, the agent uses that and does not read this store for usage.

Restart counts and OOM kills do not come from the store. They come from the Kubernetes API, whatever the source.

The agent falls back to scraping the kubelet itself for that round in two cases:

  • the query to the store fails;
  • the store returns no container CPU series while containers are running. A store that does not scrape cAdvisor, such as your own pointed at with the agent’s observability.metricsUrl, has no data. That is not zero use.

The agent records a warning in this form:

the metrics store at <url> could not supply usage (<reason>); reading the kubelet directly, and trying the store again in 10 minutes.

It then leaves the store alone for ten minutes rather than retrying every round. When the agent switches between the store and the kubelet, network and throttling counters are not compared across the switch, because a difference between two sources is not a rate.

If nothing is running, an empty answer is the correct answer, and the store stays the source.

This is the only way a namespace-scoped agent gets usage figures. Its Role cannot grant access to Nodes, so it can never scrape the kubelet. The store’s scraping uses the chart’s own permissions, not the agent’s. If the store cannot answer, the fallback to the kubelet fails too, and usage is reported as unknown, not zero. See namespace-scoped installs.

Agent install Metrics source What you get
Cluster-wide kubelet (default) The agent scrapes each node’s kubelet through the API server’s node proxy. CPU, memory, network and throttling. Nothing to install, but the kubelet is the agent’s to scrape
Namespace-scoped kubelet (default) Nothing. The agent cannot list Nodes, so every usage figure is unknown, and the warning says why
Either prometheus, with an in-cluster URL The agent queries your Prometheus from inside the cluster. CPU, memory, network, throttling
Either metrics-server CPU and memory only. Network and throttling are shown as n/a for everyone
Either none Nothing is collected, and Seylo says so

In every case managed vCPU is not measured without the chart (see below). Metrics, logs, traces, APM and dashboards have no data.

The platform fee is metered on managed vCPU: the CPU requests of running and pending pods in the namespaces Seylo manages. Once a day, Seylo asks the store for the 24-hour average, through the agent. The figure is read from kube-state-metrics, which only the chart provides. Usage collection through the kubelet, Prometheus or metrics-server does not supply it.

The reading carries a note that says how it was measured:

Note begins Meaning
Measured from kube-state-metrics: CPU requests of running and pending pods in … A reading. If some containers have no CPU request, the note says how many. They are not billed
Unmeasured, because the metrics store could not be queried: … The chart is missing or unreachable, or the agent is offline
Unmeasured, because the metrics store has no kube_pod_container_resource_requests series for this cluster. The store is there, but kube-state-metrics is off or has not been scraped yet

An unmeasured day is left out of the month’s mean, never counted as zero and never estimated. A namespace-scoped agent narrows the reading to its own namespaces. For the query and how the fee is calculated, see plans and billing.

  • Right-sizing and usage history are built from the stored summaries, whichever source produced them. The summaries carry each container’s requests and limits as well, so a recommendation never needs a second read of the cluster. A figure the source could not provide is stored as missing, not as zero. When there is too little data for a recommendation, Seylo says what is missing and gives no numbers.
  • Pod-failure alerts come from pod status and Kubernetes events, not from usage or the store. See alerts.
  • Alert rules over metrics and logs (Alerts → Rules) run their query against the store through the agent, as the rule’s author. Without the chart they have nothing to query.