add forgejo access logs and geo ip enrichment

This commit is contained in:
Pim Kunis 2023-08-25 14:40:47 +02:00
parent 59db3b2fb7
commit 44e3bd6729
3 changed files with 20 additions and 1 deletions

View file

@ -122,7 +122,7 @@ services:
- BAUTH_PASS=test
fluentd:
image: git.kun.is/pim/fluentd:1.0.2
image: git.kun.is/pim/fluentd:1.0.3
depends_on:
- elasticsearch
ports:

View file

@ -25,3 +25,11 @@ datasources:
jsonData:
index: 'fluentd.diskfree-*'
timeField: '@timestamp'
- name: forgejo_access
type: elasticsearch
access: proxy
url: http://maestro.dmz:{{ elasticsearch_port }}
jsonData:
index: 'fluentd.docker.forgejo_forgejo.**'
timeField: '@timestamp'

View file

@ -6,6 +6,17 @@
port {{ fluent_forward_port }}
</source>
<filter docker.forgejo_forgejo.**>
@type geoip
geoip_lookup_keys host
backend_library geoip2_c
<record>
latitude ${location.latitude["host"]}
longitude ${location.longitude["host"]}
</record>
skip_adding_null_record true
</filter>
<match cpu memory diskfree docker.forgejo_forgejo.**>
@type elasticsearch
host maestro.dmz