Skip to content

Commit

Permalink
[Fleet] Doc update for agent config sources (#20891)
Browse files Browse the repository at this point in the history
Update README.md
Lower `inventories_min_interval` to 1min
Add new fields to the inventories payload
Remove cloud_provider and add info to Format section
Co-authored-by: maxime mouial <[email protected]>
  • Loading branch information
julesmcrt authored Nov 28, 2023
1 parent 3ae4587 commit 8bfeaac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion comp/metadata/internal/util/inventory_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import (
)

var (
defaultMinInterval = 5 * time.Minute
defaultMinInterval = 1 * time.Minute
defaultMaxInterval = 10 * time.Minute

// For testing purposes
Expand Down
19 changes: 16 additions & 3 deletions comp/metadata/inventoryagent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This package populates some of the agent-related fields in the `inventories` pro
This is enabled by default but can be turned off using `inventories_enabled` config.

The payload is sent every 10min (see `inventories_max_interval` in the config) or whenever it's updated with at most 1
update every 5 minutes (see `inventories_min_interval`).
update every minute (see `inventories_min_interval`).

# Content

Expand Down Expand Up @@ -103,6 +103,16 @@ The payload is a JSON dict with the following fields
string. This includes the settings configured by the user (throuh the configuration file, the environment or CLI),
as well as any settings explicitly set by the agent (for example the number of workers is dynamically set by the
agent itself based on the load).
- `file_configuration` - **string**: the Agent configuration specified by the configuration file (scrubbed), as a YAML string.
Only the settings written in the configuration file are included, and their value might not match what's applyed by the agent because they can be overriden by other sources.
- `environment_variable_configuration` - **string**: the Agent configuration specified by the environment variables (scrubbed), as a YAML string.
Only the settings written in the environment variables are included, and their value might not match what's applyed by the agent because they can be overriden by other sources.
- `agent_runtime_configuration` - **string**: the Agent configuration set by the agent itself (scrubbed), as a YAML string.
Only the settings set by the agent itself are included, and their value might not match what's applyed by the agent because they can be overriden by other sources.
- `remote_configuration` - **string**: the Agent configuration specified by the Remote Configuration (scrubbed), as a YAML string.
Only the settings currently used by Remote Configuration are included, and their value might not match what's applyed by the agent because they can be overriden by other sources.
- `cli_configuration` - **string**: the Agent configuration specified by the CLI (scrubbed), as a YAML string.
Only the settings set in the CLI are included, they cannot be overriden by any other sources.

("scrubbed" indicates that secrets are removed from the field value just as they are in logs)

Expand All @@ -114,7 +124,6 @@ Here an example of an inventory payload:
{
"agent_metadata": {
"agent_version": "7.37.0-devel+git.198.68a5b69",
"cloud_provider": "AWS",
"config_apm_dd_url": "",
"config_dd_url": "",
"config_logs_dd_url": "",
Expand All @@ -141,7 +150,11 @@ Here an example of an inventory payload:
"install_method_tool_version": "",
"logs_transport": "HTTP",
"full_configuration": "<entire yaml configuration for the agent>",
"provided_configuration": "api_key: \"***************************aaaaa\"\ncheck_runners: 4\ncmd.check.fullsketches: false\ncontainerd_namespace: []\ncontainerd_namespaces: []\npython_version: \"3\"\ntracemalloc_debug: false"
"provided_configuration": "api_key: \"***************************aaaaa\"\ncheck_runners: 4\ncmd.check.fullsketches: false\ncontainerd_namespace: []\ncontainerd_namespaces: []\npython_version: \"3\"\ntracemalloc_debug: false\nlog_level: \"warn\"",
"file_configuration": "check_runners: 4\ncmd.check.fullsketches: false\ncontainerd_namespace: []\ncontainerd_namespaces: []\npython_version: \"3\"\ntracemalloc_debug: false",
"environment_variable_configuration": "api_key: \"***************************aaaaa\"",
"remote_configuration": "log_level: \"debug\"",
"cli_configuration": "log_level: \"warn\""
}
"hostname": "my-host",
"timestamp": 1631281754507358895
Expand Down

0 comments on commit 8bfeaac

Please sign in to comment.