elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
12.16k stars 4.91k forks source link

[Heartbeat] Write summary document when termination signal is received #41103

Open vigneshshanmugam opened 1 week ago

vigneshshanmugam commented 1 week ago

Describe the enhancement:

Find if there is a way to hook in to the Termination Signals in beats https://github.com/elastic/elastic-agent-libs/blob/d95aa61a0d89cbc5d30b8ba80928616e4a879827/service/service.go#L52 to write heartbeat/summary documents when a Browser Monitor run is missed.

The summary document heartbeat/summary should introduce a new monitor status skipped and the reason along with the error. The scope of this can be limited to just for run_once mode.

Describe a specific use case for the enhancement or feature:

Its pretty common for the Heartbeat container to get terminated when run as a Private Location or inside the hosted Synthetics infrastructure during upgrades or regular maintenance work.

elasticmachine commented 1 week ago

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)