grafana/pkg/tsdb/elasticsearch/testdata_response/raw_data.response.json
Ivana Huckova 89b3663a23
Elasticsearch: Add processing for raw data to backend (#63208)
* WIP

* WIP

* Refactor

* Add tests

* Cleanup

* Fix whitespace

* Fix test and lint

* In snapshot tests update counter to be number

* Add boolean value for snapshot testing

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Update pkg/tsdb/elasticsearch/response_parser.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Use generic to reuse logic when creating fields

* Use nullable fields

* Fix lint

* WIP (#63272)

wip

* Fix snapshot test after we changed field types to nullable

---------

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-02-22 13:28:43 +01:00

209 lines
5.4 KiB
JSON

{
"took": 6,
"responses": [
{
"took": 6,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 81,
"relation": "eq"
},
"max_score": null,
"hits": [
{
"_index": "logs-2023.02.09",
"_id": "g2aeNoYB7vaC3bq-ezfK",
"_score": null,
"_source": {
"abc": null,
"is_true": true,
"@timestamp": "2023-02-09T14:40:01.475Z",
"line": "log text [106619125]",
"counter": 81,
"float": 10.911972180833306,
"label": "val3",
"level": "info",
"location": "-42.73465234425797, -14.097854057104112",
"shapes": [
{
"type": "triangle"
},
{
"type": "triangle"
},
{
"type": "triangle"
},
{
"type": "square"
}
],
"nested_field": {
"internal": {
"nested": "value1"
}
}
},
"sort": [
1675953601475,
4
]
},
{
"_index": "logs-2023.02.09",
"_id": "gmaeNoYB7vaC3bq-eDcN",
"_score": null,
"_source": {
"abc": null,
"is_true": false,
"@timestamp": "2023-02-09T14:40:00.513Z",
"line": "log text with [781660944]",
"counter": 80,
"float": 62.94120607636795,
"label": "val3",
"level": "error",
"location": "42.07571917624318, 15.95725088484611",
"shapes": [
{
"type": "triangle"
},
{
"type": "square"
}
],
"nested_field": {
"internal": {
"nested": "value2"
}
}
},
"sort": [
1675953600513,
7
]
},
{
"_index": "logs-2023.02.09",
"_id": "gWaeNoYB7vaC3bq-dDdL",
"_score": null,
"_source": {
"abc": "def",
"is_true": true,
"@timestamp": "2023-02-09T14:39:59.556Z",
"line": "log text [894867430]",
"counter": 79,
"float": 53.323706427230455,
"label": "val1",
"level": "info",
"location": "-38.27341566189766, -23.66739642570781",
"shapes": [
{
"type": "triangle"
},
{
"type": "square"
}
],
"nested_field": {
"internal": {
"nested": "value3"
}
}
},
"sort": [
1675953599556,
10
]
},
{
"_index": "logs-2023.02.09",
"_id": "gGaeNoYB7vaC3bq-cDeY",
"_score": null,
"_source": {
"abc": "def",
"is_true": false,
"@timestamp": "2023-02-09T14:39:58.608Z",
"line": "log text [478598889]",
"counter": 78,
"float": 82.72012623471589,
"label": "val1",
"level": "info",
"location": "12.373240290451287, 43.265493464362024",
"shapes": [
{
"type": "triangle"
},
{
"type": "triangle"
},
{
"type": "triangle"
},
{
"type": "square"
}
],
"nested_field": {
"internal": {
"nested": "value4"
}
}
},
"sort": [
1675953598608,
15
]
},
{
"_index": "logs-2023.02.09",
"_id": "f2aeNoYB7vaC3bq-bDf7",
"_score": null,
"_source": {
"abc": "def",
"is_true": false,
"@timestamp": "2023-02-09T14:39:57.665Z",
"line": "log text [526995818]",
"counter": 77,
"float": 35.05784443331803,
"label": "val3",
"level": "info",
"location": "-31.524344042228194, -32.11254790120572",
"shapes": [
{
"type": "triangle"
},
{
"type": "triangle"
},
{
"type": "triangle"
},
{
"type": "square"
}
],
"nested_field": {
"internal": {
"nested": "value5"
}
}
},
"sort": [
1675953597665,
20
]
}
]
},
"status": 200
}
]
}