collect traefik access logs

don't collect forgejo access logs
This commit is contained in:
Pim Kunis 2023-08-25 19:54:35 +02:00
parent 43145f8148
commit c4ecfa437d
3 changed files with 14 additions and 5 deletions

View file

@ -129,14 +129,15 @@
{% if 'swarm' in group_names %} {% if 'swarm' in group_names %}
[FILTER] [FILTER]
Name parser Name parser
Match docker.forgejo_forgejo.** Match docker.traefik_traefik.**
Key_Name log Key_Name log
Parser combinedlog Parser traefiklog
[FILTER] [FILTER]
Name grep Name rewrite_tag
Match docker.forgejo_forgejo.** Match docker.traefik_traefik.**
Regex host .* Rule $host .* access.traefik false
Emitter_Name traefik_access_emitter
{% endif %} {% endif %}
[FILTER] [FILTER]

View file

@ -18,3 +18,11 @@
Types host:string ident:string authuser:string request:string status:integer size:integer referer:string useragent:string Types host:string ident:string authuser:string request:string status:integer size:integer referer:string useragent:string
Time_Key date Time_Key date
Time_Format %d/%b/%Y:%H:%M:%S %z Time_Format %d/%b/%Y:%H:%M:%S %z
[PARSER]
Name traefiklog
Format regex
Regex ^(?<host>\S+) (?<ident>\S+) (?<authuser>\S+) \[(?<date>[^\]]+)\] "(?<request>\S+ .+ HTTP\/\d\.\d)" (?<status>\S+) (?<size>\S+) "(?<referer>[^"]*)" "(?<useragent>[^"]*)" (?<requests>\d+) "(?<router>\S+)" "(?<serverurl>\S+)" (?<duration>\d+)ms
Types host:string ident:string authuser:string request:string status:integer size:integer referer:string useragent:string requests:integer router:string serverurl:string duration:integer
Time_Key date
Time_Format %d/%b/%Y:%H:%M:%S %z