VictoriaMetrics/lib/protoparser/datadog/api/sketches/beta/proto/sketches.proto

113 lines
2.6 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package beta;
option go_package = "./pb";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
message CommonMetadata {
string agent_version = 1;
string timezone = 2;
double current_epoch = 3;
string internal_ip = 4;
string public_ip = 5;
string api_key = 6;
}
message MetricPayload {
enum MetricType {
UNSPECIFIED = 0;
COUNT = 1;
RATE = 2;
GAUGE = 3;
}
message MetricPoint {
// metric value
double value = 1;
// timestamp for this value in seconds since the UNIX epoch
int64 timestamp = 2;
}
message Resource {
string type = 1;
string name = 2;
}
message MetricSeries {
// Resources this series applies to; include at least
// { type="host", name=<hostname> }
repeated Resource resources = 1;
// metric name
string metric = 2;
// tags for this metric
repeated string tags = 3;
// data points for this metric
repeated MetricPoint points = 4;
// type of metric
MetricType type = 5;
// metric unit name
string unit = 6;
// source of this metric (check name, etc.)
string source_type_name = 7;
// interval, in seconds, between samples of this metric
int64 interval = 8;
reserved 9;
}
repeated MetricSeries series = 1;
}
message EventsPayload {
message Event {
string title = 1;
string text = 2;
int64 ts = 3;
string priority = 4;
string host = 5;
repeated string tags = 6;
string alert_type = 7;
string aggregation_key = 8;
string source_type_name = 9;
}
repeated Event events = 1;
CommonMetadata metadata = 2;
}
message SketchPayload {
message Sketch {
message Distribution {
int64 ts = 1;
int64 cnt = 2;
double min = 3;
double max = 4;
double avg = 5;
double sum = 6;
repeated double v = 7;
repeated uint32 g = 8;
repeated uint32 delta = 9;
repeated double buf = 10;
}
message Dogsketch {
int64 ts = 1;
int64 cnt = 2;
double min = 3;
double max = 4;
double avg = 5;
double sum = 6;
repeated sint32 k = 7;
repeated uint32 n = 8;
}
string metric = 1;
string host = 2;
repeated Distribution distributions = 3 [(gogoproto.nullable) = false];
repeated string tags = 4;
reserved 5, 6;
reserved "distributionsK", "distributionsC";
repeated Dogsketch dogsketches = 7 [(gogoproto.nullable) = false];
}
repeated Sketch sketches = 1 [(gogoproto.nullable) = false];
CommonMetadata metadata = 2 [(gogoproto.nullable) = false];
}