From 51a641c93b40d6eed2ec870cdfeadd52ce943a1b Mon Sep 17 00:00:00 2001 From: Kevin Krumm Date: Fri, 17 Nov 2017 19:33:35 -0600 Subject: [PATCH] docs: added ports template to alert rules doc (#7763) Ports utilization template --- doc/Alerting/Templates.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/Alerting/Templates.md b/doc/Alerting/Templates.md index 78e934cff9..beba3155c7 100644 --- a/doc/Alerting/Templates.md +++ b/doc/Alerting/Templates.md @@ -72,6 +72,25 @@ Rule: {if %name}%name{else}%rule{/if} {foreach %faults} #%key: %value.string{/foreach}{/if} Alert sent to: {foreach %contacts}%value <%key> {/foreach} ``` +Ports Utilization Template: +```text +%title +Device Name: %sysName +Severity: %severity +{if %state == 0}Time elapsed: %elapsed{/if} +Timestamp: %timestamp +Rule: {if %name}%name{else}%rule{/if} +{if %faults} +{foreach %faults} +Device: %value.sysname +Physical Interface: %value.ifDescr +Interface Description: %value.ifAlias +Interface Speed in Bits: %value.ifSpeed +Inbound Utilization: {calc (((%value.ifInOctets_rte8)/%value.ifSpeed)100)}% +Outbound Utilization: {calc (((%value.ifOutOctets_rate8)/%value.ifSpeed)100)}% +{/foreach} +{/if} +``` Conditional formatting example, will display a link to the host in email or just the hostname in any other transport: ```text