Back openDesk Edu for a sovereign, open-source education â every vote counts.
Vote nowSave products you love by clicking the heart icon.
Build a complete production infrastructure with open-source tools: PostgreSQL for data, Redis for caching, MinIO for S3-compatible storage, n8n for workflow automation, Prometheus and Grafana for observability - all behind a secure reverse proxy. All components work together in a cohesive architecture.
Grafana has become the de-facto standard for infrastructure observability dashboards. Its support for multiple data sources, flexible query languages, and built-in alerting make it the central pane of glass for modern operations teams.
A typical observability stack with Grafana:
Start by adding data sources in Configuration â Data Sources:
Prometheus (metrics):
URL: http://prometheus:9090
Scrape interval: 15s
Default: Yes
Loki (logs):
URL: http://loki:3100
Derived fields: extract traceID from log lines for trace correlation
InfluxDB or Graphite can be added alongside for legacy data.
Organize dashboards by service layer:
/Infrastructure/
âââ Nodes Overview â CPU, memory, disk, network across all hosts
âââ Kubernetes Cluster â Pod health, resource usage, node status
âââ Network Latency â Inter-service latency, packet loss
/Services/
âââ Web Server Farm â Request rate, error rate, response times
âââ Database Cluster â Connections, query latency, replication lag
âââ Message Queue â Queue depth, consumer lag
A typical node CPU panel using PromQL:
100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
Add thresholds for visual clarity:
{
"thresholds": [
{ "value": 80, "color": "yellow" },
{ "value": 95, "color": "red" }
]
}
Use dashboard variables to make dashboards reusable:
Variable: $host
Type: Query
Query: label_values(node_os_version, instance)
This populates a host dropdown, and all panels use $host in their queries:
node_memory_MemAvailable_bytes{instance="$host"} / node_memory_MemTotal_bytes{instance="$host"}
Grafana Alerting replaces standalone Alertmanager configuration. Create alert rules directly in the UI:
WHEN avg() OF query(A, 5m) IS ABOVE 90For Slack notifications, configure the contact point in Alerting â Contact points:
Type: Slack
Webhook URL: https://hooks.slack.com/services/YOUR/WEBHOOK
Title: {{ .Alert.Name }} â {{ .Labels.instance }}
Message: {{ .Annotations.description }}
Use annotations to mark events on dashboards (deployments, config changes):
curl -X POST http://grafana:3000/api/annotations \
-H "Authorization: Bearer $GRAFANA_TOKEN" \
-d '{"dashboardUID":"abc123","time":'$(date +%s)'000,"text":"Deploy v2.1.0","tags":["deploy"]}'
Prometheus recording rules pre-compute expensive queries that dashboards use frequently:
# rules/recording.yml
groups:
- name: node_rules
rules:
- record: node:cpu_utilization:avg_5m
expr: avg by(instance) (rate(node_cpu_seconds_total{mode!="idle"}[5m]))