forked from elastic/kibana
-
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.
[Lens][LogsDB] Add test suite (elastic#194031)
## Summary Test suite for LogsDB in Kibana Adding tests for the following scenarios: * [x] All Lens operations (aggs) should work fine with a LogsDB stream * Mixed index scenarios * [x] LogsDB stream (upgraded from regular stream) * [x] LogsDB stream without `host.name` field in the mapping * [x] LogsDB stream (upgraded from regular stream) + regular index * [x] LogsDB stream (upgraded from regular stream) + TSDB stream * [x] LogsDB stream (upgraded from regular stream) + another LogsDB stream * [x] LogsDB stream (upgraded from regular stream) + TSDB stream downsampled * [x] Data stream (downgraded from LogsDB stream) * [x] Data stream without `host.name` field in the mapping * [x] Data stream (downgraded from LogsDB stream) + regular index * [x] Data stream (downgraded from LogsDB stream) + TSDB stream * [x] Data stream (downgraded from LogsDB stream) + another LogsDB stream * [x] Data stream (downgraded from LogsDB stream) + TSDB stream downsampled For the mixed scenario suite the following tests are performed: * Create a date histogram vs `count(bytes)` * same test but using the `utc_time` field rather than `@timestamp` * Create a chart with an annotation layer * same test but using the `utc_time` for both data and annotation layer * use the `host.name`, `utc_time`, `@timestamp` as extra field in the annotation tooltip * Create a visualization with ES|QL using `STATS` --------- Co-authored-by: dej611 <[email protected]>
- Loading branch information
Showing
12 changed files
with
2,552 additions
and
933 deletions.
There are no files selected for viewing
Binary file added
BIN
+1.55 MB
test/functional/fixtures/es_archiver/kibana_sample_data_logs_logsdb/data.json.gz
Binary file not shown.
171 changes: 171 additions & 0 deletions
171
test/functional/fixtures/es_archiver/kibana_sample_data_logs_logsdb/mappings.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,171 @@ | ||
{ | ||
"type": "index", | ||
"value": { | ||
"aliases": {}, | ||
"index": "kibana_sample_data_logslogsdb", | ||
"mappings": { | ||
"_data_stream_timestamp": { | ||
"enabled": true | ||
}, | ||
"properties": { | ||
"@timestamp": { | ||
"type": "date" | ||
}, | ||
"agent": { | ||
"fields": { | ||
"keyword": { | ||
"ignore_above": 256, | ||
"type": "keyword" | ||
} | ||
}, | ||
"type": "text" | ||
}, | ||
"bytes": { | ||
"type": "long" | ||
}, | ||
"bytes_counter": { | ||
"time_series_metric": "counter", | ||
"type": "long" | ||
}, | ||
"bytes_gauge": { | ||
"time_series_metric": "gauge", | ||
"type": "long" | ||
}, | ||
"clientip": { | ||
"type": "ip" | ||
}, | ||
"event": { | ||
"properties": { | ||
"dataset": { | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
"extension": { | ||
"fields": { | ||
"keyword": { | ||
"ignore_above": 256, | ||
"type": "keyword" | ||
} | ||
}, | ||
"type": "text" | ||
}, | ||
"geo": { | ||
"properties": { | ||
"coordinates": { | ||
"type": "geo_point" | ||
}, | ||
"dest": { | ||
"type": "keyword" | ||
}, | ||
"src": { | ||
"type": "keyword" | ||
}, | ||
"srcdest": { | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
"host": { | ||
"properties": { | ||
"name": { | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
"index": { | ||
"fields": { | ||
"keyword": { | ||
"ignore_above": 256, | ||
"type": "keyword" | ||
} | ||
}, | ||
"type": "text" | ||
}, | ||
"ip": { | ||
"type": "ip" | ||
}, | ||
"machine": { | ||
"properties": { | ||
"os": { | ||
"fields": { | ||
"keyword": { | ||
"ignore_above": 256, | ||
"type": "keyword" | ||
} | ||
}, | ||
"type": "text" | ||
}, | ||
"ram": { | ||
"type": "long" | ||
} | ||
} | ||
}, | ||
"memory": { | ||
"type": "double" | ||
}, | ||
"message": { | ||
"fields": { | ||
"keyword": { | ||
"ignore_above": 256, | ||
"type": "keyword" | ||
} | ||
}, | ||
"type": "text" | ||
}, | ||
"phpmemory": { | ||
"type": "long" | ||
}, | ||
"referer": { | ||
"type": "keyword" | ||
}, | ||
"request": { | ||
"time_series_dimension": true, | ||
"type": "keyword" | ||
}, | ||
"response": { | ||
"fields": { | ||
"keyword": { | ||
"ignore_above": 256, | ||
"type": "keyword" | ||
} | ||
}, | ||
"type": "text" | ||
}, | ||
"tags": { | ||
"fields": { | ||
"keyword": { | ||
"ignore_above": 256, | ||
"type": "keyword" | ||
} | ||
}, | ||
"type": "text" | ||
}, | ||
"timestamp": { | ||
"path": "@timestamp", | ||
"type": "alias" | ||
}, | ||
"url": { | ||
"time_series_dimension": true, | ||
"type": "keyword" | ||
}, | ||
"utc_time": { | ||
"type": "date" | ||
} | ||
} | ||
}, | ||
"settings": { | ||
"index": { | ||
"auto_expand_replicas": "0-1", | ||
"mode": "time_series", | ||
"number_of_replicas": "0", | ||
"number_of_shards": "1", | ||
"routing_path": "request", | ||
"time_series": { | ||
"end_time": "2023-06-28T09:17:00.283Z", | ||
"start_time": "2023-03-28T09:17:00.283Z" | ||
} | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
test/functional/fixtures/kbn_archiver/kibana_sample_data_logs_logsdb.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,22 @@ | ||
{ | ||
"attributes": { | ||
"fieldFormatMap": "{\"hour_of_day\":{}}", | ||
"name": "Kibana Sample Data Logs (LogsDB)", | ||
"runtimeFieldMap": "{\"hour_of_day\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['timestamp'].value.getHour());\"}}}", | ||
"timeFieldName": "timestamp", | ||
"title": "kibana_sample_data_logslogsdb" | ||
}, | ||
"coreMigrationVersion": "8.8.0", | ||
"created_at": "2023-04-27T13:09:20.333Z", | ||
"id": "90943e30-9a47-11e8-b64d-95841ca0c247", | ||
"managed": false, | ||
"references": [], | ||
"sort": [ | ||
1682600960333, | ||
64 | ||
], | ||
"type": "index-pattern", | ||
"typeMigrationVersion": "7.11.0", | ||
"updated_at": "2023-04-27T13:09:20.333Z", | ||
"version": "WzIxLDFd" | ||
} |
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
Oops, something went wrong.