prometheus-configuration
Set up Prometheus for comprehensive metric collection, storage, and monitoring of infrastructure and applications. Use when implementing metrics collection, setting up monitoring infrastructure, or configuring alerting systems.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Set up Prometheus for comprehensive metric collection, storage, and monitoring of infrastructure and applications. Use when implementing metrics collection, setting up monitoring infrastructure, or configuring alerting systems.
How to use
Wybierz metodę wdrożenia: dla Kubernetesa użyj Helm (helm repo add prometheus-community, helm install prometheus prometheus-community/kube-prometheus-stack), dla Docker Compose przygotuj plik docker-compose.yml z obrazem prom/prometheus:latest i wolumenami dla konfiguracji i danych.
Utwórz plik prometheus.yml zawierający konfigurację globalną (scrape_interval, evaluation_interval) i zdefiniuj cele scrapowania (scrape_configs) wskazując adresy aplikacji z endpointem /metrics.
Skonfiguruj retention policy ustawiając storage.tsdb.retention.time na wymaganą długość przechowywania (np. 30d) oraz rozmiar wolumenu danych (np. 50Gi na Kubernetesie).
Dodaj reguły alertów (alert_rules) definiując warunki, przy których Prometheus powinien wysyłać powiadomienia do AlertManagera.
Zintegruj Prometheus z narzędziami wizualizacji (Grafana) i długoterminowym przechowywaniem (Thanos/Cortex) poprzez konfigurację remote_write lub datasources w Grafanie.
Uruchom Prometheus i weryfikuj zbieranie metryk poprzez dostęp do interfejsu webowego (port 9090) oraz sprawdzenie statusu celów scrapowania w zakładce Targets.