collect traefik access logs
remove forgejo access logs
This commit is contained in:
parent
44e3bd6729
commit
833b1a2b5e
4 changed files with 13 additions and 5 deletions
|
@ -26,10 +26,10 @@ datasources:
|
||||||
index: 'fluentd.diskfree-*'
|
index: 'fluentd.diskfree-*'
|
||||||
timeField: '@timestamp'
|
timeField: '@timestamp'
|
||||||
|
|
||||||
- name: forgejo_access
|
- name: traefik_access
|
||||||
type: elasticsearch
|
type: elasticsearch
|
||||||
access: proxy
|
access: proxy
|
||||||
url: http://maestro.dmz:{{ elasticsearch_port }}
|
url: http://maestro.dmz:{{ elasticsearch_port }}
|
||||||
jsonData:
|
jsonData:
|
||||||
index: 'fluentd.docker.forgejo_forgejo.**'
|
index: 'fluentd.access.traefik-*'
|
||||||
timeField: '@timestamp'
|
timeField: '@timestamp'
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
port {{ fluent_forward_port }}
|
port {{ fluent_forward_port }}
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
<filter docker.forgejo_forgejo.**>
|
<filter access.**>
|
||||||
@type geoip
|
@type geoip
|
||||||
geoip_lookup_keys host
|
geoip_lookup_keys host
|
||||||
backend_library geoip2_c
|
backend_library geoip2_c
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
skip_adding_null_record true
|
skip_adding_null_record true
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<match cpu memory diskfree docker.forgejo_forgejo.**>
|
<match cpu memory diskfree access.**>
|
||||||
@type elasticsearch
|
@type elasticsearch
|
||||||
host maestro.dmz
|
host maestro.dmz
|
||||||
port {{ elasticsearch_port }}
|
port {{ elasticsearch_port }}
|
||||||
|
|
|
@ -125,3 +125,11 @@ services:
|
||||||
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
|
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
|
||||||
|
|
||||||
- --serversTransport.insecureSkipVerify=true
|
- --serversTransport.insecureSkipVerify=true
|
||||||
|
|
||||||
|
- --accesslog=true
|
||||||
|
- --accesslog.fields.defaultmode=keep
|
||||||
|
- --accesslog.fields.names.ClientUsername=drop
|
||||||
|
- --accesslog.fields.headers.defaultmode=keep
|
||||||
|
- --accesslog.fields.headers.names.User-Agent=keep
|
||||||
|
- --accesslog.fields.headers.names.Authorization=drop
|
||||||
|
- --accesslog.fields.headers.names.Content-Type=keep
|
||||||
|
|
|
@ -52,7 +52,7 @@ resource "elasticstack_elasticsearch_index_template" "logs_template" {
|
||||||
name = "logs_template"
|
name = "logs_template"
|
||||||
|
|
||||||
priority = 42
|
priority = 42
|
||||||
index_patterns = ["fluentd.docker.**"]
|
index_patterns = ["fluentd.access.**"]
|
||||||
|
|
||||||
template {
|
template {
|
||||||
settings = jsonencode({
|
settings = jsonencode({
|
||||||
|
|
Reference in a new issue