- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Help with custom report
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
`status` field was changed to `action` after FAZ 5.0.7.
For FOS 5.0 log, please query traffic log use utmaction!='blocked' for allowed traffic
For FOS 5.2&4.3 log, please query webfilter log and use action!='blocked' for allowed traffic
To generate a report based on the blocked URL's and source user, please try:
select hostname, user_src, sum(requests) as requests from (###(select hostname, coalesce(nullifna(`user`), ipstr(`srcip`)) as user_src, count(*) as requests from $log-traffic where $filter and logid_to_int(logid) not in (4, 7, 14) and utmevent in ('webfilter', 'banned-word', 'web-content', 'command-block', 'script-filter') and hostname is not null and utmaction='blocked' group by hostname, user_src order by requests desc)### union all ###(select hostname, coalesce(nullifna(`user`), ipstr(`srcip`)) as user_src, count(*) as requests from $log-webfilter where $filter and (eventtype is null or logver = 52) and action='blocked' group by hostname, user_src order by requests desc)###) t group by hostname, user_src order by requests desc
This dataset should work for 4.3,5.0&5.2 log
Regards,
hz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AtiT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ORIGINAL: AtiT SELECT TO_TIMESTAMP(`itime`)::timestamp AS time, TO_CHAR((`duration` || ' second' )::interval, ' HH24:MI:SS' ) AS dur, COALESCE(NULLIFNA(`user`), `srcip`) AS user_src, COALESCE(`app`,' Unknown Application' ) AS apl, COALESCE(`appcat`,' Unknown Category' ) AS apc, SUM(COALESCE(`sentbyte`, 0)+COALESCE(`rcvdbyte`, 0)) AS bandwidth FROM $log WHERE $filter AND `status` IN (' accept' ,' close' ) AND `utmaction`=' passthrough' GROUP BY time, dur, user_src, apl, apc HAVING SUM(COALESCE(`sentbyte`, 0)+COALESCE(`rcvdbyte`, 0))>0 ORDER BY bandwidth DESCI copied your syntax line per line but when I tried to test it I got this result.See attached file

Fortigate Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AtiT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortigate Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-- Mathieu Nantel Systems Engineer / Conseiller Technique - Fortinet Montreal, QC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortigate Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
####################################################################################### # Timestamp # User # App # Hostname # Bandwidth # ####################################################################################### | 2014/02/20 11:55:00 | MAT | Youtube.HD | youtube.com | 56 MB | ——————————————————————————————————————————————————————————————————————————————————————— | 2014/02/20 09:55:00 | MAT | BitTorrent | N/A | 45 MB | ——————————————————————————————————————————————————————————————————————————————————————— | 2014/02/20 10:55:00 | MAT | Youtube.HD | youtube.com | 35 MB | ——————————————————————————————————————————————————————————————————————————————————————— | 2014/02/20 08:55:00 | MAT | BitTorrent | N/A | 24 MB | ———————————————————————————————————————————————————————————————————————————————————————This is sorted reversed by the bandwidth transferred. Is that what you want? If so, how many records do you need?
-- Mathieu Nantel Systems Engineer / Conseiller Technique - Fortinet Montreal, QC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortigate Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-- Mathieu Nantel Systems Engineer / Conseiller Technique - Fortinet Montreal, QC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
