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/cel: enhance error status reporting in error conditions #40083

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Jul 3, 2024

Proposed commit message

We currently update the input status for single object events, but the error message held by the event is not reported via the UI. We have that value available, so use it to report the error, but do not include any other parts of the state as it may leak secrets.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@efd6 efd6 added enhancement Filebeat Filebeat backport-skip Skip notification from the automated backport with mergify Team:Security-Service Integrations Security Service Integrations Team labels Jul 3, 2024
@efd6 efd6 self-assigned this Jul 3, 2024
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 3, 2024
…nditions

We currently update the input status for single object events, but the error
message held by the event is not reported via the UI. We have that value
available, so use it to report the error, but do not include any other parts
of the state as it may leak secrets.
@efd6 efd6 marked this pull request as ready for review July 3, 2024 03:43
@efd6 efd6 requested a review from a team as a code owner July 3, 2024 03:43
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

Copy link
Contributor

@ShourieG ShourieG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@efd6 efd6 merged commit 8d1d59c into elastic:main Jul 3, 2024
16 of 19 checks passed
@@ -134,7 +134,7 @@ After completion of a program's execution it should return a single object with
----

<1> The `events` field must be present, but may be empty or null. If it is not empty, it must only have objects as elements.
The field should be an array, but in the case of an error condition in the CEL program it is acceptable to return a single object instead of an array; this will will be wrapped as an array for publication and an error will be logged.
The field should be an array, but in the case of an error condition in the CEL program it is acceptable to return a single object instead of an array; this will will be wrapped as an array for publication and an error will be logged. If the single object contains a key, "error", the error value will be used to update the status of the input to report to Elastic Agent. This can be used to more rapidly respond to API failures.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify enhancement Filebeat Filebeat Team:Security-Service Integrations Security Service Integrations Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants