Prometheus scrapes metrics from exporters at configurable intervals (default: 15s) and stores them in a time-series database. Grafana connects to Prometheus as a data source, renders dashboards, and sends alerts via email, Slack, PagerDuty, and more.
Key exporters for a typical web server:
- Node Exporter: CPU, memory, disk, network metrics
- nginx Exporter: Active connections, request rate, error rate
- Blackbox Exporter: HTTP uptime monitoring and SSL certificate expiry
Essential alert rules: High CPU (>85% for 5 minutes), low disk space (<10%), high memory usage (>90%), site downtime (probe_success == 0), SSL certificate expiring within 14 days.
PromQL basics: rate() for per-second rates from counters, irate() for instantaneous rates, arithmetic operators for percentages, by (instance) for label grouping.
For dashboards: import "Node Exporter Full" (ID: 1860) from grafana.com for a comprehensive server overview without building from scratch.
Kommentare
Kommentare werden von Remark42 bereitgestellt. Beim Laden werden Daten an unseren Kommentar-Server übertragen.