Skip to content

Add logs that give more information about why agent is shutting down #1358

@joshdover

Description

@joshdover

Agent's shutdown sequence can be triggered by several different events, but our log messages don't indicate why the agent has decided to shutdown. This happens here:

logger.Info("Shutting down Elastic Agent and sending last events...")

This can be an issue when debugging agent problems in the wild with customers where we have limited insight into the host running the software. We should add better logging to indicate why the agent has decided to shutdown (eg. which signal was received, etc.).

On Windows in particular we need to log when Windows service control events are received along with the signals the agent is handling.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions