Technical Tip: Sending email alert when SD-WAN health check fails
| Description | This article describes how to trigger an automation stitch to send an email when an SD-WAN health check fails. |
| Scope | FortiOS v6.4 and later. |
| Solution | This article gives an example of a basic health check alert when an SD-WAN health check is down. If the interface is not an SD-WAN member, see this article: Technical Tip: Email alert when WAN interface went down for a similar configuration.
To configure an SD-WAN health check, see SD-WAN performance SLA.
The automation stitch is triggered based on the following log:
date=2026-03-11 time=00:08:47 eventtime=1773212927700412660 tz="-0700" logid="0113022931" type="event" subtype="sdwan" level="warning" vd="root" logdesc="SDWAN SLA information warning" eventtype="Health Check" healthcheck="INET_PING" interface="wan1" probeproto="ping" oldvalue="alive" newvalue="dead" msg="SD-WAN health-check member changed state."
config system automation-trigger edit "HealthCheck1_DOWN_trigger" set event-type event-log config fields edit 1 set name "interface" next edit 2 set name "newvalue" set value "dead" <--- If configuring an alert for health check recovery, use 'alive'. next edit 3 set name "healthcheck" set value "INET_PING" next end next end
In this example, a default alert email including the log is sent when the trigger activates, but a configured action could be almost any firewall operation, including a CLI script.
config system automation-action edit "HealthCheck1_DOWN_email" set action-type email set minimum-interval <seconds> <--- It is recommended to configure a minimum-interval to avoid alert spam in the event a health check flaps frequently. next end
config system automation-stitch edit "HealthCheck1_DOWN_stitch" set trigger "HealthCheck1_DOWN_trigger" config actions edit 1 set action "HealthCheck1_DOWN_email" set required enable next end next end
Notes:
config system email-server set server "fortinet-notifications.com" <--- Default remote email server. end
config firewall address edit "fortinet-notifications.com" set type fqdn next end
config system sdwan config service edit <index> set name "System_Email" next end end |
