# Prometheus Pushgateway Промежуточное хранилище метрик для batch-задач, CI/CD, cron-скриптов — всего что не может быть scraped напрямую Prometheus. Устанавливается в namespace `monitoring` (рядом с Prometheus). ## Быстрый старт ```yaml # group_vars/all/addons.yml addon_pushgateway: true addon_prometheus_stack: true # Prometheus scrapes Pushgateway автоматически ``` ```bash make addon-pushgateway ``` ## Параметры | Переменная | Умолч. | Описание | |---|---|---| | `pushgateway_ingress_enabled` | `false` | Ingress (обычно не нужен) | | `pushgateway_persistence_enabled` | `false` | Сохранять метрики при рестарте | | `pushgateway_persistence_size` | `2Gi` | PVC если persistence enabled | ## Endpoint ``` http://prometheus-pushgateway.monitoring.svc.cluster.local:9091 ``` ## Отправить метрику (curl) ```bash # Одна метрика cat < 3600 for: 0m annotations: summary: "Batch job hasn't run in 1 hour" ``` ## Удалить метрику ```bash curl -X DELETE \ http://prometheus-pushgateway.monitoring.svc.cluster.local:9091/metrics/job/my-batch-job ``` ## Официальные ресурсы - Официальный сайт: [https://github.com/prometheus/pushgateway](https://github.com/prometheus/pushgateway) - Официальная документация: [https://github.com/prometheus/pushgateway](https://github.com/prometheus/pushgateway) - Версии Helm chart / ПО: [https://artifacthub.io/packages/helm/prometheus-community/prometheus-pushgateway](https://artifacthub.io/packages/helm/prometheus-community/prometheus-pushgateway)