From 980fbcc0039f673d21519de0f206d0becf4e2ed2 Mon Sep 17 00:00:00 2001 From: Marcos Oviedo Date: Wed, 25 Jan 2023 09:57:56 -0300 Subject: [PATCH] Adding more notes to `overrides` behavior in agent settings (#9482) Adding notes on the agent_options.overrides behavior --- .../Using-Fleet/configuration-files/README.md | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/Using-Fleet/configuration-files/README.md b/docs/Using-Fleet/configuration-files/README.md index 855c7ea554..7d1e655763 100644 --- a/docs/Using-Fleet/configuration-files/README.md +++ b/docs/Using-Fleet/configuration-files/README.md @@ -998,11 +998,20 @@ spec: 3600: "SELECT total_seconds AS uptime FROM uptime" overrides: # Note configs in overrides take precedence over the default config defined - # under the config key above. Hosts receive overrides based on the platform - # returned by `SELECT platform FROM os_version`. In this example, the base - # config would be used for Windows and CentOS hosts, while Mac and Ubuntu - # hosts would receive their respective overrides. Note, these overrides are - # NOT merged with the top level configuration. + # under the config key above. Be aware that these overrides are NOT merged + # with the top-level configuration!! This means that settings values defined + # on the top-level config.options section will not be propagated to the platform + # override sections. So for example, the config.options.distributed_interval value + # will be discared on a platform override section, and only the section value + # for distributed_interval will be used. If the given setting is not specified + # in the override section, its default value will be enforced. + # Going back to the example, if the override section is windows, + # overrides.platforms.windows.distributed_interval will have to be set again to 5 + # for this setting to be enforced as expected, otherwise the setting will get + # its default value (60 in the case of distributed_interval). + # Hosts receive overrides based on the platform returned by `SELECT platform FROM os_version`. + # In this example, the base config would be used for Windows and CentOS hosts, + # while Mac and Ubuntu hosts would receive their respective overrides. platforms: darwin: options: @@ -1139,6 +1148,7 @@ The `overrides` key allows you to segment hosts, by their platform, and supply t In the example file below, all Darwin and Ubuntu hosts will **only** receive the options specified in their respective overrides sections. +> IMPORTANT: If a given option is not specified in a platform override section, its default value will be enforced. ```yaml agent_options: