I’m trying to group logs from a source so I can filter them in or out in DataDog logs.
There is already a grok parser that formats the messages, but how can I add a tag to them?
DataDog seem to use a subset of LogStash grok parsing rules: https://docs.datadoghq.com/logs/processing/processors/
Eg from Heroku:
source=worker.1 dyno=heroku.152688202.1b2da7cb-291c-43ea-b5ee-bf9388bc5c6a
sample#load_avg_1m=0.06 sample#load_avg_5m=0.14 sample#load_avg_15m=0.09
as
{ source { worker: 1 }...
What I'd like is to add something like a type
, so I know they are not from the app, eg
{ type: 'metrics', source { worker: 1 }...
Then I guess I could add the same thing to app logs and add type: 'app'
to them.
question from:
https://stackoverflow.com/questions/65829133/how-to-tag-label-filter-datadog-logs 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…