From 6682be0d5af2ca7310c2149e47918ec5c313a3aa Mon Sep 17 00:00:00 2001 From: Slimane AMAR Date: Mon, 20 Apr 2026 16:11:43 +0200 Subject: [PATCH] Fix panel id missing for postgres_replica_alert --- scripts/functions/grafana/alerts.py | 2 +- .../grafana/alerts/metrics/postgres_replica_alert.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/functions/grafana/alerts.py b/scripts/functions/grafana/alerts.py index c26e88f..aa52e0a 100644 --- a/scripts/functions/grafana/alerts.py +++ b/scripts/functions/grafana/alerts.py @@ -27,6 +27,7 @@ def create_alert_rule(alert_rule_json_path, parent_folder_uid, datasource_uid, overwrite=False): + print("Importing alert rule " + alert_rule_json_path) file_content = Path(alert_rule_json_path).read_text() file_content = file_content.replace(FOLDER_UID_PLACEHOLDER, parent_folder_uid) file_content = file_content.replace(DATASOURCE_UID_PLACEHOLDER, datasource_uid) @@ -36,7 +37,6 @@ def create_alert_rule(alert_rule_json_path, parent_folder_uid, datasource_uid, o __create_alert_rule(parent_folder_uid, alert_rule_json_path, alert_rule_json) def __create_alert_rule(parent_folder_uid, alert_rule_json_path, alert_rule_json): - print("Importing alert rule " + alert_rule_json_path) result = None try: rule_group_id = alert_rule_json["ruleGroup"] diff --git a/scripts/resources/grafana/alerts/metrics/postgres_replica_alert.json b/scripts/resources/grafana/alerts/metrics/postgres_replica_alert.json index 023752e..f8cb65e 100644 --- a/scripts/resources/grafana/alerts/metrics/postgres_replica_alert.json +++ b/scripts/resources/grafana/alerts/metrics/postgres_replica_alert.json @@ -78,6 +78,7 @@ "for": "1m", "annotations": { "__dashboardUid__": "2087dc11-d4bc-442b-b456-20a10e11445b", + "__panelId__": "269", "description": "This alert check that there is at least one PostgreSQL standby server running.", "summary": "All postgresql standby instances are down." },