Skip to content

Commit

Permalink
Define field formats that were defined in Beats but not yet in ECS. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
webmat committed Mar 15, 2019
1 parent 81aecf9 commit 7d740e3
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
It generates schema.csv, Elasticsearch 6 and 7 templates, and field documentation
for the main website. #336
* Generator for the Beats fields.ecs.yml file. #379
* Added field formats to all `.bytes` fields and `event.duration`. #385

### Improvements

Expand Down
12 changes: 11 additions & 1 deletion fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
# Metrics
- name: bytes
format: bytes
level: core
type: long
example: 184
Expand Down Expand Up @@ -377,6 +378,7 @@
# Metrics
- name: bytes
format: bytes
level: core
type: long
example: 184
Expand Down Expand Up @@ -585,6 +587,8 @@
- name: duration
level: core
type: long
format: duration
input_format: nanoseconds
short: Duration of the event in nanoseconds.
description: >
Duration of the event in nanoseconds.
Expand Down Expand Up @@ -985,32 +989,35 @@
- name: request.bytes
level: extended
type: long
format: bytes
description: >
Total size in bytes of the request (body and headers).
example: 1437

- name: request.body.bytes
level: extended
type: long
format: bytes
description: >
Size in bytes of the request body.
example: 887

- name: response.bytes
level: extended
type: long
format: bytes
description: >
Total size in bytes of the response (body and headers).
example: 1437

- name: response.body.bytes
level: extended
type: long
format: bytes
description: >
Size in bytes of the response body.
example: 887


- name: log
title: Log
description: >
Expand Down Expand Up @@ -1169,6 +1176,7 @@
- name: bytes
level: core
type: long
format: bytes
short: Total bytes transferred in both directions.
description: >
Total bytes transferred in both directions.
Expand Down Expand Up @@ -1477,6 +1485,7 @@
# Metrics
- name: bytes
format: bytes
level: core
type: long
example: 184
Expand Down Expand Up @@ -1629,6 +1638,7 @@
# Metrics
- name: bytes
format: bytes
level: core
type: long
example: 184
Expand Down
11 changes: 11 additions & 0 deletions generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
- name: bytes
level: core
type: long
format: bytes
description: Bytes sent from the client to the server.
example: 184
- name: domain
Expand Down Expand Up @@ -382,6 +383,7 @@
- name: bytes
level: core
type: long
format: bytes
description: Bytes sent from the destination to the source.
example: 184
- name: domain
Expand Down Expand Up @@ -609,6 +611,8 @@
- name: duration
level: core
type: long
format: duration
input_format: nanoseconds
description: 'Duration of the event in nanoseconds.
If event.start and event.end are known this value should be the difference
Expand Down Expand Up @@ -1075,6 +1079,7 @@
- name: request.body.bytes
level: extended
type: long
format: bytes
description: Size in bytes of the request body.
example: 887
- name: request.body.content
Expand All @@ -1086,6 +1091,7 @@
- name: request.bytes
level: extended
type: long
format: bytes
description: Total size in bytes of the request (body and headers).
example: 1437
- name: request.method
Expand All @@ -1106,6 +1112,7 @@
- name: response.body.bytes
level: extended
type: long
format: bytes
description: Size in bytes of the response body.
example: 887
- name: response.body.content
Expand All @@ -1117,6 +1124,7 @@
- name: response.bytes
level: extended
type: long
format: bytes
description: Total size in bytes of the response (body and headers).
example: 1437
- name: response.status_code
Expand Down Expand Up @@ -1185,6 +1193,7 @@
- name: bytes
level: core
type: long
format: bytes
description: 'Total bytes transferred in both directions.
If `source.bytes` and `destination.bytes` are known, `network.bytes` is their
Expand Down Expand Up @@ -1594,6 +1603,7 @@
- name: bytes
level: core
type: long
format: bytes
description: Bytes sent from the server to the client.
example: 184
- name: domain
Expand Down Expand Up @@ -1807,6 +1817,7 @@
- name: bytes
level: core
type: long
format: bytes
description: Bytes sent from the source to the destination.
example: 184
- name: domain
Expand Down
11 changes: 11 additions & 0 deletions generated/ecs/fields_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ client.bytes:
description: Bytes sent from the client to the server.
example: 184
flat_name: client.bytes
format: bytes
level: core
name: bytes
short: Bytes sent from the client to the server.
Expand Down Expand Up @@ -421,6 +422,7 @@ destination.bytes:
description: Bytes sent from the destination to the source.
example: 184
flat_name: destination.bytes
format: bytes
level: core
name: bytes
short: Bytes sent from the destination to the source.
Expand Down Expand Up @@ -722,6 +724,8 @@ event.duration:
If event.start and event.end are known this value should be the difference between
the end and start time.'
flat_name: event.duration
format: duration
input_format: nanoseconds
level: core
name: duration
short: Duration of the event in nanoseconds.
Expand Down Expand Up @@ -1365,6 +1369,7 @@ http.request.body.bytes:
description: Size in bytes of the request body.
example: 887
flat_name: http.request.body.bytes
format: bytes
level: extended
name: request.body.bytes
short: Size in bytes of the request body.
Expand All @@ -1382,6 +1387,7 @@ http.request.bytes:
description: Total size in bytes of the request (body and headers).
example: 1437
flat_name: http.request.bytes
format: bytes
level: extended
name: request.bytes
short: Total size in bytes of the request (body and headers).
Expand Down Expand Up @@ -1411,6 +1417,7 @@ http.response.body.bytes:
description: Size in bytes of the response body.
example: 887
flat_name: http.response.body.bytes
format: bytes
level: extended
name: response.body.bytes
short: Size in bytes of the response body.
Expand All @@ -1428,6 +1435,7 @@ http.response.bytes:
description: Total size in bytes of the response (body and headers).
example: 1437
flat_name: http.response.bytes
format: bytes
level: extended
name: response.bytes
short: Total size in bytes of the response (body and headers).
Expand Down Expand Up @@ -1533,6 +1541,7 @@ network.bytes:
sum.'
example: 368
flat_name: network.bytes
format: bytes
level: core
name: bytes
short: Total bytes transferred in both directions.
Expand Down Expand Up @@ -2024,6 +2033,7 @@ server.bytes:
description: Bytes sent from the server to the client.
example: 184
flat_name: server.bytes
format: bytes
level: core
name: bytes
short: Bytes sent from the server to the client.
Expand Down Expand Up @@ -2319,6 +2329,7 @@ source.bytes:
description: Bytes sent from the source to the destination.
example: 184
flat_name: source.bytes
format: bytes
level: core
name: bytes
short: Bytes sent from the source to the destination.
Expand Down
11 changes: 11 additions & 0 deletions generated/ecs/fields_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ client:
description: Bytes sent from the client to the server.
example: 184
flat_name: client.bytes
format: bytes
level: core
name: bytes
short: Bytes sent from the client to the server.
Expand Down Expand Up @@ -546,6 +547,7 @@ destination:
description: Bytes sent from the destination to the source.
example: 184
flat_name: destination.bytes
format: bytes
level: core
name: bytes
short: Bytes sent from the destination to the source.
Expand Down Expand Up @@ -886,6 +888,8 @@ event:
If event.start and event.end are known this value should be the difference
between the end and start time.'
flat_name: event.duration
format: duration
input_format: nanoseconds
level: core
name: duration
short: Duration of the event in nanoseconds.
Expand Down Expand Up @@ -1605,6 +1609,7 @@ http:
description: Size in bytes of the request body.
example: 887
flat_name: http.request.body.bytes
format: bytes
level: extended
name: request.body.bytes
short: Size in bytes of the request body.
Expand All @@ -1622,6 +1627,7 @@ http:
description: Total size in bytes of the request (body and headers).
example: 1437
flat_name: http.request.bytes
format: bytes
level: extended
name: request.bytes
short: Total size in bytes of the request (body and headers).
Expand Down Expand Up @@ -1651,6 +1657,7 @@ http:
description: Size in bytes of the response body.
example: 887
flat_name: http.response.body.bytes
format: bytes
level: extended
name: response.body.bytes
short: Size in bytes of the response body.
Expand All @@ -1668,6 +1675,7 @@ http:
description: Total size in bytes of the response (body and headers).
example: 1437
flat_name: http.response.bytes
format: bytes
level: extended
name: response.bytes
short: Total size in bytes of the response (body and headers).
Expand Down Expand Up @@ -1764,6 +1772,7 @@ network:
sum.'
example: 368
flat_name: network.bytes
format: bytes
level: core
name: bytes
short: Total bytes transferred in both directions.
Expand Down Expand Up @@ -2359,6 +2368,7 @@ server:
description: Bytes sent from the server to the client.
example: 184
flat_name: server.bytes
format: bytes
level: core
name: bytes
short: Bytes sent from the server to the client.
Expand Down Expand Up @@ -2677,6 +2687,7 @@ source:
description: Bytes sent from the source to the destination.
example: 184
flat_name: source.bytes
format: bytes
level: core
name: bytes
short: Bytes sent from the source to the destination.
Expand Down
1 change: 1 addition & 0 deletions schemas/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
# Metrics
- name: bytes
format: bytes
level: core
type: long
example: 184
Expand Down
1 change: 1 addition & 0 deletions schemas/destination.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
# Metrics
- name: bytes
format: bytes
level: core
type: long
example: 184
Expand Down
2 changes: 2 additions & 0 deletions schemas/event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
- name: duration
level: core
type: long
format: duration
input_format: nanoseconds
short: Duration of the event in nanoseconds.
description: >
Duration of the event in nanoseconds.
Expand Down
5 changes: 4 additions & 1 deletion schemas/http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,31 @@
- name: request.bytes
level: extended
type: long
format: bytes
description: >
Total size in bytes of the request (body and headers).
example: 1437

- name: request.body.bytes
level: extended
type: long
format: bytes
description: >
Size in bytes of the request body.
example: 887

- name: response.bytes
level: extended
type: long
format: bytes
description: >
Total size in bytes of the response (body and headers).
example: 1437

- name: response.body.bytes
level: extended
type: long
format: bytes
description: >
Size in bytes of the response body.
example: 887

Loading

0 comments on commit 7d740e3

Please sign in to comment.