Created on
02-11-2024
06:09 AM
Edited on
02-12-2025
10:07 PM
By
Anthony_E
This article describes creating a report to track VPN users' connection and disconnection times.
User |
VPN Status |
Time |
User a |
Connected |
2024-01-30 04:36 |
User a |
Disconnected |
2024-01-30 15:02 |
User b |
Connected |
2024-01-29 04:46 |
User b |
Disconnected |
2024-01-29 07:09 |
FortiAnalyzer.
SELECT
`user` AS "User",
(
CASE
WHEN `action` = 'tunnel-up' THEN 'Connected'
ELSE 'Disconnected'
END
) AS "VPN Status",
$calendar_time(itime) AS `Time Stamp`
FROM
$log
WHERE
$filter
AND (
(`action` = 'tunnel-up')
OR (`action` = 'tunnel-down')
)
GROUP BY
`Time Stamp`,
`action`,
`user`
ORDER BY
`user`,
`Time Stamp`
Related articles:
Technical Tip: How to create FortiAnalyzer reports using custom SQL queries
Technical Tip: How to monitor the remote VPN users’ working hours
Technical Tip: Create a custom report using Chart Builder Tool from Log View
Creating a Custom report from FortiView (Export to Report Chart)
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.