Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nest ECS Host fields under Agent #539

Closed
3 tasks
Tracked by #496
AlexRuiz7 opened this issue Nov 11, 2024 · 1 comment · Fixed by #544
Closed
3 tasks
Tracked by #496

Nest ECS Host fields under Agent #539

AlexRuiz7 opened this issue Nov 11, 2024 · 1 comment · Fixed by #544
Assignees
Labels
level/task Task issue mvp Minimum Viable Product type/enhancement Enhancement issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Nov 11, 2024

Description

As Wazuh can analyze information extracted from agentless devices, we want to differentiate the information about the hosts running Wazuh Agents and host information related to the event. In order to do so, we have decided to nest the Host fields under the Agent object. We are aware that this change breaks the ECS, but we remove confusions and achieve consistency instead. Moreover, we have decided to include every Host field in the mappings of every index so the Agents and the Engine can use them to their will.

Functional requirements

For every index (but .commands):

Implementation restrictions

  • Use the existing tooling to regenerate the index templates.
  • Update or modify the tooling if required.
  • Changes apply to stateful and stateless indices.

Plan

  • Update index definitions in wazuh-indexer/ecs
  • Update event generators in wazuh-indexer/ecs
  • Update index templates in wazuh-indexer-plugins/plugins/setup
@f-galland
Copy link
Member

Reusing field groups is a built-in feature to the ecs tooling:

In order to nest the whole host object beneath agent, a custom yml schema needs to be added under agent/fields/custom that reads as follows:

---
- name: host
  reusable:
    top_level: false
    expected:
      - agent

This field also needs to be included in subset.yml:

name: agent
fields:
[...]
  agent:
    fields:
      [...]
      host:
        fields: "*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue mvp Minimum Viable Product type/enhancement Enhancement issue
Projects
Status: Done
2 participants