Prometheus
URL: http://109.199.120.120:9090 Config:/opt/coderz/configs/prometheus/prometheus.yml
Prometheus is the metrics backbone of the stack. It scrapes metrics from every service every 15 seconds and stores them as time-series data. Grafana queries Prometheus to build all dashboards and evaluate alert rules.
How It Works
Scrape Targets
| Target | Port | What It Collects |
|---|---|---|
| Node Exporter | 9100 | Host CPU, RAM, disk, network, processes |
| cAdvisor | 8080 | Per-container CPU, memory, network, I/O |
| .NET API | 5050 | HTTP request counts, durations, error rates |
| k3s API Server | 6443 | Kubernetes pod/node/deployment status |
| kube-state-metrics | 8080 | Kubernetes resource state |
| Prometheus itself | 9090 | Self-monitoring |
Key Metrics
Host Metrics (from Node Exporter)
Container Metrics (from cAdvisor)
.NET API Metrics
Retention
Prometheus stores metrics locally for 30 days by default. Data older than 30 days is automatically deleted. To change retention, update the Prometheus startup command indocker-compose.yml:
Accessing the UI
The Prometheus UI at port 9090 lets you:- Execute PromQL queries directly
- See all scrape targets and their status (Targets page)
- View alert rules and their current state
Check All Targets Are Up
Go to: http://109.199.120.120:9090/targets All targets should showState: UP. A DOWN state means Prometheus cannot reach that service.