The Simplest Way to Make Kuma and Prometheus Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You pair Kuma and Prometheus to track service traffic and health in production. Kuma runs sidecars that expose traffic stats, and Prometheus scrapes those stats on a timer. This workflow lets teams spot slow calls, failed requests, and network drops fast. Platform engineers get clear numbers without adding tracking code to each app. When both tools share clean rules, you can watch every service in your mesh. How data and roles flow between Kuma and Prometheus Kuma runs a control plane that s

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You pair Kuma and Prometheus to track service traffic and health in production. Kuma runs sidecars that expose traffic stats, and Prometheus scrapes those stats on a timer.

This workflow lets teams spot slow calls, failed requests, and network drops fast. Platform engineers get clear numbers without adding tracking code to each app. When both tools share clean rules, you can watch every service in your mesh.

How data and roles flow between Kuma and Prometheus

Kuma runs a control plane that sends rules to data plane sidecars. Each sidecar sits next to an app and handles all network traffic. As traffic flows, the sidecar counts requests, errors, and wait times.

Prometheus needs a way to find all these sidecars as apps scale up. Kuma helps by offering a discovery endpoint that lists active mesh targets. Prometheus reads this list to know which network addresses and ports to check.

Before data flows, you must set up proper roles and permissions. If your mesh uses mutual TLS, Prometheus cannot read sidecar ports with plain requests. You can allow Prometheus to join the mesh with its own identity certificate. You can also ask Kuma to expose metrics on a local port for scraping.

Once trust is in place, Prometheus pulls the stats over the network. It stores the time series data on disk for alerts and charts. The control plane also exposes its own stats so you can watch mesh health.

Common failure modes and how to scope access

Many teams rush the setup and leave metric ports open to the whole network. Anyone on the network can read those stats and learn about your app layout. Shared service accounts with broad tokens also create big risks if a token leaks.

Another common issue happens when teams skip traffic permissions for the scraper. If you turn on strict mesh traffic rules, Kuma blocks unknown callers by default. Your charts go blank because the scraper lacks a traffic rule allowing it in.

End-to-End Encryption + Prometheus Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can fix this by giving the scraper a narrow mesh identity. Write a traffic permission rule that only lets the scraper reach metric ports. Do not give the monitoring tool permission to call business app endpoints.

High metric volume can also break your monitoring server in large clusters. Sidecars track many labels for every route, service, and status code. When hundreds of services talk to each other, the metric count grows fast. You should filter out unused labels before saving them to disk.

Keeping metric collection stable at scale

Long-term stability depends on how you manage keys, certs, and scrape timers. Short scrape intervals put heavy load on both sidecars and the control plane. Pick a scrape rate that matches how fast your team reacts to alerts.

Rotate your mesh certs often so old keys cannot read internal traffic. Check your control plane logs to catch failed scrapes or denied certs early. Keep your target lists clean so the scraper does not waste time on dead pods.

Test your alert rules in a staging mesh before pushing them to live apps. When you change a mesh traffic policy, check that metric pulls still work. Good habits keep your charts running when real outages hit your apps.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

How does Prometheus find new Kuma sidecars when apps scale?

The Kuma control plane keeps an updated list of all running data plane proxies. The monitoring server queries the control plane to get current targets without manual file edits.

Why do my metrics stop flowing after turning on mutual TLS?

Mutual TLS blocks plain network calls and requires valid certs from both sides. You must give the scraper a mesh identity or set up a safe metric path.

How can I stop sidecar metrics from filling up my storage?

You can drop noisy metric labels and increase the time between each scrape. Only keep the stats that power your active alerts and daily team dashboards.

The query runs. The emails stay hidden.