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:
@@ -409,178 +409,248 @@ func newTimeSeriesFrame(timeData []time.Time, tags map[string]string, values []*
|
||||
return frame
|
||||
}
|
||||
|
||||
func processCountMetric(buckets []*simplejson.Json, props map[string]string) (data.Frames, error) {
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(buckets))
|
||||
values := make([]*float64, 0, len(buckets))
|
||||
|
||||
for _, bucket := range buckets {
|
||||
value := castToFloat(bucket.Get("doc_count"))
|
||||
timeValue, err := getAsTime(bucket.Get("key"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
timeVector = append(timeVector, timeValue)
|
||||
values = append(values, value)
|
||||
}
|
||||
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
tags["metric"] = countType
|
||||
return data.Frames{newTimeSeriesFrame(timeVector, tags, values)}, nil
|
||||
}
|
||||
|
||||
func processPercentilesMetric(metric *MetricAgg, buckets []*simplejson.Json, props map[string]string) (data.Frames, error) {
|
||||
if len(buckets) == 0 {
|
||||
return data.Frames{}, nil
|
||||
}
|
||||
|
||||
firstBucket := buckets[0]
|
||||
percentiles := firstBucket.GetPath(metric.ID, "values").MustMap()
|
||||
|
||||
percentileKeys := make([]string, 0)
|
||||
for k := range percentiles {
|
||||
percentileKeys = append(percentileKeys, k)
|
||||
}
|
||||
sort.Strings(percentileKeys)
|
||||
|
||||
frames := data.Frames{}
|
||||
|
||||
for _, percentileName := range percentileKeys {
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(buckets))
|
||||
values := make([]*float64, 0, len(buckets))
|
||||
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
tags["metric"] = "p" + percentileName
|
||||
tags["field"] = metric.Field
|
||||
for _, bucket := range buckets {
|
||||
value := castToFloat(bucket.GetPath(metric.ID, "values", percentileName))
|
||||
key := bucket.Get("key")
|
||||
timeValue, err := getAsTime(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
timeVector = append(timeVector, timeValue)
|
||||
values = append(values, value)
|
||||
}
|
||||
frames = append(frames, newTimeSeriesFrame(timeVector, tags, values))
|
||||
}
|
||||
|
||||
return frames, nil
|
||||
}
|
||||
|
||||
func processTopMetricsMetric(metric *MetricAgg, buckets []*simplejson.Json, props map[string]string) (data.Frames, error) {
|
||||
metrics := metric.Settings.Get("metrics").MustArray()
|
||||
|
||||
frames := data.Frames{}
|
||||
|
||||
for _, metricField := range metrics {
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(buckets))
|
||||
values := make([]*float64, 0, len(buckets))
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
|
||||
tags["field"] = metricField.(string)
|
||||
tags["metric"] = "top_metrics"
|
||||
|
||||
for _, bucket := range buckets {
|
||||
stats := bucket.GetPath(metric.ID, "top")
|
||||
timeValue, err := getAsTime(bucket.Get("key"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
timeVector = append(timeVector, timeValue)
|
||||
|
||||
for _, stat := range stats.MustArray() {
|
||||
stat := stat.(map[string]interface{})
|
||||
|
||||
metrics, hasMetrics := stat["metrics"]
|
||||
if hasMetrics {
|
||||
metrics := metrics.(map[string]interface{})
|
||||
metricValue, hasMetricValue := metrics[metricField.(string)]
|
||||
|
||||
if hasMetricValue && metricValue != nil {
|
||||
v := metricValue.(float64)
|
||||
values = append(values, &v)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
frames = append(frames, newTimeSeriesFrame(timeVector, tags, values))
|
||||
}
|
||||
|
||||
return frames, nil
|
||||
}
|
||||
|
||||
func processExtendedStatsMetric(metric *MetricAgg, buckets []*simplejson.Json, props map[string]string) (data.Frames, error) {
|
||||
metaKeys := make([]string, 0)
|
||||
meta := metric.Meta.MustMap()
|
||||
for k := range meta {
|
||||
metaKeys = append(metaKeys, k)
|
||||
}
|
||||
sort.Strings(metaKeys)
|
||||
|
||||
frames := data.Frames{}
|
||||
|
||||
for _, statName := range metaKeys {
|
||||
v := meta[statName]
|
||||
if enabled, ok := v.(bool); !ok || !enabled {
|
||||
continue
|
||||
}
|
||||
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(buckets))
|
||||
values := make([]*float64, 0, len(buckets))
|
||||
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
tags["metric"] = statName
|
||||
tags["field"] = metric.Field
|
||||
|
||||
for _, bucket := range buckets {
|
||||
timeValue, err := getAsTime(bucket.Get("key"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var value *float64
|
||||
switch statName {
|
||||
case "std_deviation_bounds_upper":
|
||||
value = castToFloat(bucket.GetPath(metric.ID, "std_deviation_bounds", "upper"))
|
||||
case "std_deviation_bounds_lower":
|
||||
value = castToFloat(bucket.GetPath(metric.ID, "std_deviation_bounds", "lower"))
|
||||
default:
|
||||
value = castToFloat(bucket.GetPath(metric.ID, statName))
|
||||
}
|
||||
timeVector = append(timeVector, timeValue)
|
||||
values = append(values, value)
|
||||
}
|
||||
labels := tags
|
||||
frames = append(frames, newTimeSeriesFrame(timeVector, labels, values))
|
||||
}
|
||||
|
||||
return frames, nil
|
||||
}
|
||||
|
||||
func processDefaultMetric(metric *MetricAgg, buckets []*simplejson.Json, props map[string]string) (data.Frames, error) {
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(buckets))
|
||||
values := make([]*float64, 0, len(buckets))
|
||||
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
|
||||
tags["metric"] = metric.Type
|
||||
tags["field"] = metric.Field
|
||||
tags["metricId"] = metric.ID
|
||||
for _, bucket := range buckets {
|
||||
timeValue, err := getAsTime(bucket.Get("key"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
valueObj, err := bucket.Get(metric.ID).Map()
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
var value *float64
|
||||
if _, ok := valueObj["normalized_value"]; ok {
|
||||
value = castToFloat(bucket.GetPath(metric.ID, "normalized_value"))
|
||||
} else {
|
||||
value = castToFloat(bucket.GetPath(metric.ID, "value"))
|
||||
}
|
||||
timeVector = append(timeVector, timeValue)
|
||||
values = append(values, value)
|
||||
}
|
||||
return data.Frames{newTimeSeriesFrame(timeVector, tags, values)}, nil
|
||||
}
|
||||
|
||||
// nolint:gocyclo
|
||||
func processMetrics(esAgg *simplejson.Json, target *Query, query *backend.DataResponse,
|
||||
props map[string]string) error {
|
||||
frames := data.Frames{}
|
||||
esAggBuckets := esAgg.Get("buckets").MustArray()
|
||||
|
||||
jsonBuckets := make([]*simplejson.Json, len(esAggBuckets))
|
||||
|
||||
for i, v := range esAggBuckets {
|
||||
jsonBuckets[i] = simplejson.NewFromAny(v)
|
||||
}
|
||||
|
||||
for _, metric := range target.Metrics {
|
||||
if metric.Hide {
|
||||
continue
|
||||
}
|
||||
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(esAggBuckets))
|
||||
values := make([]*float64, 0, len(esAggBuckets))
|
||||
|
||||
switch metric.Type {
|
||||
case countType:
|
||||
for _, v := range esAggBuckets {
|
||||
bucket := simplejson.NewFromAny(v)
|
||||
value := castToFloat(bucket.Get("doc_count"))
|
||||
key := castToFloat(bucket.Get("key"))
|
||||
timeVector = append(timeVector, time.Unix(int64(*key)/1000, 0).UTC())
|
||||
values = append(values, value)
|
||||
countFrames, err := processCountMetric(jsonBuckets, props)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
tags["metric"] = countType
|
||||
frames = append(frames, newTimeSeriesFrame(timeVector, tags, values))
|
||||
frames = append(frames, countFrames...)
|
||||
case percentilesType:
|
||||
buckets := esAggBuckets
|
||||
if len(buckets) == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
firstBucket := simplejson.NewFromAny(buckets[0])
|
||||
percentiles := firstBucket.GetPath(metric.ID, "values").MustMap()
|
||||
|
||||
percentileKeys := make([]string, 0)
|
||||
for k := range percentiles {
|
||||
percentileKeys = append(percentileKeys, k)
|
||||
}
|
||||
sort.Strings(percentileKeys)
|
||||
for _, percentileName := range percentileKeys {
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(esAggBuckets))
|
||||
values := make([]*float64, 0, len(esAggBuckets))
|
||||
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
tags["metric"] = "p" + percentileName
|
||||
tags["field"] = metric.Field
|
||||
for _, v := range buckets {
|
||||
bucket := simplejson.NewFromAny(v)
|
||||
value := castToFloat(bucket.GetPath(metric.ID, "values", percentileName))
|
||||
key := castToFloat(bucket.Get("key"))
|
||||
timeVector = append(timeVector, time.Unix(int64(*key)/1000, 0).UTC())
|
||||
values = append(values, value)
|
||||
}
|
||||
frames = append(frames, newTimeSeriesFrame(timeVector, tags, values))
|
||||
percentileFrames, err := processPercentilesMetric(metric, jsonBuckets, props)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
frames = append(frames, percentileFrames...)
|
||||
case topMetricsType:
|
||||
buckets := esAggBuckets
|
||||
metrics := metric.Settings.Get("metrics").MustArray()
|
||||
|
||||
for _, metricField := range metrics {
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(esAggBuckets))
|
||||
values := make([]*float64, 0, len(esAggBuckets))
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
|
||||
tags["field"] = metricField.(string)
|
||||
tags["metric"] = "top_metrics"
|
||||
|
||||
for _, v := range buckets {
|
||||
bucket := simplejson.NewFromAny(v)
|
||||
stats := bucket.GetPath(metric.ID, "top")
|
||||
key := castToFloat(bucket.Get("key"))
|
||||
|
||||
timeVector = append(timeVector, time.Unix(int64(*key)/1000, 0).UTC())
|
||||
|
||||
for _, stat := range stats.MustArray() {
|
||||
stat := stat.(map[string]interface{})
|
||||
|
||||
metrics, hasMetrics := stat["metrics"]
|
||||
if hasMetrics {
|
||||
metrics := metrics.(map[string]interface{})
|
||||
metricValue, hasMetricValue := metrics[metricField.(string)]
|
||||
|
||||
if hasMetricValue && metricValue != nil {
|
||||
v := metricValue.(float64)
|
||||
values = append(values, &v)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
frames = append(frames, newTimeSeriesFrame(timeVector, tags, values))
|
||||
topMetricsFrames, err := processTopMetricsMetric(metric, jsonBuckets, props)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
frames = append(frames, topMetricsFrames...)
|
||||
case extendedStatsType:
|
||||
buckets := esAggBuckets
|
||||
|
||||
metaKeys := make([]string, 0)
|
||||
meta := metric.Meta.MustMap()
|
||||
for k := range meta {
|
||||
metaKeys = append(metaKeys, k)
|
||||
extendedStatsFrames, err := processExtendedStatsMetric(metric, jsonBuckets, props)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sort.Strings(metaKeys)
|
||||
for _, statName := range metaKeys {
|
||||
v := meta[statName]
|
||||
if enabled, ok := v.(bool); !ok || !enabled {
|
||||
continue
|
||||
}
|
||||
|
||||
tags := make(map[string]string, len(props))
|
||||
timeVector := make([]time.Time, 0, len(esAggBuckets))
|
||||
values := make([]*float64, 0, len(esAggBuckets))
|
||||
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
}
|
||||
tags["metric"] = statName
|
||||
tags["field"] = metric.Field
|
||||
|
||||
for _, v := range buckets {
|
||||
bucket := simplejson.NewFromAny(v)
|
||||
key := castToFloat(bucket.Get("key"))
|
||||
var value *float64
|
||||
switch statName {
|
||||
case "std_deviation_bounds_upper":
|
||||
value = castToFloat(bucket.GetPath(metric.ID, "std_deviation_bounds", "upper"))
|
||||
case "std_deviation_bounds_lower":
|
||||
value = castToFloat(bucket.GetPath(metric.ID, "std_deviation_bounds", "lower"))
|
||||
default:
|
||||
value = castToFloat(bucket.GetPath(metric.ID, statName))
|
||||
}
|
||||
timeVector = append(timeVector, time.Unix(int64(*key)/1000, 0).UTC())
|
||||
values = append(values, value)
|
||||
}
|
||||
labels := tags
|
||||
frames = append(frames, newTimeSeriesFrame(timeVector, labels, values))
|
||||
}
|
||||
frames = append(frames, extendedStatsFrames...)
|
||||
default:
|
||||
for k, v := range props {
|
||||
tags[k] = v
|
||||
defaultFrames, err := processDefaultMetric(metric, jsonBuckets, props)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tags["metric"] = metric.Type
|
||||
tags["field"] = metric.Field
|
||||
tags["metricId"] = metric.ID
|
||||
for _, v := range esAggBuckets {
|
||||
bucket := simplejson.NewFromAny(v)
|
||||
key := castToFloat(bucket.Get("key"))
|
||||
valueObj, err := bucket.Get(metric.ID).Map()
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
var value *float64
|
||||
if _, ok := valueObj["normalized_value"]; ok {
|
||||
value = castToFloat(bucket.GetPath(metric.ID, "normalized_value"))
|
||||
} else {
|
||||
value = castToFloat(bucket.GetPath(metric.ID, "value"))
|
||||
}
|
||||
timeVector = append(timeVector, time.Unix(int64(*key)/1000, 0).UTC())
|
||||
values = append(values, value)
|
||||
}
|
||||
frames = append(frames, newTimeSeriesFrame(timeVector, tags, values))
|
||||
frames = append(frames, defaultFrames...)
|
||||
}
|
||||
}
|
||||
if query.Frames != nil {
|
||||
@@ -905,6 +975,16 @@ func castToFloat(j *simplejson.Json) *float64 {
|
||||
return nil
|
||||
}
|
||||
|
||||
func getAsTime(j *simplejson.Json) (time.Time, error) {
|
||||
// these are stored as numbers
|
||||
number, err := j.Float64()
|
||||
if err != nil {
|
||||
return time.Time{}, err
|
||||
}
|
||||
|
||||
return time.UnixMilli(int64(number)).UTC(), nil
|
||||
}
|
||||
|
||||
func findAgg(target *Query, aggID string) (*BucketAgg, error) {
|
||||
for _, v := range target.BucketAggs {
|
||||
if aggID == v.ID {
|
||||
|
||||
@@ -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