github.com/matrixorigin/matrixone@v1.2.0/proto/metric.proto (about) 1 // Copyright 2022 Matrix Origin 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 package metric; 17 option go_package = "github.com/matrixorigin/matrixone/pkg/pb/metric"; 18 19 message LabelPair { 20 string name = 1; 21 string value = 2; 22 } 23 24 enum MetricType { 25 COUNTER = 0; 26 GAUGE = 1; 27 RAWHIST = 2; 28 } 29 30 message Gauge { 31 double value = 1; 32 } 33 34 message Counter { 35 double value = 1; 36 } 37 38 message Sample { 39 int64 datetime = 1; 40 double value = 2; 41 } 42 43 message RawHist { 44 repeated Sample samples = 1; // RawHist samples 45 } 46 47 message Metric { 48 repeated LabelPair label = 1; 49 Gauge gauge = 2; 50 Counter counter = 3; 51 RawHist rawHist = 4; 52 int64 collecttime = 5; // same type with types.Datetime in MO 53 } 54 55 message MetricFamily { 56 string name = 1; 57 string help = 2; 58 MetricType type = 3; 59 repeated Metric metric = 4; 60 string node = 5; 61 string role = 6; 62 }