Log filtering User-Agent


#1

Hello,

I’m new to fastly’s world and it’s community forum, so excuse me if my question is a duplicate ( but I tried searching for it and didn’t find something helpful ).

So I’ve set up the logging system for one service, the log format that I use, is the above:
%t : %{client.geo.country_code}V : %h : %{Fastly-Orig-Host}i %{User-Agent}i : “%{req.url}V” : %>s : %D

All good till now, but I need to filter this log result, so I can get only the logs that has “Android” in the field for User-Agent.

Thank you in advance,
Endri Meto


#2

The answer is:
You attach a condition that states:
IF nameOfCondition
Value: (req.http.User-Agent ~ “[aA]ndroid”)

Problem solved from fastly’s support team!