Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watcher logs messages are incorrectly formatted #4444

Open
blakerouse opened this issue Mar 20, 2024 · 4 comments
Open

Watcher logs messages are incorrectly formatted #4444

blakerouse opened this issue Mar 20, 2024 · 4 comments
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team

Comments

@blakerouse
Copy link
Contributor

The following log messages are incorrectly formatted:

{"log.level":"info","@timestamp":"2024-03-19T23:57:51.201Z","log.origin":{"file.name":"upgrade/upgrade.go","file.line":348},"message":"waiting up to %s for upgrade watcher to set %s state in upgrade marker30sUPG_WATCHING","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2024-03-19T23:57:51.436Z","log.origin":{"file.name":"upgrade/upgrade.go","file.line":355},"message":"upgrade watcher set %s state in upgrade marker: exiting wait loopUPG_WATCHING","log":{"source":"elastic-agent"},"ecs.version":"1.6.0"}

For confirmed bugs, please report:

  • Version: Unknown
  • Operating System: All?
@blakerouse blakerouse added bug Something isn't working Team:Elastic-Agent Label for the Agent team labels Mar 20, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@blakerouse
Copy link
Contributor Author

Another log message that looks broken:

{"log.level":"error","@timestamp":"2024-03-20T00:00:21.471Z","log.origin":{"file.name":"cmd/watch.go","file.line":117},"message":"Error detected, proceeding to rollback: %vfailed to connect to agent daemon '5' times in a row","ecs.version":"1.6.0"}

@blakerouse
Copy link
Contributor Author

Another:

{"log.level":"error","@timestamp":"2024-03-20T00:04:36.551Z","log.origin":{"file.name":"cmd/watch.go","file.line":122},"message":"rollback failedfailed to restart agent via service: failed to restart service (Elastic Agent): The service has not been started.","ecs.version":"1.6.0"}

@amitkanfer
Copy link
Contributor

is there a linting rule we can turn on to prevent these from happening again?
I can imagine there's a simple regex to detect these issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

No branches or pull requests

3 participants