Hello,
I’m using flog to generate this kind of events:
“{“host”:“138.130.28.48”, “user-identifier”:”-", “datetime”:“25/Apr/2022:16:32:50 +0000”, “method”: “DELETE”, “request”: “/expedite”, “protocol”:“HTTP/1.0”, “status”:403, “bytes”:17719, “referer”: "https://www.dynamicproactive.name/models/relationships/expedite/vertical"}"
"{“host”:“236.116.30.89”, “user-identifier”:“kihn7123”, “datetime”:“25/Apr/2022:16:32:50 +0000”, “method”: “POST”, “request”: “/synergize/revolutionize/incentivize”, “protocol”:“HTTP/1.0”, “status”:301, “bytes”:3488, “referer”: “http://www.futurecross-media.com/infrastructures/applications”}
"
I’m using grafana loki with promtail to index events with this config:
`clients:
-
url: http://loki:3100/loki/api/v1/push
scrape_configs: -
job_name: flog
static_configs:- targets:
- localhost
labels:
job: flogs
check: test4
path: /tmp/log/*.log
- localhost
pipeline_stages:
- json:
expressions:
datetime: datetime
method: method
host: host
status: status
bytes: bytes
referer: referer
`
- targets:
The problem is that no field selected in the configuration is parsed.
Do you see any mistake in the configuration?
Thanks