Skip to main content
jjg
New Member
November 20, 2025
Question

FAZ specific query

  • November 20, 2025
  • 2 replies
  • 332 views

Hi all,

 

FAZ 7.6.4

 

I need some help trying to write a very specific query and I'm struggling.  It needs to be able to Union All so that I can read from the VPN logs and the Traffic logs to be able to then collate the information and produce a table.

 

Here's what I need to be able to do.

 

  1. I need to be able to detect a users source country when coming in on the SSL VPN
  2. I then need to be able to see if a user connected to an ip address say 192.168.1.1
  3. I then need to be able to list it by user rather than srcip
  4. Filter out everything else

Can this even be done?

 

SELECT
user,
srcip,
srccountry
FROM
$log-event
WHERE
$filter
AND subtype = 'vpn'
AND srccountry != 'United Kingdom'
AND srccountry != 'Reserved'
GROUP BY
user, srcip, srccountry

UNION ALL

SELECT
user,
dstip AS srcip,
srccountry
FROM
$log-traffic
WHERE
$filter
AND dstip = '192.168.1.1'
GROUP BY
user, dstip, srccountry

ORDER BY
srcip

2 replies

jjg
jjgAuthor
New Member
November 21, 2025

OK,

I'm getting somewhere, the blow validates fine in the dataset but when I run a report I get Report generation failed.

 

SELECT
srccountry,
user,
dstip
FROM (
/* From traffic logs */
SELECT
srccountry,
user,
dstip
FROM
$log-traffic
WHERE
$filter
AND dstip = '10.160.1.217'
GROUP BY
srccountry, user, dstip

UNION ALL

/* From event logs */
SELECT
srccountry,
user,
remip AS dstip
FROM
$log-event
WHERE
$filter
AND subtype = 'vpn'
GROUP BY
srccountry, user, remip
) t
GROUP BY
srccountry, user, dstip
ORDER BY
srccountry

farhanahmed
Staff
Staff
November 29, 2025

Hi,

 

In Reports > Generated Report, right-click the report and select Retrieve Diagnostic.
This should have some info on why the report is failing.

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.