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

     1  // Copyright 2017 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.diagnosticspb;
    13  option go_package = "diagnosticspb";
    14  
    15  import "build/info.proto";
    16  import "config/zonepb/zone.proto";
    17  import "gogoproto/gogo.proto";
    18  import "roachpb/app_stats.proto";
    19  import "sql/sqlbase/structured.proto";
    20  import "roachpb/metadata.proto";
    21  
    22  message DiagnosticReport {
    23    NodeInfo node = 1 [(gogoproto.nullable) = false];
    24    repeated StoreInfo stores = 2  [(gogoproto.nullable) = false];
    25    repeated sql.sqlbase.TableDescriptor schema = 3 [(gogoproto.nullable) = false];
    26    repeated sql.CollectedStatementStatistics sql_stats = 4 [(gogoproto.nullable) = false];
    27    map<string, string> altered_settings = 6;
    28    map<int64, config.zonepb.ZoneConfig> zone_configs = 8 [(gogoproto.nullable) = false];
    29    map<string, int32> feature_usage = 9 [(gogoproto.nullable) = false];
    30  
    31  
    32    map<string, int64> legacy_unimplemented_errors = 5;
    33    map<string, int64> legacy_error_counts = 7;
    34    }
    35  
    36  message NodeInfo {
    37    int32 node_id = 1 [(gogoproto.customname) = "NodeID", (gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.NodeID"];
    38    int64 bytes = 2;
    39    int64 key_count = 3;
    40    int64 range_count = 4;
    41    roachpb.Locality locality = 5 [(gogoproto.nullable) = false];
    42  
    43    HardwareInfo hardware = 6 [(gogoproto.nullable) = false];
    44    OSInfo os = 7 [(gogoproto.nullable) = false];
    45    build.Info build = 8 [(gogoproto.nullable) = false];
    46    int64 uptime = 9;
    47    string license_type = 10;
    48    TopologyInfo topology = 11 [(gogoproto.nullable) = false];
    49  }
    50  
    51  message StoreInfo {
    52    int32 node_id = 1 [(gogoproto.customname) = "NodeID", (gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.NodeID"];
    53    int32 store_id = 2 [(gogoproto.customname) = "StoreID", (gogoproto.casttype) = "github.com/cockroachdb/cockroach/pkg/roachpb.StoreID"];
    54    int64 bytes = 3;
    55    int64 key_count = 4;
    56    int64 range_count = 5;
    57  
    58    int64 capacity  = 6;
    59    int64 available = 7;
    60    int64 used = 8;
    61  
    62    int64 encryption_algorithm = 9;
    63  
    64    // Want: sync times, observed read/write speeds
    65  }
    66  
    67  message CPUInfo {
    68    int32 numcpu = 1; // go's reported runtime.NUMCPU()
    69    int32 sockets = 2; // number of cpus reported
    70    int32 cores = 3;  // gopsutil's reported cores for first cpu
    71    string model = 4; // reported model name e.g. `Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz`
    72    float mhz = 5;  // speed of first cpu e.g. 3100
    73    repeated string features = 6; // cpu feature flags for first cpu
    74  }
    75  
    76  message HardwareInfo {
    77    string virtualization = 1;
    78    CPUInfo cpu = 2 [(gogoproto.nullable) = false];
    79    MemInfo mem = 3 [(gogoproto.nullable) = false];
    80    float loadavg15 = 4;
    81    string provider = 5;
    82    string instance_class = 6;
    83  }
    84  
    85  message OSInfo {
    86    string family = 1;
    87    string platform = 2;
    88    string version = 3;
    89  }
    90  
    91  message MemInfo {
    92    uint64 total = 1;
    93    uint64 available = 2;
    94  }
    95  
    96  message TopologyInfo {
    97    string provider = 1;
    98    string region = 2;
    99  }