forked from DataDog/agent-payload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
agent_payload.proto
125 lines (113 loc) · 2.94 KB
/
agent_payload.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
syntax = "proto3";
package datadog.agentpayload;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "github.com/DataDog/agent-payload/v5/gogen";
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 Origin {
reserved 1,2,3;
uint32 origin_product = 4;
uint32 origin_category = 5;
uint32 origin_service = 6;
}
// Metadata is used in both the MetricSeries and Sketch messages defined below.
message Metadata {
Origin origin = 1;
}
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;
// Metrics origin metadata
Metadata metadata = 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];
Metadata metadata = 8;
}
repeated Sketch sketches = 1 [(gogoproto.nullable) = false];
CommonMetadata metadata = 2 [(gogoproto.nullable) = false];
}