Table of Contents
Table of Contents
Further Reading
How Prometheus works
SoundCloud originally built Prometheus. It later joined the Cloud Native Computing Foundation and is now a core part of cloud-native observability.
- Applications and exporters expose metrics on an HTTP endpoint.
- Prometheus scrapes those endpoints on a set interval.
- Metrics are stored as time series with labels.
- Teams query the data with PromQL.
- Alertmanager sends notifications when rules fire, and Grafana visualizes trends.
Key Prometheus components
- Prometheus server: scrapes and stores metrics
- Exporters: expose metrics from systems such as nodes or databases
- PromQL: the query language for metrics
- Alertmanager: routes and groups alerts
- Pushgateway: accepts metrics from short-lived jobs
Prometheus vs. Grafana
The two tools are often used together but do different jobs.
Why Prometheus matters in Kubernetes and testing
Prometheus is a key part of Kubernetes observability. In testing, it captures numeric signals from test runs and links them to system behavior.
- System health: CPU, memory, and resource metrics from nodes, pods, and services
- Reliability engineering: tracks SLIs and SLOs
- Real-time insight: immediate view of workload performance and failures
- Alerting: Alertmanager notifies teams of anomalies
- Visualization: a data source for Grafana dashboards
- Test analytics: measure test performance and stability over time
Consider a SaaS team that alerts on test failure rates in Prometheus. When failures jump after a deploy, on-call sees it with the same tools they use for production.
Common challenges with Prometheus
- High cardinality: too many unique labels slow queries and inflate storage
- Retention limits: long-term storage needs Thanos, Cortex, or similar
- Complex queries: advanced PromQL has a learning curve
- Scaling: multi-cluster setups need careful planning
- Alert fatigue: poorly designed alerts overwhelm teams
- Integration gaps: inconsistent metric names across tools
Good metric design and labeling discipline keep Prometheus healthy.
How Prometheus relates to Testkube
Testkube exposes metrics in Prometheus format. Testing data joins production observability.
- Test metrics: execution duration, success and failure counts, and run frequency
- Native endpoints: Prometheus scrapes metrics directly from Testkube
- Real-time updates: metrics refresh during and after runs
- Grafana dashboards: test metrics next to cluster and app data
- Alerting: Prometheus alerts on Testkube metric thresholds
- Multi-cluster view: test metrics aggregated across clusters
Real-world examples
- Pass rate dashboards: a QA team charts Testkube pass rates and durations in Grafana
- Failure alerts: a DevOps engineer alerts when test failure rates cross a threshold
- Environment issues: a platform team correlates test metrics with CPU and memory use
- Stability trends: an SRE tracks test stability across clusters
- Deployment views: a pipeline owner adds Testkube metrics to deployment dashboards



