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

Elastic Agent shouldn't log httpjson pagination completion as an Agent Error #38291

Closed
agmic opened this issue Feb 22, 2024 · 2 comments · Fixed by #39929
Closed

Elastic Agent shouldn't log httpjson pagination completion as an Agent Error #38291

agmic opened this issue Feb 22, 2024 · 2 comments · Fixed by #39929
Assignees
Labels
bug Team:Security-Service Integrations Security Service Integrations Team

Comments

@agmic
Copy link

agmic commented Feb 22, 2024

I am not sure if this should be raised against Elastic Agent or the integration. Raising it here, but please move as necessary.

The Cisco Secure Endpoint integration (v2.24.2) collects event data via httpjson. The integration throws an error when it hits the last page, and this gets logged in the Elastic Agent error log with something similar to:
error processing response: template: :1:17: executing "" at <.last_response.body.metadata.links.next>: map has no entry for key "next"
This fills up the Elastic Agent dashboard with agent errors, as it is raised every time the Secure Endpoint data is polled (every 2 minutes/default) and the noise makes it more difficult to find actual errors.

I believe that this is occurring because fail_on_template_error is set to true.

The fail condition prompting this is at
integrations/packages/cisco_secure_endpoint/data_stream/event/agent/stream/httpjson.yml.hbs at main · elastic/integrations (github.com) line 36-40

response.pagination:
- set:
    target: url.value
    value: '[[ .last_response.body.metadata.links.next ]]'
    fail_on_template_error: true

I'm not sure how this should be fixed, because AIUI fail_on_template_error: true is the recommended configuration for pagination, but raising an error should maybe be reconsidered?

For confirmed bugs, please report:

@agmic agmic added the bug label Feb 22, 2024
@cmacknz cmacknz transferred this issue from elastic/elastic-agent Feb 22, 2024
@cmacknz cmacknz added the Team:Security-Service Integrations Security Service Integrations Team label Feb 22, 2024
@elasticmachine
Copy link
Collaborator

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

@efd6 efd6 transferred this issue from elastic/integrations Mar 13, 2024
@efd6
Copy link
Contributor

efd6 commented Mar 13, 2024

Related to #34544.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:Security-Service Integrations Security Service Integrations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants