-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Team:FleetTeam label for Observability Data Collection Fleet teamTeam label for Observability Data Collection Fleet team
Description
Summary
Add a dropdown in Fleet's advanced agent policy settings for agent.monitoring._runtime_experimental
to enable Beats Receivers monitoring.
Implementation
Dropdown should have two options:
- Default - maps to
""
- Runtime (experimental) - maps to
"otel"
Maps directly to the agent config, e.g:
agent.monitoring:
_runtime_experimental: "otel"
Adding the setting to this Zod schema should be enough to get a UI element added and have the setting map to the agent policy properly:
kibana/x-pack/platform/plugins/shared/fleet/common/settings/agent_policy_settings.tsx
Lines 29 to 199 in 8c8701f
export const AGENT_POLICY_ADVANCED_SETTINGS: SettingsConfig[] = [ | |
{ | |
name: 'agent.limits.go_max_procs', | |
title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.goMaxProcsTitle', { | |
defaultMessage: 'Limit CPU usage', | |
}), | |
description: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.goMaxProcsDescription', { | |
defaultMessage: 'Limits the maximum number of CPUs that can be executing simultaneously.', | |
}), | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-limit-cpu', | |
api_field: { | |
name: 'agent_limits_go_max_procs', | |
}, | |
schema: z.number().int().min(0), | |
}, | |
{ | |
name: 'agent.download.timeout', | |
hidden: true, | |
title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.downloadTimeoutTitle', { | |
defaultMessage: 'Agent binary download timeout', | |
}), | |
description: i18n.translate( | |
'xpack.fleet.settings.agentPolicyAdvanced.downloadTimeoutDescription', | |
{ | |
defaultMessage: 'Timeout for downloading the agent binary.', | |
} | |
), | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/enable-custom-policy-settings.html#configure-agent-download-timeout', | |
api_field: { | |
name: 'agent_download_timeout', | |
}, | |
schema: zodStringWithDurationValidation, | |
}, | |
{ | |
name: 'agent.download.target_directory', | |
hidden: true, | |
api_field: { | |
name: 'agent_download_target_directory', | |
}, | |
title: i18n.translate( | |
'xpack.fleet.settings.agentPolicyAdvanced.agentDownloadTargetDirectoryTitle', | |
{ | |
defaultMessage: 'Agent binary target directory', | |
} | |
), | |
description: i18n.translate( | |
'xpack.fleet.settings.agentPolicyAdvanced.agentDownloadTargetDirectoryDescription', | |
{ | |
defaultMessage: 'The disk path to which the agent binary will be downloaded.', | |
} | |
), | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/elastic-agent-standalone-download.html', | |
schema: z.string(), | |
}, | |
{ | |
name: 'agent.logging.metrics.period', | |
hidden: true, | |
api_field: { | |
name: 'agent_logging_metrics_period', | |
}, | |
title: i18n.translate( | |
'xpack.fleet.settings.agentPolicyAdvanced.agentLoggingMetricsPeriodTitle', | |
{ | |
defaultMessage: 'Agent logging metrics period', | |
} | |
), | |
description: i18n.translate( | |
'xpack.fleet.settings.agentPolicyAdvanced.agentLoggingMetricsPeriodDescription', | |
{ | |
defaultMessage: 'The frequency of logging the internal Elastic Agent metrics.', | |
} | |
), | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/elastic-agent-standalone-logging-config.html#elastic-agent-standalone-logging-settings', | |
schema: zodStringWithDurationValidation, | |
}, | |
{ | |
name: 'agent.logging.level', | |
title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.agentLoggingLevelTitle', { | |
defaultMessage: 'Agent logging level', | |
}), | |
description: ( | |
<FormattedMessage | |
id="xpack.fleet.settings.agentPolicyAdvanced.agentLoggingLevelDescription" | |
defaultMessage="Sets the log level for all the agents on the policy. The default log level is {level}." | |
values={{ level: <EuiCode>{DEFAULT_LOG_LEVEL}</EuiCode> }} | |
/> | |
), | |
api_field: { | |
name: 'agent_logging_level', | |
}, | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-log-level', | |
schema: z.enum(AGENT_LOG_LEVELS).default(DEFAULT_LOG_LEVEL), | |
}, | |
{ | |
name: 'agent.logging.to_files', | |
title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.agentLoggingToFilesTitle', { | |
defaultMessage: 'Agent logging to files', | |
}), | |
description: ( | |
<FormattedMessage | |
id="xpack.fleet.settings.agentPolicyAdvanced.agentLoggingToFilesDescription" | |
defaultMessage="Enables logging to rotating files." | |
/> | |
), | |
api_field: { | |
name: 'agent_logging_to_files', | |
}, | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/elastic-agent-standalone-logging-config.html#elastic-agent-standalone-logging-settings', | |
schema: z.boolean().default(true), | |
}, | |
{ | |
name: 'agent.logging.files.rotateeverybytes', | |
title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.agentLoggingFileSizeTitle', { | |
defaultMessage: 'Agent logging file size limit', | |
}), | |
description: ( | |
<FormattedMessage | |
id="xpack.fleet.settings.agentPolicyAdvanced.agentLoggingFileSizeDescription" | |
defaultMessage="Configure log file size limit in bytes. If limit is reached, log file will be automatically rotated." | |
/> | |
), | |
api_field: { | |
name: 'agent_logging_files_rotateeverybytes', | |
}, | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/elastic-agent-standalone-logging-config.html#elastic-agent-standalone-logging-settings', | |
schema: z.number().int().min(0), | |
}, | |
{ | |
name: 'agent.logging.files.keepfiles', | |
title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.agentLoggingFileLimitTitle', { | |
defaultMessage: 'Agent logging number of files', | |
}), | |
description: ( | |
<FormattedMessage | |
id="xpack.fleet.settings.agentPolicyAdvanced.agentLoggingFileLimitDescription" | |
defaultMessage="Number of rotated log files to keep. Oldest files will be deleted first." | |
/> | |
), | |
api_field: { | |
name: 'agent_logging_files_keepfiles', | |
}, | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/elastic-agent-standalone-logging-config.html#elastic-agent-standalone-logging-settings', | |
schema: z.number().int().min(0), | |
}, | |
{ | |
name: 'agent.logging.files.interval', | |
title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.agentLoggingFileIntervalitle', { | |
defaultMessage: 'Agent logging number of files', | |
}), | |
description: ( | |
<FormattedMessage | |
id="xpack.fleet.settings.agentPolicyAdvanced.agentLoggingFileIntervalescription" | |
defaultMessage="Enable log file rotation on time intervals in addition to size-based rotation, i.e. 24h, 7d." | |
/> | |
), | |
api_field: { | |
name: 'agent_logging_files_interval', | |
}, | |
learnMoreLink: | |
'https://www.elastic.co/guide/en/fleet/current/elastic-agent-standalone-logging-config.html#elastic-agent-standalone-logging-settings', | |
schema: zodStringWithDurationValidation, | |
}, | |
]; |
Acceptance Criteria
- Dropdown added to advanced section on agent policy settings tab
- Dropdown options map to
""
(default) and"otel"
- Configuration propagates to agents correctly
- Option is marked as experimental in UI
Advanced settings screenshot

Metadata
Metadata
Assignees
Labels
Team:FleetTeam label for Observability Data Collection Fleet teamTeam label for Observability Data Collection Fleet team