FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
agodbole
Staff
Staff
Article Id 418975
Description

 

This article describes how to create a custom automation stitch that runs a CLI script and sends its output to email when the automation stitch is triggered.

 

Scope

 

FortiGate V7.0, v7.2, v7.4, v7.6.

 

Solution

 

The trigger condition used for this case is when the FortiGuard web filtering service is unavailable.

  1. Create a Trigger: From the FortiGate GUI, navigate to the following page:

 

How to Create a Trigger.jpg

 

Webfilter unreachable.jpg

 

  1. Create an Action: Here, create two actions: a. CLI Script, b. Email notification to send the CLI output to email. 
    From the FortiGate GUI, navigate to:
    1. Create a CLI script:

Create Automation Action.jpg

 

Create CLI action.jpg

 

    1. Create an email notification to send CLI script output to email. Add %%results%% in the Body section to send the previous action output to email.

 

Add email address.jpg

 

  1. Create a stitch.
    1. Select the Action and Trigger created previously and select the email notification action after the CLI script Action.

 

Create Stitch_1.jpg

 

Once completed, the FortiGate will send the CLI output to the email address in the Email Notification section.

Contributors