Scrape ntfy metrics with the integrated Prometheus

Until now, ntfy metrics could only be collected by an external Prometheus
server. Enabling the integrated Prometheus (`prometheus_enabled: true`)
now also has it scrape ntfy, like it does for the other services.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-07-28 07:22:09 +03:00
parent d38573a9eb
commit e3dfcbad79
2 changed files with 28 additions and 1 deletions
@@ -189,3 +189,23 @@ matrix_prometheus_services_connect_scraper_synapse_usage_exporter_scrape_configs
'static_configs': matrix_prometheus_services_connect_scraper_synapse_usage_exporter_static_configs,
}]
}}
# Controls whether ntfy shall be scraped
matrix_prometheus_services_connect_scraper_ntfy_enabled: false
matrix_prometheus_services_connect_scraper_ntfy_job_name: ntfy
matrix_prometheus_services_connect_scraper_ntfy_metrics_path: /metrics
matrix_prometheus_services_connect_scraper_ntfy_scrape_interval: 15s
matrix_prometheus_services_connect_scraper_ntfy_scrape_timeout: 15s
matrix_prometheus_services_connect_scraper_ntfy_static_configs: "{{ [{'targets': [matrix_prometheus_services_connect_scraper_ntfy_static_configs_target]}] }}"
matrix_prometheus_services_connect_scraper_ntfy_static_configs_target: ''
# The final scrape config for the ntfy scraper
matrix_prometheus_services_connect_scraper_ntfy_scrape_configs: |
{{
[{
'job_name': matrix_prometheus_services_connect_scraper_ntfy_job_name,
'metrics_path': matrix_prometheus_services_connect_scraper_ntfy_metrics_path,
'scrape_interval': matrix_prometheus_services_connect_scraper_ntfy_scrape_interval,
'scrape_timeout': matrix_prometheus_services_connect_scraper_ntfy_scrape_timeout,
'static_configs': matrix_prometheus_services_connect_scraper_ntfy_static_configs,
}]
}}