-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
There are many Fleet integrations that rely on fail_on_template_error
to control the flow of execution. For example rapid7_insightvm.asset uses fail_on_template_error: true
to stop the paginated calls when page token is empty.
See: https://github.com/elastic/integrations/blob/1a9b422d2da21d060d167eead02ee0fa6405fbca/packages/rapid7_insightvm/data_stream/asset/agent/stream/httpjson.yml.hbs#L40-L44
This raised an issue after addition of Fleet health status updates in the httpjson input. CI runs are failing due to failures in system tests.
For example rapid7_insightvm.asset fails in CI with error message:
test case failed: one or more errors found while examining elastic-agent.logs3454491136: [0] found error "Unit state changed httpjson-default-httpjson-rapid7_insightvm-8b98e88b-6def-4afe-8ae5-5421b0e8d649 (HEALTHY->DEGRADED): failed to execute template cursor: the template result is empty"
The update in Fleet status should be done conditionally based on value of do_not_log_failure
parameter. If it is set to true the status should not be updated to degraded.
There is a similar PR that allows empty cursor template values to be ignored by health status update.
Related Issues:
- [LogsDB] [Subscription basic] [rapid7_insightvm] Failing test daily: system test: (elastic-agent logs - default) in rapid7_insightvm.asset integrations#14330
- [Subscription basic] [rapid7_insightvm] Failing test daily: system test: (elastic-agent logs - default) in rapid7_insightvm.asset integrations#14301