From a3c4076aae02c952df7605c48f38182aec0a1fde Mon Sep 17 00:00:00 2001 From: Eldon Koyle Date: Thu, 3 Mar 2016 16:55:34 -0700 Subject: [PATCH] Add some hints in the documentation. --- doc/Extensions/Alerting.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/Extensions/Alerting.md b/doc/Extensions/Alerting.md index 6ce8431f8..e2f5a9ae3 100644 --- a/doc/Extensions/Alerting.md +++ b/doc/Extensions/Alerting.md @@ -116,6 +116,7 @@ Placeholders: - Rule: `%rule` - Rule-Name: `%name` - Timestamp: `%timestamp` +- Transport name: `%transport` - Contacts, must be iterated in a foreach, `%key` holds email and `%value` holds name: `%contacts` The Default Template is a 'one-size-fit-all'. We highly recommend defining own templates for your rules to include more specific information. @@ -136,6 +137,11 @@ Rule: {if %name}%name{else}%rule{/if}\r\n Alert sent to: {foreach %contacts}%value <%key> {/foreach} ``` +Conditional formatting example, will display a link to the host in email or just the hostname in any other transport: +```text +{if %transport == 'mail'}%hostname{else}%hostname{/if} +``` + # Transports Transports are located within `$config['install_dir']/includes/alerts/transports.*.php` and defined as well as configured via ~~`$config['alert']['transports']['Example'] = 'Some Options'`~~.