Skip to content

Templates

Warning

Optional paths for templates will be removed in v4.0.0

IMPulse uses Jinja2 templates. Templates allow you to modify incident messages and thread messages.

Also you can modify templates for task management.

Incident messages

There are 3 templates that users can customize as needed (see messages structure). These are:

  • status icons
  • header
  • body

special variables: incident, payload, parents, childs, incidents (deprecated)

runbook

To resolve incidents faster, you can add documentation links to your alerts. To attach a documentation link to an alert, use the special annotation field called runbook:

- alert: InstanceDown
  expr: up == 0
  annotations:
    runbook: https://<company>.confluence.com/alerts/InstanceDown

IMPulse will display the runbook link in the incident view (see body). You can change the format to a convenient one and redefine template files.

Thread messages

Every message IMPulse posts into an incident thread is rendered from its own template file. Template files are located in ./thread_templates and are named <messenger.type>_<template>.j2, so each messenger has its own version of every message.

Below is a list of available templates.

chain_step_group

  • description: posted when a chain reaches a group step
  • enabled by: always
  • special variables: step, incident, users, user_groups, groups, webhooks

chain_step_user

  • description: posted when a chain reaches a user step
  • enabled by: always
  • special variables: step, incident, users, user_groups, groups, webhooks

chain_step_user_group

  • description: posted when a chain reaches a user_group step
  • enabled by: always
  • special variables: step, incident, users, user_groups, groups, webhooks

chain_step_webhook

  • description: posted when a chain reaches a webhook step
  • enabled by: always
  • special variables: step, incident, users, user_groups, groups, webhooks

incident_notifications_assignment

incident_notifications_freeze

incident_notifications_new_firing

incident_notifications_partial_resolved

incident_notifications_status_update

incident_notifications_unfreeze

  • description: posted when an incident is unfrozen
  • enabled by: always
  • special variables: incident, parents, childs, ui_user

Task Management

You can customize the Summary and Description used when creating tasks in the task management application. Template files are located in the templates directory and are named <task_management.type>_summary.j2 and <task_management.type>_description.j2.