Predefined Messages
Predefined Messages (or Templates) are message prepared in advance. They can be notified instantly, without the need.
A predefined message has :
- a short unique name (identifier)
- a title. Used in web pages, email subject and SMS content.
- a severity (built-in) which defines colors (red/yellow/green/...) for visual impact
- a category to help group/flag similar messages
- a description : hint for the operator when selecting the predefined message
- a message content : bloc of text that describe the situation
- a publicapge field : which public page will be dispayed on the Internet
- a private page switch : wheter to make the message available to all in the private Sirene
- an email switch : toggles email notification
- an SMS switch : toggles SMS notifications
- a list of scopes to notify
Public page are optional. Private page are also optional.
Placeholders
Message templates accept special words that will be replaced dynamically at notification time.
The following placeholders will be rendered as follow :
- $APPS$ : a bullet list of selected apps
- $SITES$ : a bullet list of selected sites
- $APPS,$ : an inline comma separated list of selected apps
- $SITES,$ : an inline comma separated list of selected sites
- {% %} templating syntax with apps and sites populated variable for custom rendering
It enables fewer predefined templates (like site outage, or app outage) where the operator just has to select which sites or apps are affected.
Data Model
predefined_messages:
predefined_messages
- name: predefined001
#delete: false
#is_enabled: true
title: "Sirene - TEST TEST TEST - message de test - $APPS,$ $SITES,$"
severity: major
category: test
description: |
Test message with sites and apps placeholders.
And a public page
message: |
This a test message (with placeholders)
Apps selected (bullet list):
{% for app in apps %}- {{ app }}
{% endfor %}.
Apps (inline):
{% for app in apps %}{{ app }},{% endfor %}
.
Apps (bullet shortcut):
$APPS$
.
Apps (inline shortcut) : $APPS,$
.
Sites: $SITES,$
As a list:
$SITES$
End of message.
publicpage: publicpage_test
has_privatepage: true
has_email: true
has_sms: false
notify_to:
- joe@test.com
- u:joe@test.com
- user:joe@test.com
- g:mygroup1
- group:mygroup1
- s:site01
- site:site01
- sg:region1
- sitegroup:region1
- a:myapp01
- app:myaap01
Example
Simple
- name: 400_datacenter01_down
title: Datacenter 01 is down
severity: major
category: incident
publicpage: public_major
has_privatepage: true
message: Outage on datacenter 01 ; all services unavailable.
has_email: true
has_sms: true
description: "Hint: use with procedure 44 by on-call operator"
notify_to:
- site:datacenter01
- group:it_operations
With placeholders
- name: application_down
title: "Application down: $APPS,$"
severity: minor
category: incident
publicpage: public_mineur
has_privatepage: true
message: |
We are experiencing an outage on several applications:
Affected applications and services :
$APPS$
Please connect and stay tuned.
IT Staff
has_email: true
has_sms: false
description: GENERIC for app down => select affected apps before notification
notify_to:
- g:demo