Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x-pack/filebeat/input/cel: improve missing events error value (#40580)
CEL programs used in the CEL input are specific to return an object that includes an array. This is tested for, but currently the check is indirect and only shows that the type is not expected, rather than a more informative message that the events array is missing. This changes that so that when no events field is present, an error is returned directly. This will flow on to a status update in the handling of the returned error by the input Run method, alerting the user more promptly to the cause. Since a CEL input program is not valid if it returns no events field, a hard error (fleet status failed rather than degraded) seems appropriate.
- Loading branch information