github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/pkg/ruler/rulespb/rules.proto (about) 1 2 syntax = "proto3"; 3 4 package rules; 5 6 option go_package = "rulespb"; 7 8 import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 9 import "google/protobuf/duration.proto"; 10 import "google/protobuf/any.proto"; 11 import "github.com/cortexproject/cortex/pkg/cortexpb/cortex.proto"; 12 13 option (gogoproto.marshaler_all) = true; 14 option (gogoproto.unmarshaler_all) = true; 15 16 // RuleGroupDesc is a proto representation of a cortex rule group. 17 message RuleGroupDesc { 18 reserved 5, 7, 8; 19 string name = 1; 20 string namespace = 2; 21 google.protobuf.Duration interval = 3 22 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; 23 repeated RuleDesc rules = 4; 24 string user = 6; 25 // The options field can be used to extend Cortex Ruler functionality without 26 // having to repeatedly redefine the proto description. It can also be leveraged 27 // to create custom `ManagerOpts` based on rule configs which can then be passed 28 // to the Prometheus Manager. 29 repeated google.protobuf.Any options = 9; 30 } 31 32 // RuleDesc is a proto representation of a Prometheus Rule 33 message RuleDesc { 34 reserved 7 to 12; 35 string expr = 1; 36 string record = 2; 37 string alert = 3; 38 google.protobuf.Duration for = 4 [(gogoproto.nullable) = false,(gogoproto.stdduration) = true]; 39 repeated cortexpb.LabelPair labels = 5 [ 40 (gogoproto.nullable) = false, 41 (gogoproto.customtype) = "github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter" 42 ]; 43 repeated cortexpb.LabelPair annotations = 6 [ 44 (gogoproto.nullable) = false, 45 (gogoproto.customtype) = "github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter" 46 ]; 47 }