Elastic Agent shouldn't log httpjson pagination completion as an error

I think this is a bug, but seeking confirmation here before I raise it on github.

I am also not sure if this should be raised against Elastic Agent or the integration.

The Cisco Secure Endpoint integration 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"

I believe you can see the fail condition prompting this 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

However, I assume this is expected behavior when reaching the last page of a response, and shouldn't present as an error in Elastic Agent on each run of the integration?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.