-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Log agent usage every n minutes #144037
Conversation
@elasticmachine merge upstream |
try { | ||
const usageData = await fetchUsage(); | ||
if (appContextService.getLogger().isLevelEnabled('debug')) { | ||
appContextService.getLogger().debug(`Feet Usage: ${JSON.stringify(usageData)}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
if (appContextService.getLogger().isLevelEnabled('debug')) { | ||
appContextService.getLogger().debug(`Feet Usage: ${JSON.stringify(usageData)}`); | ||
} else { | ||
appContextService.getLogger().info(`Feet Usage: ${JSON.stringify(usageData)}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
if (!isInfoLogLevelEnabled) { | ||
return; | ||
} | ||
// TODO get log level and schedule interval based on that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This todo has been addressed now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it has been
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for typo fixes 🦶 and removing TODO 🚀
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
@nchaulet Could this feature be implemented using a |
Summary
Resolve #140014
Depends on #144033
Log periodically the agent status, and fleet server agent status like this
We register a new task to log every 5 minute (if Fleet log level is debug) or 15 minutes otherwise