Skip to content

Commit

Permalink
Add fields for Operating Systemd data (#5)
Browse files Browse the repository at this point in the history
There were some previous discussions around the version field and if it should split up into major, minor, bugfix, patch. I chose to only go with `version` based on the assumption that if someone searches for a specific minor version he will know the major version. So searching for it can be done with a prefix query based on version keyword.
  • Loading branch information
ruflin authored and andrewkroh committed Jun 6, 2018
1 parent ffc574e commit e17097a
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -12,5 +12,6 @@ All notable changes to this project will be documented in this file based on the
### Added
* Adds cloud.account.id for top level organizational level. #11
* Add `http.response.status_code` and `http.response.body` fields. #4
* Add fields for Operating System data. #5

### Deprecated
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -37,6 +37,7 @@ List of available ECS fields.
* [Log fields](#log)
* [Network fields](#network)
* [Organization fields](#organization)
* [Operating System fields](#os)
* [Process fields](#process)
* [Service fields](#service)
* [Source fields](#source)
Expand Down Expand Up @@ -305,6 +306,21 @@ This can be useful if data should stored in the same index should be sometimes f
| <a name="organization.id"></a>`organization.id` | Unique identifier for the organization. | keyword | | |


## <a name="os"></a> Operating System fields

The OS fields contain information about the operating system and contains.

The os fields are often used inside other prefixes like `host.os.*` or `user_agent.os.*`.


| Field | Description | Type | Multi Field | Example |
|---|---|---|---|---|
| <a name="os.platform"></a>`os.platform` | Operating system platform (e.g. centos, ubuntu, windows). | keyword | | `darwin` |
| <a name="os.name"></a>`os.name` | Operating system name. | keyword | | `Mac OS X` |
| <a name="os.family"></a>`os.family` | OS family (e.g. redhat, debian, freebsd, windows). | keyword | | `debian` |
| <a name="os.version"></a>`os.version` | Operating system version as a raw string. | keyword | | `10.12.6-rc2` |


## <a name="process"></a> Process fields

These fields contain information about a process.
Expand Down
4 changes: 4 additions & 0 deletions schema.csv
Expand Up @@ -98,6 +98,10 @@ network.outbound.packets,long,0,12
network.protocol,keyword,0,http
organization.id,keyword,0,
organization.name,text,0,
os.family,keyword,0,debian
os.name,keyword,0,Mac OS X
os.platform,keyword,0,darwin
os.version,keyword,0,10.12.6-rc2
process.args,keyword,0,"['-l', 'user', '10.0.0.16']"
process.name,keyword,0,ssh
process.pid,long,0,
Expand Down
28 changes: 28 additions & 0 deletions schemas/os.yml
@@ -0,0 +1,28 @@
- name: os
title: Operating System
group: 2
description: >
The OS fields contain information about the operating system and contains.
The os fields are often used inside other prefixes like `host.os.*` or `user_agent.os.*`.
fields:
- name: platform
type: keyword
description: >
Operating system platform (e.g. centos, ubuntu, windows).
example: darwin
- name: name
type: keyword
example: "Mac OS X"
description: >
Operating system name.
- name: family
type: keyword
example: "debian"
description: >
OS family (e.g. redhat, debian, freebsd, windows).
- name: version
type: keyword
example: "10.12.6-rc2"
description: >
Operating system version as a raw string.
20 changes: 20 additions & 0 deletions template.json
Expand Up @@ -513,6 +513,26 @@
}
}
},
"os": {
"properties": {
"family": {
"ignore_above": 1024,
"type": "keyword"
},
"name": {
"ignore_above": 1024,
"type": "keyword"
},
"platform": {
"ignore_above": 1024,
"type": "keyword"
},
"version": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
"process": {
"properties": {
"args": {
Expand Down

0 comments on commit e17097a

Please sign in to comment.