[Fleet] api/fleet/agents returning 500 when component
field has format different than expected
#213423
Labels
bug
Fixes for quality problems that affect the customer experience
Team:Fleet
Team label for Observability Data Collection Fleet team
Kibana version:
8.16.2 and above
Describe the bug:
User in cloud has a job which exports agent statistics running this query:
Sometimes this fails with error
The error occurs here when the
components
field contains unexpected data.Fleet expects this field to always be an array having this format:
However in some cases it was observed to be missing or to be a string and this triggered the error:
One thing to investigate is why sometimes this field has a different content than expected, did it change something in Fleet Server or it's due to an error?
Steps to reproduce:
I'm not sure how to reproduce it the actual error, as it was observed in production.
However it can be forced locally by inserting some data with the invalid format in the fleet agents index.
Expected behavior:
Fleet should handle more gracefully this type of "invalid" documents instead of breaking the api response.
The text was updated successfully, but these errors were encountered: