Skip to content

Commit 43618e9

Browse files
[9.2] [Fleet] reduce info logging in Fleet tasks (#241811) (#241919)
# Backport This will backport the following commits from `main` to `9.2`: - [[Fleet] reduce info logging in Fleet tasks (#241811)](#241811) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-11-05T07:33:30Z","message":"[Fleet] reduce info logging in Fleet tasks (#241811)\n\n## Summary\n\nSince enabling #235842, info\nlogging increased substantially in cloud, because the agent status\nchange task runs every minute.\n\nChanging the task start and end messages to be on debug level.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...","sha":"15c5db8f065d9c32b5df50cb43440755ad320202","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:version","v9.3.0","v9.2.1"],"title":"[Fleet] reduce info logging in Fleet tasks","number":241811,"url":"https://github.com/elastic/kibana/pull/241811","mergeCommit":{"message":"[Fleet] reduce info logging in Fleet tasks (#241811)\n\n## Summary\n\nSince enabling #235842, info\nlogging increased substantially in cloud, because the agent status\nchange task runs every minute.\n\nChanging the task start and end messages to be on debug level.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...","sha":"15c5db8f065d9c32b5df50cb43440755ad320202"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/241811","number":241811,"mergeCommit":{"message":"[Fleet] reduce info logging in Fleet tasks (#241811)\n\n## Summary\n\nSince enabling #235842, info\nlogging increased substantially in cloud, because the agent status\nchange task runs every minute.\n\nChanging the task start and end messages to be on debug level.\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [ ] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...","sha":"15c5db8f065d9c32b5df50cb43440755ad320202"}},{"branch":"9.2","label":"v9.2.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Bardi <[email protected]>
1 parent 8e2ad0b commit 43618e9

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

x-pack/platform/plugins/shared/fleet/server/tasks/agent_status_change_task.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { SO_SEARCH_LIMIT } from '../constants';
2727
import { getAgentPolicySavedObjectType } from '../services/agent_policy';
2828

2929
export const TYPE = 'fleet:agent-status-change-task';
30-
export const VERSION = '1.0.1';
30+
export const VERSION = '1.0.2';
3131
const TITLE = 'Fleet Agent Status Change Task';
3232
const SCOPE = ['fleet'];
3333
const DEFAULT_INTERVAL = '1m';
@@ -117,7 +117,7 @@ export class AgentStatusChangeTask {
117117
}
118118

119119
private endRun(msg: string = '') {
120-
this.logger.info(`[AgentStatusChangeTask] runTask ended${msg ? ': ' + msg : ''}`);
120+
this.logger.debug(`[AgentStatusChangeTask] runTask ended${msg ? ': ' + msg : ''}`);
121121
}
122122

123123
public runTask = async (
@@ -143,7 +143,7 @@ export class AgentStatusChangeTask {
143143
return getDeleteTaskRunResult();
144144
}
145145

146-
this.logger.info(`[runTask()] started`);
146+
this.logger.debug(`[runTask()] started`);
147147

148148
const [coreStart, _startDeps] = (await core.getStartServices()) as any;
149149
const esClient = coreStart.elasticsearch.client.asInternalUser;

x-pack/platform/plugins/shared/fleet/server/tasks/auto_install_content_packages_task.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { getInstalledPackages } from '../services/epm/packages';
3131
import { getPrereleaseFromSettings } from '../services/epm/packages/get_prerelease_setting';
3232

3333
export const TYPE = 'fleet:auto-install-content-packages-task';
34-
export const VERSION = '1.0.2';
34+
export const VERSION = '1.0.3';
3535
const TITLE = 'Fleet Auto Install Content Packages Task';
3636
const SCOPE = ['fleet'];
3737
const DEFAULT_INTERVAL = '10m';
@@ -123,7 +123,7 @@ export class AutoInstallContentPackagesTask {
123123
}
124124

125125
private endRun(msg: string = '') {
126-
this.logger.info(`[AutoInstallContentPackagesTask] runTask ended${msg ? ': ' + msg : ''}`);
126+
this.logger.debug(`[AutoInstallContentPackagesTask] runTask ended${msg ? ': ' + msg : ''}`);
127127
}
128128

129129
public runTask = async (taskInstance: ConcreteTaskInstance, core: CoreSetup) => {
@@ -145,7 +145,7 @@ export class AutoInstallContentPackagesTask {
145145
return getDeleteTaskRunResult();
146146
}
147147

148-
this.logger.info(`[runTask()] started`);
148+
this.logger.debug(`[runTask()] started`);
149149

150150
const [coreStart, _startDeps, { packageService }] = (await core.getStartServices()) as any;
151151
const packageClient = packageService.asInternalUser;

x-pack/platform/plugins/shared/fleet/server/tasks/delete_unenrolled_agents_task.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { AGENTS_INDEX } from '../../common/constants';
2626
import { settingsService } from '../services';
2727

2828
export const TYPE = 'fleet:delete-unenrolled-agents-task';
29-
export const VERSION = '1.0.0';
29+
export const VERSION = '1.0.1';
3030
const TITLE = 'Fleet Delete Unenrolled Agents Task';
3131
const SCOPE = ['fleet'];
3232
const INTERVAL = '1h';
@@ -102,7 +102,7 @@ export class DeleteUnenrolledAgentsTask {
102102
}
103103

104104
private endRun(msg: string = '') {
105-
this.logger.info(`[DeleteUnenrolledAgentsTask] runTask ended${msg ? ': ' + msg : ''}`);
105+
this.logger.debug(`[DeleteUnenrolledAgentsTask] runTask ended${msg ? ': ' + msg : ''}`);
106106
}
107107

108108
public async deleteUnenrolledAgents({
@@ -165,7 +165,7 @@ export class DeleteUnenrolledAgentsTask {
165165
return getDeleteTaskRunResult();
166166
}
167167

168-
this.logger.info(`[runTask()] started`);
168+
this.logger.debug(`[runTask()] started`);
169169

170170
const [coreStart] = await core.getStartServices();
171171
const esClient = coreStart.elasticsearch.client.asInternalUser;

x-pack/platform/plugins/shared/fleet/server/tasks/sync_integrations/sync_integrations_task.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { getCustomAssets } from './custom_assets';
3232
import type { SyncIntegrationsData } from './model';
3333

3434
export const TYPE = 'fleet:sync-integrations-task';
35-
export const VERSION = '1.0.5';
35+
export const VERSION = '1.0.6';
3636
const TITLE = 'Fleet Sync Integrations Task';
3737
const SCOPE = ['fleet'];
3838
const DEFAULT_INTERVAL = '5m';
@@ -115,7 +115,7 @@ export class SyncIntegrationsTask {
115115
}
116116

117117
private endRun(msg: string = '') {
118-
this.logger.info(`[SyncIntegrationsTask] runTask ended${msg ? ': ' + msg : ''}`);
118+
this.logger.debug(`[SyncIntegrationsTask] runTask ended${msg ? ': ' + msg : ''}`);
119119
}
120120

121121
public runTask = async (
@@ -135,7 +135,7 @@ export class SyncIntegrationsTask {
135135
return getDeleteTaskRunResult();
136136
}
137137

138-
this.logger.info(`[runTask()] started`);
138+
this.logger.debug(`[runTask()] started`);
139139

140140
if (!canEnableSyncIntegrations()) {
141141
this.logger.debug(`[SyncIntegrationsTask] Remote synced integration cannot be enabled.`);

x-pack/platform/plugins/shared/fleet/server/tasks/unenroll_inactive_agents_task.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { agentPolicyService, auditLoggingService } from '../services';
2929
import type { AgentPolicy } from '../types';
3030

3131
export const TYPE = 'fleet:unenroll-inactive-agents-task';
32-
export const VERSION = '1.0.1';
32+
export const VERSION = '1.0.2';
3333
const TITLE = 'Fleet Unenroll Inactive Agent Task';
3434
const SCOPE = ['fleet'];
3535
const INTERVAL = '10m';
@@ -118,7 +118,7 @@ export class UnenrollInactiveAgentsTask {
118118
}
119119

120120
private endRun(msg: string = '') {
121-
this.logger.info(`[UnenrollInactiveAgentsTask] runTask ended${msg ? ': ' + msg : ''}`);
121+
this.logger.debug(`[UnenrollInactiveAgentsTask] runTask ended${msg ? ': ' + msg : ''}`);
122122
}
123123

124124
public async unenrollInactiveAgents(
@@ -196,7 +196,7 @@ export class UnenrollInactiveAgentsTask {
196196
return getDeleteTaskRunResult();
197197
}
198198

199-
this.logger.info(`[runTask()] started`);
199+
this.logger.debug(`[runTask()] started`);
200200

201201
const [coreStart] = await core.getStartServices();
202202
const esClient = coreStart.elasticsearch.client.asInternalUser;

0 commit comments

Comments
 (0)