Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x-pack/filebeat/input/o365audit: deprecate input #38922

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
*Filebeat*

- Deprecate `syslog` input in favor of `syslog` processor. {issue}37555[37555] {pull}38277[38277]
- Deprecate `o365audit` input in favor of `CEL` input. {issue}37719[37719] {pull}38922[38922]

*Heartbeat*

Expand Down
4 changes: 4 additions & 0 deletions x-pack/filebeat/docs/inputs/input-o365audit.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
[id="{beatname_lc}-input-{type}"]
=== Office 365 Management Activity API input

deprecated:[8.14.0]

The o365audit input is deprecated. Similar functionality can be achieved using the <<filebeat-input-cel,`CEL input`>> .

++++
<titleabbrev>Office 365 Management Activity API</titleabbrev>
++++
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/input/o365audit/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
return v2.Plugin{
Name: pluginName,
Stability: feature.Experimental,
Deprecated: false,
Deprecated: true,
Info: "O365 logs",
Doc: "Collect logs from O365 service",
Manager: &cursor.InputManager{
Expand Down Expand Up @@ -117,7 +117,7 @@
if err == nil {
break
}
if ctx.Cancelation.Err() != err && err != context.Canceled {

Check failure on line 120 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (windows)

comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)

Check failure on line 120 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (linux)

comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error (errorlint)
msg := mapstr.M{}
msg.Put("error.message", err.Error())
msg.Put("event.kind", "pipeline_error")
Expand All @@ -125,10 +125,10 @@
Timestamp: time.Now(),
Fields: msg,
}
publisher.Publish(event, nil)

Check failure on line 128 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value of `publisher.Publish` is not checked (errcheck)

Check failure on line 128 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (linux)

Error return value of `publisher.Publish` is not checked (errcheck)
ctx.Logger.Errorf("Input failed: %v", err)
ctx.Logger.Infof("Restarting in %v", inp.config.API.ErrorRetryInterval)
timed.Wait(ctx.Cancelation, inp.config.API.ErrorRetryInterval)

Check failure on line 131 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value of `timed.Wait` is not checked (errcheck)

Check failure on line 131 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (linux)

Error return value of `timed.Wait` is not checked (errcheck)
}
}
return nil
Expand Down Expand Up @@ -257,14 +257,14 @@
}
}
if env.Config.PreserveOriginalEvent {
b.PutValue("event.original", string(raw))

Check failure on line 260 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value of `b.PutValue` is not checked (errcheck)

Check failure on line 260 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (linux)

Error return value of `b.PutValue` is not checked (errcheck)
}
if len(errs) > 0 {
msgs := make([]string, len(errs))
for idx, e := range errs {
msgs[idx] = e.Error()
}
b.PutValue("error.message", msgs)

Check failure on line 267 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (windows)

Error return value of `b.PutValue` is not checked (errcheck)

Check failure on line 267 in x-pack/filebeat/input/o365audit/input.go

View workflow job for this annotation

GitHub Actions / lint (linux)

Error return value of `b.PutValue` is not checked (errcheck)
}
return b
}
Loading