2022-06-03 08:09:47 -06:00
|
|
|
# Main
|
|
|
|
|
enabled = True
|
|
|
|
|
title = "Webhook"
|
|
|
|
|
slug = "webhook"
|
2023-05-31 19:26:36 +08:00
|
|
|
short_description = "If your monitoring system isn't listed, choose Webhook for generic templates, and feel free to modify them as needed."
|
2022-06-03 08:09:47 -06:00
|
|
|
description = None
|
2023-05-31 19:26:36 +08:00
|
|
|
is_featured = True
|
|
|
|
|
featured_tag_name = "Generic"
|
2022-06-03 08:09:47 -06:00
|
|
|
is_displayed_on_web = True
|
|
|
|
|
is_able_to_autoresolve = True
|
|
|
|
|
is_demo_alert_enabled = True
|
|
|
|
|
|
|
|
|
|
# Default templates
|
|
|
|
|
slack_title = """\
|
|
|
|
|
*<{{ grafana_oncall_link }}|#{{ grafana_oncall_incident_id }} Incident>* via {{ integration_name }}
|
|
|
|
|
{% if source_link %}
|
|
|
|
|
(*<{{ source_link }}|source>*)
|
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
slack_message = "```{{ payload|tojson_pretty }}```"
|
|
|
|
|
|
|
|
|
|
slack_image_url = None
|
|
|
|
|
|
|
|
|
|
web_title = "Incident"
|
|
|
|
|
|
|
|
|
|
web_message = """\
|
|
|
|
|
```
|
|
|
|
|
{{ payload|tojson_pretty }}
|
|
|
|
|
```
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
web_image_url = slack_image_url
|
|
|
|
|
|
|
|
|
|
sms_title = web_title
|
|
|
|
|
|
|
|
|
|
phone_call_title = sms_title
|
|
|
|
|
|
|
|
|
|
telegram_title = sms_title
|
|
|
|
|
|
|
|
|
|
telegram_message = "<code>{{ payload|tojson_pretty }}</code>"
|
|
|
|
|
|
|
|
|
|
telegram_image_url = slack_image_url
|
|
|
|
|
|
|
|
|
|
source_link = "{{ payload.url }}"
|
|
|
|
|
|
|
|
|
|
grouping_id = "{{ payload }}"
|
|
|
|
|
|
|
|
|
|
resolve_condition = """\
|
|
|
|
|
{%- if "is_amixr_heartbeat_restored" in payload -%}
|
|
|
|
|
{# We don't know the payload format from your integration. #}
|
|
|
|
|
{# The heartbeat alerts will go here so we check for our own key #}
|
|
|
|
|
{{ payload["is_amixr_heartbeat_restored"] }}
|
|
|
|
|
{%- else -%}
|
2022-06-13 13:37:48 +03:00
|
|
|
{{ payload.get("state", "").upper() == "OK" }}
|
2022-06-03 08:09:47 -06:00
|
|
|
{%- endif %}"""
|
|
|
|
|
acknowledge_condition = None
|
|
|
|
|
|
2023-06-01 15:37:37 +03:00
|
|
|
example_payload = {"message": "This alert was sent by user for demonstration purposes"}
|