Page MenuHomePhabricator

Ensure that shell script errors appear in Logstash in ECS format
Open, Needs TriagePublic

Description

This appears in container logs:

{"log.level":"info","@timestamp":"2024-01-17T14:07:13.005Z","process.pid":71,"host.hostname":"ipoid-production-daily-updates-28424828-t4pc8","ecs.version":"8.10.0","message":"Joining and sorting unique files..."}
sort: cannot read: '/tmp/ipoid/chunk*': No such file or directory

but the sort error does not make it to Logstash in a structured message; we need to use trap probably to catch errors and emit in ECS format, then rethrow the error.

Event Timeline