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

Remove ECS host fields #575

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions ecs/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Wazuh Common Schema

The Wazuh Common Schema is a derivation of the [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) (ECS) providing a common data schema for the different central components of Wazuh.

- [agent](./agent.md)
- [alerts](alerts.md)
- [command](commands.md)
- [states-fim](states-fim.md)
- [states-inventory-hardware](states-inventory-hardware.md)
- [states-inventory-hotfixes](states-inventory-hotfixes.md)
- [states-inventory-networks](states-inventory-networks.md)
- [states-inventory-packages](states-inventory-packages.md)
- [states-inventory-ports](states-inventory-ports.md)
- [states-inventory-processes](states-inventory-processes.md)
- [states-inventory-system](states-inventory-system.md)
- [states-vulnerabilities](states-vulnerabilities.md)

---

### Useful resources
For more information and additional resources, please refer to the following links:
- [ECS schemas repository](https://github.com/elastic/ecs/tree/main/schemas)
81 changes: 10 additions & 71 deletions ecs/docs/inventory-hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Based on ECS:

| | Field name | Data type | Description | Example |
| --- | ----------------------------- | --------- | ------------------------------------ | -------------------------- |
| | `agent.*` | object | All the agent fields. | ` |
| | `@timestamp` | date | Date/time when the event originated. | `2016-05-23T08:05:34.853Z` |
| | `observer.serial_number` | keyword | Observer serial number. | |
| \* | `host.cpu.name` | keyword | Name of the CPU | |
Expand All @@ -34,8 +35,13 @@ fields:
"@timestamp": {}
agent:
fields:
id: {}
groups: {}
id: {}
name: {}
type: {}
version: {}
host:
fields: "*"
observer:
fields:
serial_number: {}
Expand Down Expand Up @@ -64,77 +70,10 @@ fields:
"template": {
"settings": {
"index": {
"number_of_replicas": "0",
"number_of_shards": "1",
"query.default_field": ["observer.board_serial"],
"refresh_interval": "5s"
}
},
"mappings": {
"date_detection": false,
"dynamic": "strict",
"properties": {
"@timestamp": {
"type": "date"
},
"agent": {
"properties": {
"groups": {
"ignore_above": 1024,
"type": "keyword"
},
"id": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
"host": {
"properties": {
"cpu": {
"properties": {
"cores": {
"type": "long"
},
"name": {
"ignore_above": 1024,
"type": "keyword"
},
"speed": {
"type": "long"
}
},
"type": "object"
},
"memory": {
"properties": {
"free": {
"type": "long"
},
"total": {
"type": "long"
},
"used": {
"properties": {
"percentage": {
"type": "long"
}
},
"type": "object"
}
},
"type": "object"
}
}
},
"observer": {
"properties": {
"serial_number": {
"ignore_above": 1024,
"type": "keyword"
}
}
}
"number_of_replicas": "0",
"refresh_interval": "5s",
"query.default_field": ["observer.board_serial"]
}
}
}
Expand Down
54 changes: 15 additions & 39 deletions ecs/docs/inventory-hotfixes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Based on ECS:

| | Field name | Data type | Description | Example |
| --- | --------------------- | --------- | --------------------- | -------------------------- |
| | `agent.*` | object | All the agent fields. | ` |
| | `@timestamp` | date | Timestamp of the scan | `2016-05-23T08:05:34.853Z` |
| \* | `package.hotfix.name` | keyword | Name of the hotfix | |

Expand All @@ -27,8 +28,13 @@ fields:
"@timestamp": {}
agent:
fields:
id: {}
groups: {}
id: {}
name: {}
type: {}
version: {}
host:
fields: "*"
package:
fields:
hotfix:
Expand All @@ -40,49 +46,19 @@ fields:

```json
{
"index_patterns": ["wazuh-states-inventory-hotfixes*"],
"index_patterns": [
"wazuh-states-inventory-hotfixes*"
],
"priority": 1,
"template": {
"settings": {
"index": {
"number_of_replicas": "0",
"number_of_shards": "1",
"query.default_field": ["package.hotfix.name"],
"refresh_interval": "5s"
}
},
"mappings": {
"date_detection": false,
"dynamic": "strict",
"properties": {
"@timestamp": {
"type": "date"
},
"agent": {
"properties": {
"groups": {
"ignore_above": 1024,
"type": "keyword"
},
"id": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
"package": {
"properties": {
"hotfix": {
"properties": {
"name": {
"ignore_above": 1024,
"type": "keyword"
}
},
"type": "object"
}
}
}
"number_of_replicas": "0",
"refresh_interval": "5s",
"query.default_field": [
"package.hotfix.name"
]
}
}
}
Expand Down
Loading