...
1syntax = "proto3";
2
3package silencepb;
4
5import "google/protobuf/timestamp.proto";
6import "gogoproto/gogo.proto";
7
8option (gogoproto.marshaler_all) = true;
9option (gogoproto.sizer_all) = true;
10option (gogoproto.unmarshaler_all) = true;
11option (gogoproto.goproto_getters_all) = false;
12
13// Matcher specifies a rule, which can match or set of labels or not.
14message Matcher {
15 // Type specifies how the given name and pattern are matched
16 // against a label set.
17 enum Type {
18 EQUAL = 0;
19 REGEXP = 1;
20 NOT_EQUAL = 2;
21 NOT_REGEXP = 3;
22 };
23 Type type = 1;
24
25 // The label name in a label set to against which the matcher
26 // checks the pattern.
27 string name = 2;
28 // The pattern being checked according to the matcher's type.
29 string pattern = 3;
30}
31
32// DEPRECATED: A comment can be attached to a silence.
33message Comment {
34 string author = 1;
35 string comment = 2;
36 google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
37}
38
39// Silence specifies an object that ignores alerts based
40// on a set of matchers during a given time frame.
41message Silence {
42 // A globally unique identifier.
43 string id = 1;
44
45 // A set of matchers all of which have to be true for a silence
46 // to affect a given label set.
47 repeated Matcher matchers = 2;
48
49 // The time range during which the silence is active.
50 google.protobuf.Timestamp starts_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
51 google.protobuf.Timestamp ends_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
52
53 // The last notification made to the silence.
54 google.protobuf.Timestamp updated_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
55
56 // DEPRECATED: A set of comments made on the silence.
57 repeated Comment comments = 7;
58 // Comment for the silence.
59 string created_by = 8;
60 string comment = 9;
61}
62
63// MeshSilence wraps a regular silence with an expiration timestamp
64// after which the silence may be garbage collected.
65message MeshSilence {
66 Silence silence = 1;
67 google.protobuf.Timestamp expires_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
68}
View as plain text