Skip to content

Commit

Permalink
[Filebeat] change httpjson logging (elastic#23972)
Browse files Browse the repository at this point in the history
- change "source" key to "input_source"
- change "url" key to "input_url"
- "source" and "url" were conflicting with ECS fields
  • Loading branch information
leehinman authored Feb 11, 2021
1 parent 1c10a1c commit 7b6f338
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Use rfc6587 framing for fortinet firewall and clientendpoint filesets when transferring over tcp. {pull}23837[23837]
- Fix goroutines leak with some inputs in autodiscover. {pull}23722[23722]
- Fix various processing errors in the Suricata module. {pull}23236[23236]
- Fix httpjson input logging so it doesn't conflict with ECS. {pull}23972[23972]

*Heartbeat*

Expand Down
2 changes: 1 addition & 1 deletion filebeat/input/v2/input-cursor/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (inp *managedInput) Run(
// refine per worker context
inpCtx := ctx
inpCtx.ID = ctx.ID + "::" + source.Name()
inpCtx.Logger = ctx.Logger.With("source", source.Name())
inpCtx.Logger = ctx.Logger.With("input_source", source.Name())

if err = inp.runSource(inpCtx, inp.manager.store, source, pipeline); err != nil {
cancel()
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/httpjson/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func run(
publisher cursor.Publisher,
cursor *cursor.Cursor,
) error {
log := ctx.Logger.With("url", config.URL)
log := ctx.Logger.With("input_url", config.URL)

stdCtx := ctxtool.FromCanceller(ctx.Cancelation)

Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/httpjson/internal/v2/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func run(
publisher inputcursor.Publisher,
cursor *inputcursor.Cursor,
) error {
log := ctx.Logger.With("url", config.Request.URL)
log := ctx.Logger.With("input_url", config.Request.URL)

stdCtx := ctxtool.FromCanceller(ctx.Cancelation)

Expand Down

0 comments on commit 7b6f338

Please sign in to comment.