Access Log:
172.16.4.86 - - [04/Jun/2022:07:58:38 +0000] "GET / HTTP/2.0" 301 280 "-" "curl"
Query in Grafana / Loki:
{job="prod/nginx"} |= "GET / "
| regexp `(?P<ip>\S+) (?P<identd>\S+) (?P<user>\S+) \[(?P<timestamp>[\w:\/]+\s[+\\-]\d{4})\] "(?P<action>\S+)\s?(?P<path>\S+)\s?(?P<protocol>\S+)?" (?P<status>\d{3}|-) (?P<size>\d+|-)\s?"?(?P<referrer>[^\"]*)"?\s?"?(?P<useragent>[^\"]*)?"?`
More examples:
References: