github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/server/status/statuspb/status.proto (about)

     1  // Copyright 2015 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  syntax = "proto3";
    12  package cockroach.server.status.statuspb;
    13  option go_package = "statuspb";
    14  
    15  import "roachpb/metadata.proto";
    16  import "build/info.proto";
    17  import "gogoproto/gogo.proto";
    18  
    19  // StoreStatus records the most recent values of metrics for a store.
    20  message StoreStatus {
    21    roachpb.StoreDescriptor desc = 1 [(gogoproto.nullable) = false];
    22    map<string, double> metrics = 2;
    23  }
    24  
    25  // NodeStatus records the most recent values of metrics for a node.
    26  message NodeStatus {
    27    roachpb.NodeDescriptor desc = 1 [(gogoproto.nullable) = false];
    28    build.Info build_info = 2 [(gogoproto.nullable) = false];
    29    int64 started_at = 3;
    30    int64 updated_at = 4;
    31    map<string, double> metrics = 5;
    32    repeated StoreStatus store_statuses = 6 [(gogoproto.nullable) = false];
    33    repeated string args = 7;
    34    repeated string env = 8;
    35    // latencies is a map of nodeIDs to nanoseconds which is the latency
    36    // between this node and the other node.
    37    //
    38    // NOTE: this is deprecated and is only set if the min supported
    39    //       cluster version is >= VersionRPCNetworkStats.
    40    map<int32, int64> latencies = 9 [
    41      (gogoproto.nullable) = false,
    42      (gogoproto.castkey) = "github.com/cockroachdb/cockroach/pkg/roachpb.NodeID"
    43    ];
    44  
    45    message NetworkActivity {
    46      int64 incoming = 1; // in bytes
    47      int64 outgoing = 2; // in bytes
    48      int64 latency = 3;  // in nanoseconds
    49    }
    50    // activity is a map of nodeIDs to network statistics from this node
    51    // to other nodes.
    52    map<int32, NetworkActivity> activity = 10 [
    53      (gogoproto.nullable) = false,
    54      (gogoproto.castkey) = "github.com/cockroachdb/cockroach/pkg/roachpb.NodeID"
    55    ];
    56    // total_system_memory is the total RAM available to the system
    57    // (or, if possible, the memory available to the cgroup this process is in)
    58    // in bytes.
    59    int64 total_system_memory = 11;
    60    // num_cpus is the number of logical CPUs on this machine.
    61    int32 num_cpus = 12;
    62  }
    63  
    64  // A HealthAlert is an undesired condition detected by a server which should be
    65  // exposed to the operators.
    66  message HealthAlert {
    67    // store_id is zero for alerts not specific to a store (i.e. apply at the node level).
    68    int32 store_id = 1 [
    69      // NB: trying to make this nullable does not work with the custom type. You need a
    70      // pointer type as the custom type, but that breaks protoc-gen-gogoroach.
    71      (gogoproto.nullable) = false,
    72      (gogoproto.customtype) = "github.com/cockroachdb/cockroach/pkg/roachpb.StoreID",
    73      (gogoproto.customname) = "StoreID"
    74    ];
    75    enum Category {
    76      METRICS = 0;
    77      NETWORK = 1;
    78    }
    79    Category category = 2;
    80    string description = 3;
    81    double value = 4;
    82  }
    83  
    84  // HealthCheckResult holds a number of HealthAlerts.
    85  message HealthCheckResult{
    86    repeated HealthAlert alerts = 1 [(gogoproto.nullable) = false];
    87  }