mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
elasticsearch: backend: better timestamp parsing (#64681)
* elasticsearch: backend: better timestamp parsing * refactor
This commit is contained in:
@@ -9,15 +9,15 @@
|
||||
// }
|
||||
// Name: Average counter
|
||||
// Dimensions: 2 Fields by 3 Rows
|
||||
// +-------------------------------+------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+------------------+
|
||||
// | 2023-03-17 13:53:00 +0000 UTC | 39.5 |
|
||||
// | 2023-03-17 13:54:00 +0000 UTC | 78.5 |
|
||||
// | 2023-03-17 13:55:00 +0000 UTC | 143.5 |
|
||||
// +-------------------------------+------------------+
|
||||
// +-----------------------------------+------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+------------------+
|
||||
// | 2023-03-17 13:53:00.123 +0000 UTC | 39.5 |
|
||||
// | 2023-03-17 13:54:00.123 +0000 UTC | 78.5 |
|
||||
// | 2023-03-17 13:55:00.123 +0000 UTC | 143.5 |
|
||||
// +-----------------------------------+------------------+
|
||||
//
|
||||
//
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
@@ -56,9 +56,9 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1679061180000,
|
||||
1679061240000,
|
||||
1679061300000
|
||||
1679061180123,
|
||||
1679061240123,
|
||||
1679061300123
|
||||
],
|
||||
[
|
||||
39.5,
|
||||
|
||||
@@ -22,24 +22,24 @@
|
||||
"2": {
|
||||
"buckets": [
|
||||
{
|
||||
"key_as_string": "1679061180000",
|
||||
"key": 1679061180000,
|
||||
"key_as_string": "1679061180123",
|
||||
"key": 1679061180123,
|
||||
"doc_count": 12,
|
||||
"1": {
|
||||
"value": 39.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string": "1679061240000",
|
||||
"key": 1679061240000,
|
||||
"key_as_string": "1679061240123",
|
||||
"key": 1679061240123,
|
||||
"doc_count": 66,
|
||||
"1": {
|
||||
"value": 78.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string": "1679061300000",
|
||||
"key": 1679061300000,
|
||||
"key_as_string": "1679061300123",
|
||||
"key": 1679061300123,
|
||||
"doc_count": 64,
|
||||
"1": {
|
||||
"value": 143.5
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
// }
|
||||
// Name: Std Dev Lower counter
|
||||
// Dimensions: 2 Fields by 3 Rows
|
||||
// +-------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+--------------------+
|
||||
// | 2023-03-17 13:53:00 +0000 UTC | 32.59589494093068 |
|
||||
// | 2023-03-17 13:54:00 +0000 UTC | 40.39925635021454 |
|
||||
// | 2023-03-17 13:55:00 +0000 UTC | 106.55409359617767 |
|
||||
// +-------------------------------+--------------------+
|
||||
// +-----------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+--------------------+
|
||||
// | 2023-03-17 13:53:00.123 +0000 UTC | 32.59589494093068 |
|
||||
// | 2023-03-17 13:54:00.123 +0000 UTC | 40.39925635021454 |
|
||||
// | 2023-03-17 13:55:00.123 +0000 UTC | 106.55409359617767 |
|
||||
// +-----------------------------------+--------------------+
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -30,15 +30,15 @@
|
||||
// }
|
||||
// Name: Std Dev Upper counter
|
||||
// Dimensions: 2 Fields by 3 Rows
|
||||
// +-------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+--------------------+
|
||||
// | 2023-03-17 13:53:00 +0000 UTC | 46.40410505906932 |
|
||||
// | 2023-03-17 13:54:00 +0000 UTC | 116.60074364978546 |
|
||||
// | 2023-03-17 13:55:00 +0000 UTC | 180.44590640382233 |
|
||||
// +-------------------------------+--------------------+
|
||||
// +-----------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+--------------------+
|
||||
// | 2023-03-17 13:53:00.123 +0000 UTC | 46.40410505906932 |
|
||||
// | 2023-03-17 13:54:00.123 +0000 UTC | 116.60074364978546 |
|
||||
// | 2023-03-17 13:55:00.123 +0000 UTC | 180.44590640382233 |
|
||||
// +-----------------------------------+--------------------+
|
||||
//
|
||||
//
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
@@ -77,9 +77,9 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1679061180000,
|
||||
1679061240000,
|
||||
1679061300000
|
||||
1679061180123,
|
||||
1679061240123,
|
||||
1679061300123
|
||||
],
|
||||
[
|
||||
32.59589494093068,
|
||||
@@ -121,9 +121,9 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1679061180000,
|
||||
1679061240000,
|
||||
1679061300000
|
||||
1679061180123,
|
||||
1679061240123,
|
||||
1679061300123
|
||||
],
|
||||
[
|
||||
46.40410505906932,
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
"2": {
|
||||
"buckets": [
|
||||
{
|
||||
"key_as_string": "1679061180000",
|
||||
"key": 1679061180000,
|
||||
"key_as_string": "1679061180123",
|
||||
"key": 1679061180123,
|
||||
"doc_count": 12,
|
||||
"1": {
|
||||
"count": 12,
|
||||
@@ -49,8 +49,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string": "1679061240000",
|
||||
"key": 1679061240000,
|
||||
"key_as_string": "1679061240123",
|
||||
"key": 1679061240123,
|
||||
"doc_count": 66,
|
||||
"1": {
|
||||
"count": 66,
|
||||
@@ -76,8 +76,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string": "1679061300000",
|
||||
"key": 1679061300000,
|
||||
"key_as_string": "1679061300123",
|
||||
"key": 1679061300123,
|
||||
"doc_count": 64,
|
||||
"1": {
|
||||
"count": 64,
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
// }
|
||||
// Name: p25.0 counter
|
||||
// Dimensions: 2 Fields by 3 Rows
|
||||
// +-------------------------------+------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+------------------+
|
||||
// | 2023-03-17 13:53:00 +0000 UTC | 36.5 |
|
||||
// | 2023-03-17 13:54:00 +0000 UTC | 62 |
|
||||
// | 2023-03-17 13:55:00 +0000 UTC | 127.5 |
|
||||
// +-------------------------------+------------------+
|
||||
// +-----------------------------------+------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+------------------+
|
||||
// | 2023-03-17 13:53:00.123 +0000 UTC | 36.5 |
|
||||
// | 2023-03-17 13:54:00.123 +0000 UTC | 62 |
|
||||
// | 2023-03-17 13:55:00.123 +0000 UTC | 127.5 |
|
||||
// +-----------------------------------+------------------+
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -30,15 +30,15 @@
|
||||
// }
|
||||
// Name: p75.0 counter
|
||||
// Dimensions: 2 Fields by 3 Rows
|
||||
// +-------------------------------+------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+------------------+
|
||||
// | 2023-03-17 13:53:00 +0000 UTC | 42.5 |
|
||||
// | 2023-03-17 13:54:00 +0000 UTC | 95 |
|
||||
// | 2023-03-17 13:55:00 +0000 UTC | 159.5 |
|
||||
// +-------------------------------+------------------+
|
||||
// +-----------------------------------+------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+------------------+
|
||||
// | 2023-03-17 13:53:00.123 +0000 UTC | 42.5 |
|
||||
// | 2023-03-17 13:54:00.123 +0000 UTC | 95 |
|
||||
// | 2023-03-17 13:55:00.123 +0000 UTC | 159.5 |
|
||||
// +-----------------------------------+------------------+
|
||||
//
|
||||
//
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
@@ -77,9 +77,9 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1679061180000,
|
||||
1679061240000,
|
||||
1679061300000
|
||||
1679061180123,
|
||||
1679061240123,
|
||||
1679061300123
|
||||
],
|
||||
[
|
||||
36.5,
|
||||
@@ -121,9 +121,9 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1679061180000,
|
||||
1679061240000,
|
||||
1679061300000
|
||||
1679061180123,
|
||||
1679061240123,
|
||||
1679061300123
|
||||
],
|
||||
[
|
||||
42.5,
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
"2": {
|
||||
"buckets": [
|
||||
{
|
||||
"key_as_string": "1679061180000",
|
||||
"key": 1679061180000,
|
||||
"key_as_string": "1679061180123",
|
||||
"key": 1679061180123,
|
||||
"doc_count": 12,
|
||||
"1": {
|
||||
"values": {
|
||||
@@ -33,8 +33,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string": "1679061240000",
|
||||
"key": 1679061240000,
|
||||
"key_as_string": "1679061240123",
|
||||
"key": 1679061240123,
|
||||
"doc_count": 66,
|
||||
"1": {
|
||||
"values": {
|
||||
@@ -44,8 +44,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string": "1679061300000",
|
||||
"key": 1679061300000,
|
||||
"key_as_string": "1679061300123",
|
||||
"key": 1679061300123,
|
||||
"doc_count": 64,
|
||||
"1": {
|
||||
"values": {
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
// }
|
||||
// Name: val3
|
||||
// Dimensions: 2 Fields by 4 Rows
|
||||
// +-------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: label=val3 |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+--------------------+
|
||||
// | 2022-11-14 10:40:00 +0000 UTC | 0 |
|
||||
// | 2022-11-14 10:41:00 +0000 UTC | 27 |
|
||||
// | 2022-11-14 10:42:00 +0000 UTC | 21 |
|
||||
// | 2022-11-14 10:43:00 +0000 UTC | 31 |
|
||||
// +-------------------------------+--------------------+
|
||||
// +-----------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: label=val3 |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+--------------------+
|
||||
// | 2022-11-14 10:40:00.123 +0000 UTC | 0 |
|
||||
// | 2022-11-14 10:41:00.123 +0000 UTC | 27 |
|
||||
// | 2022-11-14 10:42:00.123 +0000 UTC | 21 |
|
||||
// | 2022-11-14 10:43:00.123 +0000 UTC | 31 |
|
||||
// +-----------------------------------+--------------------+
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -31,16 +31,16 @@
|
||||
// }
|
||||
// Name: val2
|
||||
// Dimensions: 2 Fields by 4 Rows
|
||||
// +-------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: label=val2 |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+--------------------+
|
||||
// | 2022-11-14 10:40:00 +0000 UTC | 0 |
|
||||
// | 2022-11-14 10:41:00 +0000 UTC | 28 |
|
||||
// | 2022-11-14 10:42:00 +0000 UTC | 22 |
|
||||
// | 2022-11-14 10:43:00 +0000 UTC | 39 |
|
||||
// +-------------------------------+--------------------+
|
||||
// +-----------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: label=val2 |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+--------------------+
|
||||
// | 2022-11-14 10:40:00.123 +0000 UTC | 0 |
|
||||
// | 2022-11-14 10:41:00.123 +0000 UTC | 28 |
|
||||
// | 2022-11-14 10:42:00.123 +0000 UTC | 22 |
|
||||
// | 2022-11-14 10:43:00.123 +0000 UTC | 39 |
|
||||
// +-----------------------------------+--------------------+
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -53,16 +53,16 @@
|
||||
// }
|
||||
// Name: val1
|
||||
// Dimensions: 2 Fields by 4 Rows
|
||||
// +-------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: label=val1 |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+--------------------+
|
||||
// | 2022-11-14 10:40:00 +0000 UTC | 0 |
|
||||
// | 2022-11-14 10:41:00 +0000 UTC | 26 |
|
||||
// | 2022-11-14 10:42:00 +0000 UTC | 20 |
|
||||
// | 2022-11-14 10:43:00 +0000 UTC | 41 |
|
||||
// +-------------------------------+--------------------+
|
||||
// +-----------------------------------+--------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: label=val1 |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+--------------------+
|
||||
// | 2022-11-14 10:40:00.123 +0000 UTC | 0 |
|
||||
// | 2022-11-14 10:41:00.123 +0000 UTC | 26 |
|
||||
// | 2022-11-14 10:42:00.123 +0000 UTC | 20 |
|
||||
// | 2022-11-14 10:43:00.123 +0000 UTC | 41 |
|
||||
// +-----------------------------------+--------------------+
|
||||
//
|
||||
//
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
@@ -103,10 +103,10 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1668422400000,
|
||||
1668422460000,
|
||||
1668422520000,
|
||||
1668422580000
|
||||
1668422400123,
|
||||
1668422460123,
|
||||
1668422520123,
|
||||
1668422580123
|
||||
],
|
||||
[
|
||||
0,
|
||||
@@ -151,10 +151,10 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1668422400000,
|
||||
1668422460000,
|
||||
1668422520000,
|
||||
1668422580000
|
||||
1668422400123,
|
||||
1668422460123,
|
||||
1668422520123,
|
||||
1668422580123
|
||||
],
|
||||
[
|
||||
0,
|
||||
@@ -199,10 +199,10 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1668422400000,
|
||||
1668422460000,
|
||||
1668422520000,
|
||||
1668422580000
|
||||
1668422400123,
|
||||
1668422460123,
|
||||
1668422520123,
|
||||
1668422580123
|
||||
],
|
||||
[
|
||||
0,
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
"doc_count": 79,
|
||||
"2": {
|
||||
"buckets": [
|
||||
{ "key_as_string": "1668422400000", "key": 1668422400000, "doc_count": 0 },
|
||||
{ "key_as_string": "1668422460000", "key": 1668422460000, "doc_count": 27 },
|
||||
{ "key_as_string": "1668422520000", "key": 1668422520000, "doc_count": 21 },
|
||||
{ "key_as_string": "1668422580000", "key": 1668422580000, "doc_count": 31 }
|
||||
{ "key_as_string": "1668422400123", "key": 1668422400123, "doc_count": 0 },
|
||||
{ "key_as_string": "1668422460123", "key": 1668422460123, "doc_count": 27 },
|
||||
{ "key_as_string": "1668422520123", "key": 1668422520123, "doc_count": 21 },
|
||||
{ "key_as_string": "1668422580123", "key": 1668422580123, "doc_count": 31 }
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -28,10 +28,10 @@
|
||||
"doc_count": 89,
|
||||
"2": {
|
||||
"buckets": [
|
||||
{ "key_as_string": "1668422400000", "key": 1668422400000, "doc_count": 0 },
|
||||
{ "key_as_string": "1668422460000", "key": 1668422460000, "doc_count": 28 },
|
||||
{ "key_as_string": "1668422520000", "key": 1668422520000, "doc_count": 22 },
|
||||
{ "key_as_string": "1668422580000", "key": 1668422580000, "doc_count": 39 }
|
||||
{ "key_as_string": "1668422400123", "key": 1668422400123, "doc_count": 0 },
|
||||
{ "key_as_string": "1668422460123", "key": 1668422460123, "doc_count": 28 },
|
||||
{ "key_as_string": "1668422520123", "key": 1668422520123, "doc_count": 22 },
|
||||
{ "key_as_string": "1668422580123", "key": 1668422580123, "doc_count": 39 }
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -40,10 +40,10 @@
|
||||
"doc_count": 87,
|
||||
"2": {
|
||||
"buckets": [
|
||||
{ "key_as_string": "1668422400000", "key": 1668422400000, "doc_count": 0 },
|
||||
{ "key_as_string": "1668422460000", "key": 1668422460000, "doc_count": 26 },
|
||||
{ "key_as_string": "1668422520000", "key": 1668422520000, "doc_count": 20 },
|
||||
{ "key_as_string": "1668422580000", "key": 1668422580000, "doc_count": 41 }
|
||||
{ "key_as_string": "1668422400123", "key": 1668422400123, "doc_count": 0 },
|
||||
{ "key_as_string": "1668422460123", "key": 1668422460123, "doc_count": 26 },
|
||||
{ "key_as_string": "1668422520123", "key": 1668422520123, "doc_count": 20 },
|
||||
{ "key_as_string": "1668422580123", "key": 1668422580123, "doc_count": 41 }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
// }
|
||||
// Name: Top Metrics float
|
||||
// Dimensions: 2 Fields by 3 Rows
|
||||
// +-------------------------------+-------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-------------------------------+-------------------+
|
||||
// | 2023-03-17 13:53:00 +0000 UTC | 97.16779327392578 |
|
||||
// | 2023-03-17 13:54:00 +0000 UTC | 99.32247161865234 |
|
||||
// | 2023-03-17 13:55:00 +0000 UTC | 98.62533569335938 |
|
||||
// +-------------------------------+-------------------+
|
||||
// +-----------------------------------+-------------------+
|
||||
// | Name: Time | Name: Value |
|
||||
// | Labels: | Labels: |
|
||||
// | Type: []time.Time | Type: []*float64 |
|
||||
// +-----------------------------------+-------------------+
|
||||
// | 2023-03-17 13:53:00.123 +0000 UTC | 97.16779327392578 |
|
||||
// | 2023-03-17 13:54:00.123 +0000 UTC | 99.32247161865234 |
|
||||
// | 2023-03-17 13:55:00.123 +0000 UTC | 98.62533569335938 |
|
||||
// +-----------------------------------+-------------------+
|
||||
//
|
||||
//
|
||||
// 🌟 This was machine generated. Do not edit. 🌟
|
||||
@@ -56,9 +56,9 @@
|
||||
"data": {
|
||||
"values": [
|
||||
[
|
||||
1679061180000,
|
||||
1679061240000,
|
||||
1679061300000
|
||||
1679061180123,
|
||||
1679061240123,
|
||||
1679061300123
|
||||
],
|
||||
[
|
||||
97.16779327392578,
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
"2": {
|
||||
"buckets": [
|
||||
{
|
||||
"key_as_string": "1679061180000",
|
||||
"key": 1679061180000,
|
||||
"key_as_string": "1679061180123",
|
||||
"key": 1679061180123,
|
||||
"doc_count": 12,
|
||||
"1": {
|
||||
"top": [
|
||||
@@ -39,8 +39,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string": "1679061240000",
|
||||
"key": 1679061240000,
|
||||
"key_as_string": "1679061240123",
|
||||
"key": 1679061240123,
|
||||
"doc_count": 66,
|
||||
"1": {
|
||||
"top": [
|
||||
@@ -56,8 +56,8 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"key_as_string": "1679061300000",
|
||||
"key": 1679061300000,
|
||||
"key_as_string": "1679061300123",
|
||||
"key": 1679061300123,
|
||||
"doc_count": 64,
|
||||
"1": {
|
||||
"top": [
|
||||
|
||||
Reference in New Issue
Block a user