forked from elastic/elastic-package
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: geo_points can be imported from ECS (elastic#476)
- Loading branch information
Showing
13 changed files
with
132 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dependencies: | ||
ecs: | ||
reference: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Fields Tests | ||
|
||
{{event "first"}} | ||
|
||
{{fields "first"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# newer versions go on top | ||
- version: "0.0.1" | ||
changes: | ||
- description: Initial draft of the package | ||
type: enhancement | ||
link: https://github.com/elastic/integrations/pull/0 # FIXME Replace with the real PR link |
7 changes: 7 additions & 0 deletions
7
test/packages/fields_tests/data_stream/first/agent/stream/stream.yml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
paths: | ||
{{#each paths as |path i|}} | ||
- {{path}} | ||
{{/each}} | ||
exclude_files: [".gz$"] | ||
processors: | ||
- add_locale: ~ |
10 changes: 10 additions & 0 deletions
10
test/packages/fields_tests/data_stream/first/elasticsearch/ingest_pipeline/default.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
description: Pipeline for processing sample logs | ||
processors: | ||
- set: | ||
field: sample_field | ||
value: "1" | ||
on_failure: | ||
- set: | ||
field: error.message | ||
value: '{{ _ingest.on_failure_message }}' |
12 changes: 12 additions & 0 deletions
12
test/packages/fields_tests/data_stream/first/fields/base-fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- name: data_stream.type | ||
type: constant_keyword | ||
description: Data stream type. | ||
- name: data_stream.dataset | ||
type: constant_keyword | ||
description: Data stream dataset. | ||
- name: data_stream.namespace | ||
type: constant_keyword | ||
description: Data stream namespace. | ||
- name: '@timestamp' | ||
type: date | ||
description: Event timestamp. |
6 changes: 6 additions & 0 deletions
6
test/packages/fields_tests/data_stream/first/fields/geo-fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- name: destination.geo.location | ||
external: ecs | ||
- name: geo.location | ||
external: ecs | ||
- name: source.geo.location | ||
external: ecs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
title: "First" | ||
type: logs | ||
streams: | ||
- input: logfile | ||
title: Sample logs | ||
description: Collect sample logs | ||
vars: | ||
- name: paths | ||
type: text | ||
title: Paths | ||
multi: true | ||
default: | ||
- /var/log/*.log |
8 changes: 8 additions & 0 deletions
8
test/packages/fields_tests/data_stream/first/sample_event.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"source.geo.location": { | ||
"lat": 1.0, | ||
"lon": "2.0" | ||
}, | ||
"geo.location.lat": 3.0, | ||
"geo.location.lon": 4.0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Fields Tests | ||
|
||
An example event for `first` looks as following: | ||
|
||
```json | ||
{ | ||
"source.geo.location": { | ||
"lat": 1.0, | ||
"lon": "2.0" | ||
}, | ||
"geo.location.lat": 3.0, | ||
"geo.location.lon": 4.0 | ||
} | ||
``` | ||
|
||
**Exported fields** | ||
|
||
| Field | Description | Type | | ||
|---|---|---| | ||
| @timestamp | Event timestamp. | date | | ||
| data_stream.dataset | Data stream dataset. | constant_keyword | | ||
| data_stream.namespace | Data stream namespace. | constant_keyword | | ||
| data_stream.type | Data stream type. | constant_keyword | | ||
| destination.geo.location | Longitude and latitude. | geo_point | | ||
| geo.location | Longitude and latitude. | geo_point | | ||
| source.geo.location | Longitude and latitude. | geo_point | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
format_version: 1.0.0 | ||
name: fields_tests | ||
title: "Fields Tests" | ||
version: 0.0.1 | ||
license: basic | ||
description: "These are tests of field validation." | ||
type: integration | ||
categories: | ||
- custom | ||
release: experimental | ||
conditions: | ||
kibana.version: "^7.15.0" | ||
policy_templates: | ||
- name: sample | ||
title: Sample logs | ||
description: Collect sample logs | ||
inputs: | ||
- type: logfile | ||
title: Collect sample logs from instances | ||
description: Collecting sample logs | ||
owner: | ||
github: elastic/integrations |