Skip to main content
ydong01
Staff
Staff
October 30, 2019

Technical Tip: FortiGate Automation use Webhook send message to Slack

  • October 30, 2019
  • 0 replies
  • 8127 views

Description

 

This article describes how FortiGate uses the Automation function via webhook to send message to Slack channel and how to customize information written to the event log/syslog.

More information on the Webhook action: Webhook action

Solution

 

  1. Create New Automation:

 


 
  1. Give the new automation stitch a name:

 
  1. Select a Trigger method

 

 
  1. Select an Event
 
 
 
  1. Select an Action:
 
 
  1. Enter the Slack Channel Information
 

 
 
  1. For the test, generate an 'Admin login failed' event:
 
 
 
 
 
 
FGT # diagnose debug app autod -1
Debug messages will be on for 30 minutes.

FGT # diagnose debug enable

FGT # auto_generate_generic_curl_request()-302: Generating generic automation CURL request for action (webhook2slack).
auto_generate_generic_curl_request()-350: Generic automation CURL request POST data for action (webhook2slack):
{"text": "This is for user - admin login failed as log reason - passwd_invalid, ui = ssh(10.48.48.131) log method - ssh from log srcip - 10.48.48.131 , msg - Administrator admin login failed from ssh(10.48.48.131) because of invalid password"}

auto_generate_generic_curl_request()-400: Generic automation CURL request Host header: hooks.slack.com
auto_generic_curl_request_close()-476: Generic CURL request response body from https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ok
Where does the HTTP body parameter come from:
 
 
 
 
Some old version such as v6.0.5 may show an HTTP 400 error, upgrade to at least v6.2.2.
Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT