github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/ruler/rulespb/rules.proto (about)

     1  syntax = "proto3";
     2  
     3  package rules;
     4  
     5  import "github.com/gogo/protobuf/gogoproto/gogo.proto";
     6  import "google/protobuf/any.proto";
     7  import "google/protobuf/duration.proto";
     8  import "pkg/logproto/logproto.proto";
     9  
    10  option go_package = "github.com/grafana/loki/pkg/ruler/rulespb";
    11  option (gogoproto.marshaler_all) = true;
    12  option (gogoproto.unmarshaler_all) = true;
    13  
    14  // RuleGroupDesc is a proto representation of a rule group.
    15  message RuleGroupDesc {
    16    reserved 5, 7, 8;
    17    string name = 1;
    18    string namespace = 2;
    19    google.protobuf.Duration interval = 3 [
    20      (gogoproto.nullable) = false,
    21      (gogoproto.stdduration) = true
    22    ];
    23    repeated RuleDesc rules = 4;
    24    string user = 6;
    25    // The options field can be used to extend 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 [
    39      (gogoproto.nullable) = false,
    40      (gogoproto.stdduration) = true
    41    ];
    42    repeated logproto.LegacyLabelPair labels = 5 [
    43      (gogoproto.nullable) = false,
    44      (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter"
    45    ];
    46    repeated logproto.LegacyLabelPair annotations = 6 [
    47      (gogoproto.nullable) = false,
    48      (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter"
    49    ];
    50  }