diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac500d2bd..cc8d05814 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan
### Added
+- [#45](https://github.com/kobsio/kobs/pull/45): Add value mappings for `sparkline` charts in the Prometheus plugin.
+
### Fixed
- [#43](https://github.com/kobsio/kobs/pull/43): Fix `hosts` and `gateways` list for VirtualService in the Helm chart.
diff --git a/app/src/plugins/prometheus/PrometheusChartDefault.tsx b/app/src/plugins/prometheus/PrometheusChartDefault.tsx
index cf190a3e8..bfde835c4 100644
--- a/app/src/plugins/prometheus/PrometheusChartDefault.tsx
+++ b/app/src/plugins/prometheus/PrometheusChartDefault.tsx
@@ -13,10 +13,11 @@ import {
import React, { useEffect, useRef, useState } from 'react';
import { Data, Metrics } from 'proto/prometheus_grpc_web_pb';
+import { IData, transformData } from 'plugins/prometheus/helpers';
import { formatTime } from 'utils/helpers';
interface ILabels {
- datum: Data.AsObject;
+ datum: IData;
}
export interface IPrometheusChartDefaultProps {
@@ -63,11 +64,11 @@ const PrometheusChartDefault: React.FunctionComponent ({ childName: `index${index}`, name: metric.label }));
const series = metrics.map((metric, index) =>
type === 'area' ? (
-
+
) : type === 'bar' ? (
-
+
) : (
-
+
),
);
@@ -77,7 +78,7 @@ const PrometheusChartDefault: React.FunctionComponent `${datum.y} ${unit}`}
+ labels={({ datum }: ILabels): string => (datum.y ? `${datum.y} ${unit}` : 'N/A')}
labelComponent={
{
+ for (const mapEntry of mappings) {
+ if (mapEntry[0] === value.toString()) {
+ return mapEntry[1];
+ }
+ }
+
+ return value.toString();
+};
export interface IPrometheusChartSparklineProps {
unit: string;
metrics: Metrics.AsObject[];
+ mappings: [string, string][];
}
// PrometheusChartSparkline displays a sparkline chart. The complete documentation for sparklines can be found in the
@@ -14,6 +26,7 @@ export interface IPrometheusChartSparklineProps {
const PrometheusChartSparkline: React.FunctionComponent = ({
unit,
metrics,
+ mappings,
}: IPrometheusChartSparklineProps) => {
const refChart = useRef(null);
const [width, setWidth] = useState(0);
@@ -33,16 +46,28 @@ const PrometheusChartSparkline: React.FunctionComponent 0) {
+ label = getMappingValue(metrics[0].dataList[metrics[0].dataList.length - 1].y, mappings);
+ }
+
return (
- {metrics[0].dataList[metrics[0].dataList.length - 1].y} {unit}
+ {label}
-
- {metrics.map((metric, index) => (
-
- ))}
-
+ {mappings.length === 0 ? (
+
+ {metrics.map((metric, index) => (
+
+ ))}
+
+ ) : null}
);
};
diff --git a/app/src/plugins/prometheus/PrometheusPluginChart.tsx b/app/src/plugins/prometheus/PrometheusPluginChart.tsx
index 135e0101c..e63c5077e 100644
--- a/app/src/plugins/prometheus/PrometheusPluginChart.tsx
+++ b/app/src/plugins/prometheus/PrometheusPluginChart.tsx
@@ -133,7 +133,7 @@ const PrometheusPluginChart: React.FunctionComponent{data.error}
) : chart.type === 'sparkline' ? (
-
+
) : (
)}
diff --git a/app/src/plugins/prometheus/helpers.ts b/app/src/plugins/prometheus/helpers.ts
index a958c7c2c..90a290974 100644
--- a/app/src/plugins/prometheus/helpers.ts
+++ b/app/src/plugins/prometheus/helpers.ts
@@ -1,4 +1,4 @@
-import { Chart, Query, Spec, Variable } from 'proto/prometheus_grpc_web_pb';
+import { Chart, Data, Query, Spec, Variable } from 'proto/prometheus_grpc_web_pb';
import { Plugin } from 'proto/plugins_grpc_web_pb';
// ITimes is the interface for a start and end time.
@@ -106,3 +106,17 @@ export const jsonToProto = (json: any): Plugin.AsObject | undefined => {
return plugin.toObject();
};
+
+export interface IData {
+ x: number;
+ y: number | null;
+}
+
+// transformData is used to transform the returned data from the API. This is needed because, the API returns a NaN
+// value for missing values, but Victory requires a null value.
+// See: https://formidable.com/open-source/victory/gallery/victory-line-with-null-data/
+export const transformData = (data: Data.AsObject[]): IData[] => {
+ return data.map((d) => {
+ return { x: d.x, y: isNaN(d.y) ? null : d.y };
+ });
+};
diff --git a/app/src/proto/prometheus_pb.d.ts b/app/src/proto/prometheus_pb.d.ts
index cd550368d..d70a763b6 100644
--- a/app/src/proto/prometheus_pb.d.ts
+++ b/app/src/proto/prometheus_pb.d.ts
@@ -191,6 +191,9 @@ export class Metrics extends jspb.Message {
getMax(): number;
setMax(value: number): void;
+ getAvg(): number;
+ setAvg(value: number): void;
+
clearDataList(): void;
getDataList(): Array;
setDataList(value: Array): void;
@@ -211,6 +214,7 @@ export namespace Metrics {
label: string,
min: number,
max: number,
+ avg: number,
dataList: Array,
}
}
@@ -325,6 +329,8 @@ export class Chart extends jspb.Message {
getSize(): number;
setSize(value: number): void;
+ getMappingsMap(): jspb.Map;
+ clearMappingsMap(): void;
clearQueriesList(): void;
getQueriesList(): Array;
setQueriesList(value: Array): void;
@@ -347,6 +353,7 @@ export namespace Chart {
unit: string,
stacked: boolean,
size: number,
+ mappingsMap: Array<[string, string]>,
queriesList: Array,
}
}
diff --git a/app/src/proto/prometheus_pb.js b/app/src/proto/prometheus_pb.js
index e9e90a4fb..f322275eb 100644
--- a/app/src/proto/prometheus_pb.js
+++ b/app/src/proto/prometheus_pb.js
@@ -1582,7 +1582,7 @@ proto.plugins.prometheus.MetricLookupResponse.prototype.clearNamesList = functio
* @private {!Array}
* @const
*/
-proto.plugins.prometheus.Metrics.repeatedFields_ = [4];
+proto.plugins.prometheus.Metrics.repeatedFields_ = [5];
@@ -1618,6 +1618,7 @@ proto.plugins.prometheus.Metrics.toObject = function(includeInstance, msg) {
label: jspb.Message.getFieldWithDefault(msg, 1, ""),
min: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
max: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
+ avg: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
dataList: jspb.Message.toObjectList(msg.getDataList(),
proto.plugins.prometheus.Data.toObject, includeInstance)
};
@@ -1669,6 +1670,10 @@ proto.plugins.prometheus.Metrics.deserializeBinaryFromReader = function(msg, rea
msg.setMax(value);
break;
case 4:
+ var value = /** @type {number} */ (reader.readDouble());
+ msg.setAvg(value);
+ break;
+ case 5:
var value = new proto.plugins.prometheus.Data;
reader.readMessage(value,proto.plugins.prometheus.Data.deserializeBinaryFromReader);
msg.addData(value);
@@ -1723,10 +1728,17 @@ proto.plugins.prometheus.Metrics.serializeBinaryToWriter = function(message, wri
f
);
}
+ f = message.getAvg();
+ if (f !== 0.0) {
+ writer.writeDouble(
+ 4,
+ f
+ );
+ }
f = message.getDataList();
if (f.length > 0) {
writer.writeRepeatedMessage(
- 4,
+ 5,
f,
proto.plugins.prometheus.Data.serializeBinaryToWriter
);
@@ -1789,12 +1801,30 @@ proto.plugins.prometheus.Metrics.prototype.setMax = function(value) {
/**
- * repeated Data data = 4;
+ * optional double avg = 4;
+ * @return {number}
+ */
+proto.plugins.prometheus.Metrics.prototype.getAvg = function() {
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
+};
+
+
+/**
+ * @param {number} value
+ * @return {!proto.plugins.prometheus.Metrics} returns this
+ */
+proto.plugins.prometheus.Metrics.prototype.setAvg = function(value) {
+ return jspb.Message.setProto3FloatField(this, 4, value);
+};
+
+
+/**
+ * repeated Data data = 5;
* @return {!Array}
*/
proto.plugins.prometheus.Metrics.prototype.getDataList = function() {
return /** @type{!Array} */ (
- jspb.Message.getRepeatedWrapperField(this, proto.plugins.prometheus.Data, 4));
+ jspb.Message.getRepeatedWrapperField(this, proto.plugins.prometheus.Data, 5));
};
@@ -1803,7 +1833,7 @@ proto.plugins.prometheus.Metrics.prototype.getDataList = function() {
* @return {!proto.plugins.prometheus.Metrics} returns this
*/
proto.plugins.prometheus.Metrics.prototype.setDataList = function(value) {
- return jspb.Message.setRepeatedWrapperField(this, 4, value);
+ return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
@@ -1813,7 +1843,7 @@ proto.plugins.prometheus.Metrics.prototype.setDataList = function(value) {
* @return {!proto.plugins.prometheus.Data}
*/
proto.plugins.prometheus.Metrics.prototype.addData = function(opt_value, opt_index) {
- return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.plugins.prometheus.Data, opt_index);
+ return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.plugins.prometheus.Data, opt_index);
};
@@ -2511,7 +2541,7 @@ proto.plugins.prometheus.Variable.prototype.setValue = function(value) {
* @private {!Array}
* @const
*/
-proto.plugins.prometheus.Chart.repeatedFields_ = [6];
+proto.plugins.prometheus.Chart.repeatedFields_ = [7];
@@ -2549,6 +2579,7 @@ proto.plugins.prometheus.Chart.toObject = function(includeInstance, msg) {
unit: jspb.Message.getFieldWithDefault(msg, 3, ""),
stacked: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
size: jspb.Message.getFieldWithDefault(msg, 5, 0),
+ mappingsMap: (f = msg.getMappingsMap()) ? f.toObject(includeInstance, undefined) : [],
queriesList: jspb.Message.toObjectList(msg.getQueriesList(),
proto.plugins.prometheus.Query.toObject, includeInstance)
};
@@ -2608,6 +2639,12 @@ proto.plugins.prometheus.Chart.deserializeBinaryFromReader = function(msg, reade
msg.setSize(value);
break;
case 6:
+ var value = msg.getMappingsMap();
+ reader.readMessage(value, function(message, reader) {
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
+ });
+ break;
+ case 7:
var value = new proto.plugins.prometheus.Query;
reader.readMessage(value,proto.plugins.prometheus.Query.deserializeBinaryFromReader);
msg.addQueries(value);
@@ -2676,10 +2713,14 @@ proto.plugins.prometheus.Chart.serializeBinaryToWriter = function(message, write
f
);
}
+ f = message.getMappingsMap(true);
+ if (f && f.getLength() > 0) {
+ f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
+ }
f = message.getQueriesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
- 6,
+ 7,
f,
proto.plugins.prometheus.Query.serializeBinaryToWriter
);
@@ -2778,12 +2819,34 @@ proto.plugins.prometheus.Chart.prototype.setSize = function(value) {
/**
- * repeated Query queries = 6;
+ * map mappings = 6;
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
+ * empty, instead returning `undefined`
+ * @return {!jspb.Map}
+ */
+proto.plugins.prometheus.Chart.prototype.getMappingsMap = function(opt_noLazyCreate) {
+ return /** @type {!jspb.Map} */ (
+ jspb.Message.getMapField(this, 6, opt_noLazyCreate,
+ null));
+};
+
+
+/**
+ * Clears values from the map. The map will be non-null.
+ * @return {!proto.plugins.prometheus.Chart} returns this
+ */
+proto.plugins.prometheus.Chart.prototype.clearMappingsMap = function() {
+ this.getMappingsMap().clear();
+ return this;};
+
+
+/**
+ * repeated Query queries = 7;
* @return {!Array}
*/
proto.plugins.prometheus.Chart.prototype.getQueriesList = function() {
return /** @type{!Array} */ (
- jspb.Message.getRepeatedWrapperField(this, proto.plugins.prometheus.Query, 6));
+ jspb.Message.getRepeatedWrapperField(this, proto.plugins.prometheus.Query, 7));
};
@@ -2792,7 +2855,7 @@ proto.plugins.prometheus.Chart.prototype.getQueriesList = function() {
* @return {!proto.plugins.prometheus.Chart} returns this
*/
proto.plugins.prometheus.Chart.prototype.setQueriesList = function(value) {
- return jspb.Message.setRepeatedWrapperField(this, 6, value);
+ return jspb.Message.setRepeatedWrapperField(this, 7, value);
};
@@ -2802,7 +2865,7 @@ proto.plugins.prometheus.Chart.prototype.setQueriesList = function(value) {
* @return {!proto.plugins.prometheus.Query}
*/
proto.plugins.prometheus.Chart.prototype.addQueries = function(opt_value, opt_index) {
- return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.plugins.prometheus.Query, opt_index);
+ return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.plugins.prometheus.Query, opt_index);
};
diff --git a/deploy/helm/kobs/Chart.yaml b/deploy/helm/kobs/Chart.yaml
index 932432139..e5059375f 100644
--- a/deploy/helm/kobs/Chart.yaml
+++ b/deploy/helm/kobs/Chart.yaml
@@ -4,5 +4,5 @@ description: Kubernetes Observability Platform
type: application
home: https://kobs.io
icon: https://kobs.io/assets/images/logo.svg
-version: 0.3.1
+version: 0.3.2
appVersion: v0.2.0
diff --git a/deploy/helm/kobs/templates/customresourcedefinition.yaml b/deploy/helm/kobs/templates/customresourcedefinition.yaml
index aca3945c3..24d4d0dbc 100644
--- a/deploy/helm/kobs/templates/customresourcedefinition.yaml
+++ b/deploy/helm/kobs/templates/customresourcedefinition.yaml
@@ -177,6 +177,10 @@ spec:
are executed against the datasource (e.g. For Prometheus
this will be a list of PromQL queries).
properties:
+ mappings:
+ additionalProperties:
+ type: string
+ type: object
queries:
items:
description: Query presents a single query to
@@ -332,6 +336,10 @@ spec:
datasource (e.g. For Prometheus this will be a list
of PromQL queries).
properties:
+ mappings:
+ additionalProperties:
+ type: string
+ type: object
queries:
items:
description: Query presents a single query to get
diff --git a/deploy/kustomize/crds/kobs.io_applications.yaml b/deploy/kustomize/crds/kobs.io_applications.yaml
index 14d2c25bc..fab9619d5 100644
--- a/deploy/kustomize/crds/kobs.io_applications.yaml
+++ b/deploy/kustomize/crds/kobs.io_applications.yaml
@@ -177,6 +177,10 @@ spec:
are executed against the datasource (e.g. For Prometheus
this will be a list of PromQL queries).
properties:
+ mappings:
+ additionalProperties:
+ type: string
+ type: object
queries:
items:
description: Query presents a single query to
@@ -332,6 +336,10 @@ spec:
datasource (e.g. For Prometheus this will be a list
of PromQL queries).
properties:
+ mappings:
+ additionalProperties:
+ type: string
+ type: object
queries:
items:
description: Query presents a single query to get
diff --git a/docs/plugins/prometheus.md b/docs/plugins/prometheus.md
index 9177248f4..e80d754b9 100644
--- a/docs/plugins/prometheus.md
+++ b/docs/plugins/prometheus.md
@@ -33,6 +33,7 @@ The following specification can be used, within an application.
| unit | string | An optional unit for the y axis of the chart. | No |
| stacked | boolean | When this is `true` all time series in the chart will be stacked. | No |
| size | number | An optional size for the chart. Must be a number between `1` and `12`. This is used to customize the grid of charts in the Prometheus tab. | No |
+| mappings | map | Specify value mappings for your data. **Note:** The value must be provided as string (e.g. `"1": "Green"`). | No |
| queries | [[]Query](#query) | A list of queries, which are used to get the data for the chart. | Yes |
### Query
diff --git a/pkg/api/plugins/prometheus/prometheus.go b/pkg/api/plugins/prometheus/prometheus.go
index 08e7a0966..d6b5b241a 100644
--- a/pkg/api/plugins/prometheus/prometheus.go
+++ b/pkg/api/plugins/prometheus/prometheus.go
@@ -180,10 +180,12 @@ func (p *Prometheus) GetMetrics(ctx context.Context, getMetricsRequest *promethe
for _, stream := range streams {
var min float64
var max float64
+ var avg float64
var data []*prometheusProto.Data
for index, value := range stream.Values {
val := float64(value.Value)
+ avg = avg + val
if index == 0 {
min = val
@@ -202,6 +204,10 @@ func (p *Prometheus) GetMetrics(ctx context.Context, getMetricsRequest *promethe
})
}
+ if avg != 0 {
+ avg = avg / float64(len(stream.Values))
+ }
+
var labels map[string]string
labels = make(map[string]string)
@@ -215,6 +221,7 @@ func (p *Prometheus) GetMetrics(ctx context.Context, getMetricsRequest *promethe
Label: query.Label,
Min: min,
Max: max,
+ Avg: avg,
Data: data,
})
} else {
@@ -226,6 +233,7 @@ func (p *Prometheus) GetMetrics(ctx context.Context, getMetricsRequest *promethe
Label: label,
Min: min,
Max: max,
+ Avg: avg,
Data: data,
})
}
diff --git a/pkg/api/plugins/prometheus/proto/prometheus.pb.go b/pkg/api/plugins/prometheus/proto/prometheus.pb.go
index d78f1f3de..0c7716cef 100644
--- a/pkg/api/plugins/prometheus/proto/prometheus.pb.go
+++ b/pkg/api/plugins/prometheus/proto/prometheus.pb.go
@@ -416,7 +416,8 @@ type Metrics struct {
Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
Min float64 `protobuf:"fixed64,2,opt,name=min,proto3" json:"min,omitempty"`
Max float64 `protobuf:"fixed64,3,opt,name=max,proto3" json:"max,omitempty"`
- Data []*Data `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty"`
+ Avg float64 `protobuf:"fixed64,4,opt,name=avg,proto3" json:"avg,omitempty"`
+ Data []*Data `protobuf:"bytes,5,rep,name=data,proto3" json:"data,omitempty"`
}
func (x *Metrics) Reset() {
@@ -472,6 +473,13 @@ func (x *Metrics) GetMax() float64 {
return 0
}
+func (x *Metrics) GetAvg() float64 {
+ if x != nil {
+ return x.Avg
+ }
+ return 0
+}
+
func (x *Metrics) GetData() []*Data {
if x != nil {
return x.Data
@@ -694,12 +702,13 @@ type Chart struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
- Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
- Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
- Stacked bool `protobuf:"varint,4,opt,name=stacked,proto3" json:"stacked,omitempty"`
- Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
- Queries []*Query `protobuf:"bytes,6,rep,name=queries,proto3" json:"queries,omitempty"`
+ Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
+ Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
+ Stacked bool `protobuf:"varint,4,opt,name=stacked,proto3" json:"stacked,omitempty"`
+ Size int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
+ Mappings map[string]string `protobuf:"bytes,6,rep,name=mappings,proto3" json:"mappings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Queries []*Query `protobuf:"bytes,7,rep,name=queries,proto3" json:"queries,omitempty"`
}
func (x *Chart) Reset() {
@@ -769,6 +778,13 @@ func (x *Chart) GetSize() int64 {
return 0
}
+func (x *Chart) GetMappings() map[string]string {
+ if x != nil {
+ return x.Mappings
+ }
+ return nil
+}
+
func (x *Chart) GetQueries() []*Query {
if x != nil {
return x.Queries
@@ -887,70 +903,80 @@ var file_prometheus_proto_rawDesc = []byte{
0x72, 0x22, 0x2c, 0x0a, 0x14, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75,
0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22,
- 0x71, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61,
- 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c,
- 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6d,
- 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52,
- 0x03, 0x6d, 0x61, 0x78, 0x12, 0x2c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
- 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61,
- 0x74, 0x61, 0x22, 0x22, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x01, 0x52, 0x01, 0x79, 0x22, 0x75, 0x0a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3a,
- 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d,
- 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52,
- 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x68,
- 0x61, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x6c, 0x75,
- 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e,
- 0x43, 0x68, 0x61, 0x72, 0x74, 0x52, 0x06, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x22, 0x94, 0x01,
- 0x0a, 0x08, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14,
- 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c,
- 0x61, 0x62, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c,
- 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x6c,
- 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
- 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x14,
- 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x05, 0x43, 0x68, 0x61, 0x72, 0x74, 0x12, 0x14,
- 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
- 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07,
- 0x73, 0x74, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73,
- 0x74, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x71, 0x75,
- 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x6c,
+ 0x83, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c,
+ 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03,
+ 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01,
+ 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x01, 0x52, 0x03, 0x61, 0x76, 0x67, 0x12, 0x2c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
+ 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52,
+ 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x22, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0c, 0x0a,
+ 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x79, 0x22, 0x75, 0x0a, 0x04, 0x53, 0x70, 0x65,
+ 0x63, 0x12, 0x3a, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
+ 0x6c, 0x65, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x0a,
+ 0x06, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65,
+ 0x75, 0x73, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x74, 0x52, 0x06, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73,
+ 0x22, 0x94, 0x01, 0x0a, 0x08, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a,
+ 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaa, 0x02, 0x0a, 0x05, 0x43, 0x68, 0x61, 0x72,
+ 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75,
+ 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12,
+ 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x07, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a,
+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x43, 0x0a,
+ 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74,
+ 0x68, 0x65, 0x75, 0x73, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x74, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+ 0x67, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07,
+ 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x3a, 0x02, 0x38, 0x01, 0x22, 0x33, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a,
+ 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75,
+ 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x32, 0xb5, 0x02, 0x0a, 0x0a, 0x50, 0x72,
+ 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x12, 0x63, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x56,
+ 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x47, 0x65,
+ 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d,
+ 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
+ 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a,
+ 0x0a, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73,
- 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22,
- 0x33, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72,
- 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14,
- 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c,
- 0x61, 0x62, 0x65, 0x6c, 0x32, 0xb5, 0x02, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68,
- 0x65, 0x75, 0x73, 0x12, 0x63, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
- 0x6c, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72,
- 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69,
- 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70,
+ 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69,
+ 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0c,
+ 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x27, 0x2e, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75,
- 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65,
- 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d,
- 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x25, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73,
- 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d,
- 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,
- 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65,
- 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69,
- 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
- 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74,
- 0x72, 0x69, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x28, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65,
- 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x6f, 0x6f, 0x6b,
- 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37,
- 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x6f, 0x62, 0x73, 0x69,
- 0x6f, 0x2f, 0x6b, 0x6f, 0x62, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70,
- 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75,
- 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69,
+ 0x63, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x6b, 0x6f, 0x62, 0x73, 0x69, 0x6f, 0x2f, 0x6b, 0x6f, 0x62, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f,
+ 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x6d,
+ 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -965,7 +991,7 @@ func file_prometheus_proto_rawDescGZIP() []byte {
return file_prometheus_proto_rawDescData
}
-var file_prometheus_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
+var file_prometheus_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_prometheus_proto_goTypes = []interface{}{
(*GetVariablesRequest)(nil), // 0: plugins.prometheus.GetVariablesRequest
(*GetVariablesResponse)(nil), // 1: plugins.prometheus.GetVariablesResponse
@@ -979,6 +1005,7 @@ var file_prometheus_proto_goTypes = []interface{}{
(*Variable)(nil), // 9: plugins.prometheus.Variable
(*Chart)(nil), // 10: plugins.prometheus.Chart
(*Query)(nil), // 11: plugins.prometheus.Query
+ nil, // 12: plugins.prometheus.Chart.MappingsEntry
}
var file_prometheus_proto_depIdxs = []int32{
9, // 0: plugins.prometheus.GetVariablesRequest.variables:type_name -> plugins.prometheus.Variable
@@ -989,18 +1016,19 @@ var file_prometheus_proto_depIdxs = []int32{
7, // 5: plugins.prometheus.Metrics.data:type_name -> plugins.prometheus.Data
9, // 6: plugins.prometheus.Spec.variables:type_name -> plugins.prometheus.Variable
10, // 7: plugins.prometheus.Spec.charts:type_name -> plugins.prometheus.Chart
- 11, // 8: plugins.prometheus.Chart.queries:type_name -> plugins.prometheus.Query
- 0, // 9: plugins.prometheus.Prometheus.GetVariables:input_type -> plugins.prometheus.GetVariablesRequest
- 2, // 10: plugins.prometheus.Prometheus.GetMetrics:input_type -> plugins.prometheus.GetMetricsRequest
- 4, // 11: plugins.prometheus.Prometheus.MetricLookup:input_type -> plugins.prometheus.MetricLookupRequest
- 1, // 12: plugins.prometheus.Prometheus.GetVariables:output_type -> plugins.prometheus.GetVariablesResponse
- 3, // 13: plugins.prometheus.Prometheus.GetMetrics:output_type -> plugins.prometheus.GetMetricsResponse
- 5, // 14: plugins.prometheus.Prometheus.MetricLookup:output_type -> plugins.prometheus.MetricLookupResponse
- 12, // [12:15] is the sub-list for method output_type
- 9, // [9:12] is the sub-list for method input_type
- 9, // [9:9] is the sub-list for extension type_name
- 9, // [9:9] is the sub-list for extension extendee
- 0, // [0:9] is the sub-list for field type_name
+ 12, // 8: plugins.prometheus.Chart.mappings:type_name -> plugins.prometheus.Chart.MappingsEntry
+ 11, // 9: plugins.prometheus.Chart.queries:type_name -> plugins.prometheus.Query
+ 0, // 10: plugins.prometheus.Prometheus.GetVariables:input_type -> plugins.prometheus.GetVariablesRequest
+ 2, // 11: plugins.prometheus.Prometheus.GetMetrics:input_type -> plugins.prometheus.GetMetricsRequest
+ 4, // 12: plugins.prometheus.Prometheus.MetricLookup:input_type -> plugins.prometheus.MetricLookupRequest
+ 1, // 13: plugins.prometheus.Prometheus.GetVariables:output_type -> plugins.prometheus.GetVariablesResponse
+ 3, // 14: plugins.prometheus.Prometheus.GetMetrics:output_type -> plugins.prometheus.GetMetricsResponse
+ 5, // 15: plugins.prometheus.Prometheus.MetricLookup:output_type -> plugins.prometheus.MetricLookupResponse
+ 13, // [13:16] is the sub-list for method output_type
+ 10, // [10:13] is the sub-list for method input_type
+ 10, // [10:10] is the sub-list for extension type_name
+ 10, // [10:10] is the sub-list for extension extendee
+ 0, // [0:10] is the sub-list for field type_name
}
func init() { file_prometheus_proto_init() }
@@ -1160,7 +1188,7 @@ func file_prometheus_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_prometheus_proto_rawDesc,
NumEnums: 0,
- NumMessages: 12,
+ NumMessages: 13,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/prometheus.proto b/proto/prometheus.proto
index 61027a4e2..14697ed4b 100644
--- a/proto/prometheus.proto
+++ b/proto/prometheus.proto
@@ -62,7 +62,8 @@ message Metrics {
string label = 1;
double min = 2;
double max = 3;
- repeated Data data = 4;
+ double avg = 4;
+ repeated Data data = 5;
}
// Data is one data point for a metric. Each data point contains a timestamp and a value, where x is the timestamp and y
@@ -103,7 +104,8 @@ message Chart {
string unit = 3;
bool stacked = 4;
int64 size = 5;
- repeated Query queries = 6;
+ map mappings = 6;
+ repeated Query queries = 7;
}
// Query presents a single query to get the data, which should be shown in the chart for the metrics section. A query