wazuh / wazuh-indexer

Wazuh indexer, the Wazuh search engine
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
11 stars 19 forks source link

Design the data persistence model #345

Open AlexRuiz7 opened 2 months ago

AlexRuiz7 commented 2 months ago

Description

The goal of this issue is to generate the data persistence model described in #344. To do that, we'll generate an E/R diagram and iterate it until the data model fulfills the requirements.

Tasks

AlexRuiz7 commented 2 months ago

Entities

[!NOTE]
rev 0.1 - August 7th, 2024: Add initial diagrams rev 0.2 - August 7th, 2024: Removed MONITORING index

---
title: Wazuh Data Model
---
erDiagram
    AGENT
    COMMAND
    ALERT
    INVENTORY
    VULNERABILITY
    FIM
    SCA
    STATISTICS

Relations

---
title: Wazuh Data Model
---
erDiagram
    AGENT {
        string id PK
        string internal_key UK
        string[] groups
    }
    COMMAND {
        string id PK "The command's ID"
        string agent_id FK "The agent's ID"
    }
    ALERT {
        string id PK
        string agent_id UK
        string[] groups
    }
    INVENTORY {
        string id PK
        string agent_id UK
        string[] groups
    }
    VULNERABILITY {
        string id PK
        string agent_id UK
        string[] groups
    }
    FIM {
        string id PK
        string agent_id UK
        string[] groups
    }
    SCA {
        string id PK
        string agent_id UK
        string[] groups
    }
    STATISTICS {
        string id PK
    }
    AGENT one to zero or more COMMAND : "is sent to"
    AGENT one to zero or more ALERT : generates
    AGENT one to one INVENTORY : has
    AGENT one to zero or more VULNERABILITY : has
    AGENT one to zero or more FIM : has
    AGENT one to zero or more SCA : has
AlexRuiz7 commented 1 month ago

Moved to the Feature Complete stage.