mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-07 01:28:48 +02:00
23 lines
522 B
Plaintext
23 lines
522 B
Plaintext
![]() |
---
|
||
|
|
||
|
sources:
|
||
|
in_logs_nginx:
|
||
|
type: file
|
||
|
include:
|
||
|
- /var/log/nginx/access.log
|
||
|
- /var/log/nginx/error.log
|
||
|
|
||
|
transforms:
|
||
|
format_logs_nginx:
|
||
|
type: remap
|
||
|
inputs:
|
||
|
- in_logs_nginx
|
||
|
source: |
|
||
|
if (.file == "/var/log/nginx/access.log"){
|
||
|
.http = parse_grok!(.message, "%{HOSTNAME:host} %{HTTPD_COMBINEDLOG}")
|
||
|
} else if (.file == "/var/log/nginx/error.log"){
|
||
|
.http = parse_nginx_log!(.message, format:"error")
|
||
|
}
|
||
|
.service = "nginx"
|
||
|
.group = "web"
|