Open amolnater-qasource opened 1 year ago
@manishgupta-qasource Please review.
Secondary review for this ticket is Done
This appears to be coming from the upgrade watcher logs that we now save properly.
~/Downloads/elastic-agent-diagnostics-2023-06-09T09-15-49Z-00 ···························· 03:55:50 PM
❯ cat logs/elastic-agent-7371b4/elastic-agent-watcher-20230609.ndjson
{"log.level":"debug","@timestamp":"2023-06-09T08:39:04.134Z","log.origin":{"file.name":"cmd/watch.go","file.line":68},"message":"update marker not present at 'C:\\Program Files\\Elastic\\Agent\\data'","ecs.version":"1.6.0"}
I believe this is because the watcher always logs at the debug level:
I don't think users should have control of the watcher log level since it is critical to root causing upgrade failures, but this is also confusing. Probably we should be shipping these logs to their own data stream, where it would still ignore the log level but at least it would be obvious they aren't from the running agent process itself.
code changed, but issue is still present in managed scenario
code changed, but issue is still present in managed scenario
Would this be the reason I am seeing errors that aren't actually errors when upgrading Agents?
https://github.com/elastic/infosec/issues/16116#issuecomment-1903663422
Those are the output of the endpoint-security command used to upgrade the endpoint-security service, those are unconditionally logged at the error level. Probably we can reduce them to info when the command succeeds, I can't recall a situation where they were useful if the command didn't fail.
Kibana Build details:
Host OS and Browser version: Windows & Linux, All
Preconditions:
Steps to reproduce:
elastic_agent [elastic_agent][debug] update marker not present at '/opt/Elastic/Agent/data'
.Expected: Debug log should not be generated on agent installation, when debug level is never set.
Screenshots:
What's working fine:
Logs: elastic-agent-diagnostics-2023-06-09T09-15-49Z-00.zip