Skip to content

[system]: Broken agent config due to 'system' integration #14721

@kg-tannertoni

Description

@kg-tannertoni

Integration Name

System [system]

Dataset Name

No response

Integration Version

latest, though affects multiple

Agent Version

8.18.4

Agent Output Type

elasticsearch

Elasticsearch Version

8.18.4

OS Version and Architecture

docker on debian

Software/API Version

No response

Error Message

Error: error printing config: error parsing config as hashmap: error unpacking subarray in config for skip key inputs: expected ',' when parsing '${host.os_version} != "12 (bookworm)" and (${host.os_platform} != "amzn" or ${host.os_version} != "2023") and (${host.os_platform} != "sles" and startsWith(${host.os_version}, "15") == false)' accessing 'inputs.0' 

Event Original

No response

What did you do?

elastic-agent inspect after adding the system integration, if at least one of the two affected inputs are enabled.

What did you see?

Error: error printing config: error parsing config as hashmap: error unpacking subarray in config for skip key inputs: expected ',' when parsing '${host.os_version} != "12 (bookworm)" and (${host.os_platform} != "amzn" or ${host.os_version} != "2023") and (${host.os_platform} != "sles" and startsWith(${host.os_version}, "15") == false)' accessing 'inputs.0' 

What did you expect to see?

No error message and a working agent config ;)

Anything else?

Hi there

I believe the default conditions within the system integration are breaking the agent configuration. The configuration can not be evaluated due to the default value of the 'condition' variable on inputs.

I believe the fields os_version and os_platform simply do not exist, as they are not provided by the host provider as described here

I would assume, a condition based on distro and version is not possible like this and the default condition should be amended / removed, as it's simply wrong currently. In our infrastructure it appears as if this might be interfering with agent upgrades, but I can not 100% confirm this just yet.

The conditions are defined here:

default: ${host.os_version} != "12 (bookworm)" and (${host.os_platform} != "amzn" or ${host.os_version} != "2023") and (${host.os_platform} != "sles" and startsWith(${host.os_version}, "15") == false)

default: ${host.os_version} == "12 (bookworm)" or (${host.os_platform} == "amzn" and ${host.os_version} == "2023") or (${host.os_platform} == "sles" and startsWith(${host.os_version}, "15") == true)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions