FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate.
smkml
Staff
Staff
Article Id 373682
Description

 

This article describes how to send an alert to Telegram application using a webhook from FortiWeb.

 

fwb webhook.png

Scope

 

FortiWeb, Telegram.

 

Solution

 

  1. Create a Telegram bot and get a Bot Token.

get bot token.png

  1. Create a Telegram group and add a bot created initially into the group. Take note of the group ID, for this example web.telegram.org/k/#-4703356725.

telegram group.png

 

telegram group id.png

 

  1. Create a webhook Automation Action in FortiWeb, go to Security Fabric -> Automation -> Action -> Create New -> General -> Webhook.

create a webhook in fwb.png

Fill up the attributes as in the following format (for this example):

 

Name fwb_telegram
Protocol HTTPS
URL api.telegram.org/bot<Bot Token>/sendMessage
Method POST
HTTP Body {"chat_id":"<Group ID>","text": "Failed to logged in, here is the full event log: %%log%%"}
HTTP Header Content-Type:application/json

  1. Create a Stitch that will trigger the action to send the logs to Telegram. Go to Security Fabric -> Automation -> Stich -> Create New.

create a stich in fwb.png

 

Make sure the Triggers are chosen correctly to select the correct logs to trigger with.

Security Fabric -> Automation -> Trigger -> Create New.

 

create a cutom trigger in fwb.png

  1. Trigger the event and observed the logs in Event Logs and alert sent to Telegram.

fwb event log.png

 

alert send to telegram.png

 

Related articles:

Contributors