2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2018-11-21 17:31:27 +00:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
option go_package = "pb";
|
|
|
|
|
2018-11-29 18:39:27 +00:00
|
|
|
import "gogo.proto";
|
|
|
|
import "node.proto";
|
2019-03-15 20:21:52 +00:00
|
|
|
import "pointerdb.proto";
|
2019-03-05 20:48:37 +00:00
|
|
|
import "google/protobuf/duration.proto";
|
2019-03-22 13:27:59 +00:00
|
|
|
import "google/protobuf/timestamp.proto";
|
2018-11-21 17:31:27 +00:00
|
|
|
|
|
|
|
package inspector;
|
|
|
|
|
2019-01-14 18:47:22 +00:00
|
|
|
service OverlayInspector {
|
|
|
|
// CountNodes returns the number of nodes in the cache
|
|
|
|
rpc CountNodes(CountNodesRequest) returns (CountNodesResponse);
|
2019-02-28 19:55:27 +00:00
|
|
|
// DumpNodes returns all the nodes in the cache
|
|
|
|
rpc DumpNodes(DumpNodesRequest) returns (DumpNodesResponse);
|
2018-11-21 22:01:09 +00:00
|
|
|
}
|
|
|
|
|
2019-03-05 20:48:37 +00:00
|
|
|
service PieceStoreInspector {
|
|
|
|
// Stats return space and bandwidth stats for a storagenode
|
|
|
|
rpc Stats(StatsRequest) returns (StatSummaryResponse) {}
|
|
|
|
// Dashboard returns stats for a specific storagenode
|
|
|
|
rpc Dashboard(DashboardRequest) returns (DashboardResponse) {}
|
|
|
|
}
|
|
|
|
|
2019-03-15 20:21:52 +00:00
|
|
|
service IrreparableInspector {
|
2019-03-18 10:55:06 +00:00
|
|
|
// ListIrreparableSegments returns damaged segments
|
|
|
|
rpc ListIrreparableSegments(ListIrreparableSegmentsRequest) returns (ListIrreparableSegmentsResponse);
|
2019-03-15 20:21:52 +00:00
|
|
|
}
|
|
|
|
|
2019-04-02 15:55:58 +01:00
|
|
|
service HealthInspector {
|
|
|
|
// ObjectHealth will return stats about the health of an object
|
|
|
|
rpc ObjectHealth(ObjectHealthRequest) returns (ObjectHealthResponse) {}
|
|
|
|
// SegmentHealth will return stats about the health of a segment
|
|
|
|
rpc SegmentHealth(SegmentHealthRequest) returns (SegmentHealthResponse) {}
|
|
|
|
}
|
|
|
|
|
2019-03-15 20:21:52 +00:00
|
|
|
// ListSegments
|
2019-03-18 10:55:06 +00:00
|
|
|
message ListIrreparableSegmentsRequest {
|
2019-03-15 20:21:52 +00:00
|
|
|
int32 limit = 1;
|
2019-07-18 17:21:21 +01:00
|
|
|
bytes last_seen_segment_path = 2;
|
2019-03-15 20:21:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message IrreparableSegment {
|
|
|
|
bytes path = 1;
|
|
|
|
pointerdb.Pointer segment_detail = 2;
|
|
|
|
int32 lost_pieces = 3;
|
|
|
|
int64 last_repair_attempt = 4;
|
|
|
|
int64 repair_attempt_count = 5;
|
|
|
|
}
|
|
|
|
|
2019-03-18 10:55:06 +00:00
|
|
|
message ListIrreparableSegmentsResponse {
|
2019-03-15 20:21:52 +00:00
|
|
|
repeated IrreparableSegment segments = 1;
|
|
|
|
}
|
|
|
|
|
2018-11-21 17:31:27 +00:00
|
|
|
// CountNodes
|
|
|
|
message CountNodesResponse {
|
2019-01-14 18:47:22 +00:00
|
|
|
int64 count = 1;
|
2018-11-21 17:31:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CountNodesRequest {
|
|
|
|
}
|
|
|
|
|
2019-02-28 19:55:27 +00:00
|
|
|
message DumpNodesRequest {}
|
|
|
|
|
|
|
|
message DumpNodesResponse {
|
|
|
|
repeated node.Node nodes = 1;
|
2019-03-05 20:48:37 +00:00
|
|
|
}
|
|
|
|
message StatsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message StatSummaryResponse {
|
|
|
|
int64 used_space = 1;
|
|
|
|
int64 available_space = 2;
|
2019-03-27 19:44:18 +00:00
|
|
|
int64 used_ingress = 3;
|
|
|
|
int64 used_egress = 4;
|
|
|
|
int64 used_bandwidth = 5;
|
|
|
|
int64 available_bandwidth = 6;
|
2019-03-05 20:48:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DashboardRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message DashboardResponse {
|
2019-03-18 10:55:06 +00:00
|
|
|
bytes node_id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
2019-03-05 20:48:37 +00:00
|
|
|
int64 node_connections = 2;
|
2019-10-04 21:48:41 +01:00
|
|
|
string bootstrap_address = 3 [deprecated=true];
|
2019-03-05 20:48:37 +00:00
|
|
|
string internal_address = 4;
|
|
|
|
string external_address = 5;
|
2019-07-06 14:40:58 +01:00
|
|
|
string dashboard_address = 6;
|
|
|
|
StatSummaryResponse stats = 7;
|
|
|
|
google.protobuf.Duration uptime = 8;
|
2019-07-08 15:06:12 +01:00
|
|
|
google.protobuf.Timestamp last_pinged = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
|
|
google.protobuf.Timestamp last_queried = 10 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
2019-09-11 21:41:43 +01:00
|
|
|
bytes last_ping_from_id = 11 [(gogoproto.customtype) = "NodeID"];
|
|
|
|
string last_ping_from_address = 12;
|
2019-03-05 20:48:37 +00:00
|
|
|
}
|
2019-04-02 15:55:58 +01:00
|
|
|
|
|
|
|
message SegmentHealthRequest {
|
|
|
|
bytes bucket = 1; // segment bucket name
|
|
|
|
bytes encrypted_path = 2; // segment encrypted path
|
|
|
|
int64 segment_index = 3; // segment index
|
|
|
|
bytes project_id = 4; // segment project id
|
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentHealth {
|
2019-06-18 23:22:14 +01:00
|
|
|
repeated bytes healthy_ids = 1 [(gogoproto.customtype) = "NodeID"]; // online + not disqualified
|
|
|
|
repeated bytes unhealthy_ids = 2 [(gogoproto.customtype) = "NodeID"]; // online + disqualified
|
|
|
|
repeated bytes offline_ids = 3 [(gogoproto.customtype) = "NodeID"]; // offline
|
|
|
|
bytes segment = 4; // path formatted segment index
|
2019-04-02 15:55:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message SegmentHealthResponse {
|
|
|
|
SegmentHealth health = 1; // Information about a segment's health
|
|
|
|
pointerdb.RedundancyScheme redundancy = 2; // expected segment info
|
|
|
|
}
|
|
|
|
|
|
|
|
message ObjectHealthRequest {
|
|
|
|
bytes encrypted_path = 1; // object encrypted path
|
|
|
|
bytes bucket = 2; // object bucket name
|
|
|
|
bytes project_id = 3; // object project id
|
|
|
|
int64 start_after_segment = 4; // Get all segments after specified segment index
|
|
|
|
int64 end_before_segment = 5; // Stop at segment before specified segment index
|
|
|
|
int32 limit = 6; // Max number of segments that are checked
|
|
|
|
}
|
|
|
|
|
|
|
|
message ObjectHealthResponse {
|
|
|
|
repeated SegmentHealth segments = 1; // actual segment info
|
|
|
|
pointerdb.RedundancyScheme redundancy = 2; // expected segment info
|
|
|
|
}
|