Hello,
I'm using a FAZ VM64 that collec data from 5 FortiGate (F81E, F100D and F80E) and I'd like to create a custom dataset to receive daily a summary report of SSL events (connect/disconnect time, user, source @IP, DHCP IP attributed, ...)
When testing the SQL query in the "Edit Dataset", I got something strange (or I don't understand) :
Whis this query :
select $flex_timestamp as timestamp, * from $log where $filter and subtype='vpn' and tunneltype like 'ssl%' and action in ('tunnel-up', 'tunnel-stats', 'tunnel-down') and tunnelid is not null order by timestamp desc
I got a field "user" that fill my need (contain correct values). But if I change the query to reduce number of fields like this:
select $flex_timestamp as timestamp, action, msg, logdesc, user, tunneltype, remip, tunnelip, duration, sentbyte, rcvdbyte, reason from $log where $filter and subtype='vpn' and tunneltype like 'ssl%' and action in ('tunnel-up', 'tunnel-stats', 'tunnel-down') and tunnelid is not null order by timestamp desc
The field "user" is renamed in "current_user" and the content is always "postgres"
So when selecting fields, how to get "user" and correct values ?
try `user`
Thanks, these 2 quotes solved my problem.
Is it because user is a reserved keyword and it should to "escaped" in the query ?
If so, I haven't seen this explaination in "Dataset Reference Guide" and in "FortiOS Log Reference".
Where is it explained ?
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1742 | |
1110 | |
758 | |
447 | |
240 |
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.