Enhance traefik integration to also handle JSON-formatted access logs#770
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
9d567da to
4538ac7
Compare
|
@mtojek I could use a second pair of eyes on why the system tests are failing for this PR. The symptom is that no documents can be found in the data stream: I am able to reproduce this locally. While the system test is still running, I checked that the Elastic Agent container has the log files mounted as expected: I also checked the policy in the Fleet UI and it looks right too: I also checked that the ingest pipelines are loaded as expected: {
"logs-traefik.access-0.0.1" : { ... },
"logs-traefik.access-0.0.1-format-json" : { ... },
"logs-traefik.access-0.0.1-format-common" : { ... }
}Note that pipeline tests are passing. |
|
I looked into filebeat's logs and found this one (file: |
|
Thanks for looking into it, @mtojek, appreciate it! |
andrewkroh
left a comment
There was a problem hiding this comment.
Thanks for adding the JSON support.
There was a problem hiding this comment.
I recommend adding allow_duplicates: false to the append processors for "related" fields.
There was a problem hiding this comment.
Just curious, why not do this for all append processors, e.g. the ones for event.category or event.type?
There was a problem hiding this comment.
Yes, in most cases it probably makes sense to deduplicate the append.
There was a problem hiding this comment.
It appears we have all the fields populated to support the community_id processor. Can you add that in?
edit: We'd need to set a static network.transport: tcp to make it work. But I think this makes sense for an http proxy.
There was a problem hiding this comment.
RequestAddr looks like it could be used to populate url.domain.
1e2f800 to
deb8179
Compare
What does this PR do?
This PR enhances the
traefikintegration to parse JSON-formatted access logs. Prior to this PR thetraefikintegration could only parse commonlog-formatted access logs.Checklist
changelog.ymlfile.Related issues