34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
|
|
Here place for user templates for alerts, groups and notifications.
|
|
|
|
Default templates stored in includes/templates/ <- DO NOT TOUCH files here
|
|
Use this dir for overrides.
|
|
|
|
# change current dirrectory to your observium dir
|
|
cd /opt/observium
|
|
# copy (or create) new template from defaults, for example HTML email notifications:
|
|
cp includes/templates/notification/email_html.tpl templates/notification/
|
|
# edit copied file:
|
|
nano templates/notification/email_html.tpl
|
|
|
|
FORMATS
|
|
|
|
Notifications uses Mustache/CTemplate syntax.
|
|
|
|
Examples and demo see here: https://mustache.github.io/
|
|
But note, not all features of mustache supported.
|
|
Supported:
|
|
* standart php comments
|
|
* {{! %^ }} - intext comments
|
|
* {{var}} - escaped var
|
|
* {{{var}}} - unescaped var
|
|
* {{var.subvar}} - dot notation vars
|
|
* {{.}} - implicit iterator
|
|
* {{#var}} some text {{/var}} - if/list condition
|
|
* {{^var}} some text {{/var}} - inverted (negative) if condition
|
|
|
|
Groups and alert templates uses xml syntax.
|
|
|
|
Examples see in includes/templates/ dir.
|
|
|