From 38ee60e0993e92aea69ecc3d685be87bbaf42082 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 27 Jul 2025 17:39:10 -0500 Subject: [PATCH] v-m: Add alerts for Firefly, Paperless, phpipam _Firefly III_ and _phpipam_ don't export any Prometheus metrics, so we have to scrape them via the Blackbox Exporter. Paperless-ngx only exposes metrics via Flower, but since it runs in the same container as the main application, we can assume that if the former is unavailable, the latter is as well. --- victoria-metrics/alerts.yml | 19 +++++++++++++++++++ victoria-metrics/scrape.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/victoria-metrics/alerts.yml b/victoria-metrics/alerts.yml index ebc8a28..c7611f1 100644 --- a/victoria-metrics/alerts.yml +++ b/victoria-metrics/alerts.yml @@ -248,6 +248,13 @@ groups: - name: Paperless-ngx rules: + - alert: Paperless-ngx is down + expr: >- + up{job="paperless-ngx"} == 0 or absent(up{job="paperless-ngx"}) + annotations: + summary: Paperless-ngx is down + description: >- + Paperless-ngx is offline. - alert: Celery tasks failed expr: >- max_over_time( @@ -279,3 +286,15 @@ groups: Paperless-ngx uses a scheduled Celery task to periodically poll email mailboxes for new messages. If this task does not start, new email messages will not be downloaded and imported into the document library. + +- name: Firefly III + rules: + - alert: Firefly III is down + expr: >- + probe_success{job="firefly-iii"} != 1 + +- name: phpipam + rules: + - alert: phpipam is down + expr: >- + probe_success{job="phpipam"} != 1 diff --git a/victoria-metrics/scrape.yml b/victoria-metrics/scrape.yml index 318bd70..3341274 100644 --- a/victoria-metrics/scrape.yml +++ b/victoria-metrics/scrape.yml @@ -489,3 +489,36 @@ scrape_configs: target_label: __address__ - source_labels: [__address__] target_label: instance + +- job_name: firefly-iii + metrics_path: /probe + params: + module: + - http + static_configs: + - targets: + - https://firefly.pyrocufflink.blue/ + - https://receipts.pyrocufflink.blue/ + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: blackbox-exporter:9115 + +- job_name: phpipam + metrics_path: /probe + params: + module: + - http + static_configs: + - targets: + - phpipam.pyrocufflink.blue + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: blackbox-exporter:9115