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

Backport #425 to 1.0: Specify static output format for event.duration #432

Merged
merged 1 commit into from
Apr 16, 2019
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
4 changes: 4 additions & 0 deletions generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@
- name: duration
level: core
type: long
format: duration
input_format: nanoseconds
output_format: asMilliseconds
output_precision: 1
description: 'Duration of the event in nanoseconds.

If event.start and event.end are known this value should be the difference
Expand Down
4 changes: 4 additions & 0 deletions generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -793,9 +793,13 @@ 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
order: 11
output_format: asMilliseconds
output_precision: 1
short: Duration of the event in nanoseconds.
type: long
event.end:
Expand Down
4 changes: 4 additions & 0 deletions generated/ecs/ecs_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,13 @@ 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
order: 11
output_format: asMilliseconds
output_precision: 1
short: Duration of the event in nanoseconds.
type: long
end:
Expand Down
4 changes: 4 additions & 0 deletions schemas/event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
- name: duration
level: core
type: long
format: duration
input_format: nanoseconds
output_format: asMilliseconds
output_precision: 1
short: Duration of the event in nanoseconds.
description: >
Duration of the event in nanoseconds.
Expand Down
4 changes: 2 additions & 2 deletions scripts/generators/beats.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def generate(ecs_nested, ecs_version):

def fieldset_field_array(source_fields):
allowed_keys = ['name', 'level', 'required', 'type', 'object_type',
'ignore_above', 'multi_fields', 'format',
'description', 'example']
'ignore_above', 'multi_fields', 'format', 'input_format',
'output_format', 'output_precision', 'description', 'example']
fields = []
for nested_field_name in source_fields:
ecs_field = source_fields[nested_field_name]
Expand Down