Description | This article describes how to create an automation stitch admin user login and logout. |
Scope | FortiGate v6.4 and above. |
Solution |
FortiGate creates a log when an Admin user login and logout the fortiGate.
Login event:
date=2023-05-22 time=13:17:26 eventtime=1684754246523091187 tz="+0200" logid="0100032001" type="event" subtype="system" level="information" vd="root" logdesc="Admin login successful" sn="1684754246" user="admin" ui="https(10.32.22.111)" method="https" srcip=10.32.22.111 dstip=10.40.19.15 action="login" status="success" reason="none" profile="super_admin" msg="Administrator admin logged in successfully from https(10.32.22.111)"
Logout event:
date=2023-05-22 time=13:18:34 eventtime=1684754314759921964 tz="+0200" logid="0100032003" type="event" subtype="system" level="information" vd="root" logdesc="Admin logout successful" sn="1684754246" user="admin" ui="https(10.32.22.111)" method="https" srcip=10.32.22.111
For monitoring and documentation, it is possible to create a automation in the FortiGate to send the alert mail when an admin user login and logout of the FortiGate.
To create an automation stitch, check the following steps:
Configure the email server in FortiGate.
From GUI:
Go to System -> Setting -> Email Service.
It is possible to use the default setting with notification.fortinet.net as an email server or Use custom settings.
From CLI:
config system email-server
Configure automation:
Navigate to Security Fabric -> Automation -> Under Stitch tab Create New:
For v7.4.x versions and above:
Navigate to Security Fabric -> Automation -> Trigger tab -> Create New:
Then go to Security Fabric -> Automation -> Action tab -> Create New:
Configure the stitch under Security Fabric -> Automation -> Stitch tab -> Create New:
From CLI: Automation Stitch.
config system automation-stitch
Automation trigger.
config system automation-trigger
Automation action.
config system automation-action
Result : When the user logs in and logs out of the firewall, the alert mail with the log will be sent.
noreply@notification.fortinet.net FGT[FGVM010000017397] Automation Stitch:Admin_login is triggered.
FGT[FGVM010000017397] Automation Stitch:Admin_logout is triggered. |