elastic / elastic/integrations

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

Open
#14,721 1 comment 0 reactions 0 assignees View on GitHub
Integration:system needs:triage Stalled Team:Obs-InfraObs
Dominant language
Handlebars
Stars
333
Forks
647
Avg merge
3d 4h
Merged PRs (30d)
209

Description

### 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](https://www.elastic.co/docs/reference/fleet/host-provider)

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:
https://github.com/elastic/integrations/blob/4ab7b4b554abfcd88ce8e2896d32d97c081cc8f2/packages/system/manifest.yml#L64
https://github.com/elastic/integrations/blob/4ab7b4b554abfcd88ce8e2896d32d97c081cc8f2/packages/system/manifest.yml#L82

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.