collect docker logs
This commit is contained in:
parent
6546fc8fb7
commit
64594da273
3 changed files with 59 additions and 24 deletions
|
@ -1,6 +1,4 @@
|
|||
all:
|
||||
children:
|
||||
hypervisors:
|
||||
hypervisors:
|
||||
hosts:
|
||||
atlas:
|
||||
ansible_host: atlas.hyp
|
||||
|
@ -8,7 +6,8 @@ all:
|
|||
ansible_host: jefke.hyp
|
||||
lewis:
|
||||
ansible_host: lewis.hyp
|
||||
vms:
|
||||
|
||||
swarm:
|
||||
hosts:
|
||||
maestro:
|
||||
ansible_host: maestro.dmz
|
||||
|
@ -16,11 +15,19 @@ all:
|
|||
ansible_host: bancomart.dmz
|
||||
handjecontantje:
|
||||
ansible_host: handjecontantje.dmz
|
||||
|
||||
vms:
|
||||
children:
|
||||
swarm:
|
||||
hosts:
|
||||
concourse:
|
||||
ansible_host: concourse.dmz
|
||||
thecloud:
|
||||
ansible_host: thecloud.dmz
|
||||
nextcloud:
|
||||
ansible_host: nextcloud.dmz
|
||||
hermes:
|
||||
ansible_host: hermes.dmz
|
||||
|
||||
all:
|
||||
children:
|
||||
hypervisors:
|
||||
vms:
|
||||
|
|
|
@ -82,6 +82,13 @@
|
|||
#
|
||||
# storage.backlog.mem_limit 5M
|
||||
|
||||
{% if 'swarm' in group_names %}
|
||||
[INPUT]
|
||||
Name forward
|
||||
Listen 0.0.0.0
|
||||
Port 22222
|
||||
{% endif %}
|
||||
|
||||
[INPUT]
|
||||
Name cpu
|
||||
Tag cpu
|
||||
|
@ -103,7 +110,7 @@
|
|||
|
||||
[OUTPUT]
|
||||
Name forward
|
||||
Match *
|
||||
Match **
|
||||
Host maestro.dmz
|
||||
Port {{ fluent_forward_port }}
|
||||
|
||||
|
@ -119,9 +126,22 @@
|
|||
Key_Name exec
|
||||
Parser diskfree
|
||||
|
||||
{% if 'swarm' in group_names %}
|
||||
[FILTER]
|
||||
Name parser
|
||||
Match docker.forgejo_forgejo.**
|
||||
Key_Name log
|
||||
Parser combinedlog
|
||||
|
||||
[FILTER]
|
||||
Name grep
|
||||
Match docker.forgejo_forgejo.**
|
||||
Regex host .*
|
||||
{% endif %}
|
||||
|
||||
[FILTER]
|
||||
Name record_modifier
|
||||
Match *
|
||||
Match **
|
||||
Record hostname ${HOSTNAME}
|
||||
|
||||
[FILTER]
|
||||
|
|
|
@ -10,3 +10,11 @@
|
|||
Format regex
|
||||
Regex ^\S+\s+\d+\s+(?<disk_used>\d+)\s+(?<disk_available>\d+)\s+(?<disk_percentage>\d+)%\s+(?<disk_mount>\S+)
|
||||
Types disk_used:integer disk_available:integer disk_percentage:integer disk_mount:string
|
||||
|
||||
[PARSER]
|
||||
Name combinedlog
|
||||
Format regex
|
||||
Regex ^(?<host>\S+)\ (?<ident>\S+)\ (?<authuser>\S+)\ \[(?<date>[^\]]+)\]\ \"(?<request>\S+\ .+ HTTP\/\d\.\d)\"\ (?<status>\S+)\ (?<size>\S+)\ \"(?<referer>[^\"]*)\" \"(?<useragent>[^\"]*)\"
|
||||
Types host:string ident:string authuser:string request:string status:integer size:integer referer:string useragent:string
|
||||
Time_Key date
|
||||
Time_Format %d/%b/%Y:%H:%M:%S %z
|
||||
|
|
Reference in a new issue