Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/functions/grafana/alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
},
Expand Down
Loading