Skip to content

Commit

Permalink
add network diagnostics columns to viewer/nodes handler (ydb-platform…
Browse files Browse the repository at this point in the history
  • Loading branch information
adameat authored Nov 7, 2024
1 parent 6887352 commit 804f3d6
Show file tree
Hide file tree
Showing 6 changed files with 789 additions and 80 deletions.
2 changes: 1 addition & 1 deletion ydb/core/protos/node_whiteboard.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ message TNodeStateInfo {
optional uint64 ConnectTime = 7; // changed every time the connection changes it state
optional uint32 PeerNodeId = 8 [(DefaultField) = true]; // node if of the peer
optional int64 ClockSkewUs = 9; // a positive value means the peer is ahead in time; a negative value means it's behind
optional uint32 PingTimeUs = 10; // RTT for the peer
optional uint64 PingTimeUs = 10; // RTT for the peer
optional float Utilization = 11; // network utilization 0-1
optional NActorsInterconnect.TScopeId ScopeId = 12; // scope id of the peer
optional uint32 Count = 13; // filled during group count
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/viewer/json_handlers_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void InitViewerHealthCheckJsonHandler(TJsonHandlers& handlers) {
}

void InitViewerNodesJsonHandler(TJsonHandlers& handlers) {
handlers.AddHandler("/viewer/nodes", new TJsonHandler<TJsonNodes>(TJsonNodes::GetSwagger()), 12);
handlers.AddHandler("/viewer/nodes", new TJsonHandler<TJsonNodes>(TJsonNodes::GetSwagger()), 13);
}

void InitViewerACLJsonHandler(TJsonHandlers &jsonHandlers) {
Expand Down
9 changes: 9 additions & 0 deletions ydb/core/viewer/json_pipe_req.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,15 @@ TViewerPipeClient::TRequestResponse<TEvViewer::TEvViewerResponse> TViewerPipeCli
case NKikimrViewer::TEvViewerRequest::kSystemRequest:
response.Span.Attribute("request_type", "SystemRequest");
break;
case NKikimrViewer::TEvViewerRequest::kPDiskRequest:
response.Span.Attribute("request_type", "PDiskRequest");
break;
case NKikimrViewer::TEvViewerRequest::kVDiskRequest:
response.Span.Attribute("request_type", "VDiskRequest");
break;
case NKikimrViewer::TEvViewerRequest::kNodeRequest:
response.Span.Attribute("request_type", "NodeRequest");
break;
case NKikimrViewer::TEvViewerRequest::kQueryRequest:
response.Span.Attribute("request_type", "QueryRequest");
break;
Expand Down
32 changes: 26 additions & 6 deletions ydb/core/viewer/protos/viewer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,27 @@ message TNodeInfo {
bool Disconnected = 4;
float CpuUsage = 5;
float DiskSpaceUsage = 6;
NKikimrWhiteboard.TSystemStateInfo SystemState = 10;
repeated NKikimrWhiteboard.TPDiskStateInfo PDisks = 20;
repeated NKikimrWhiteboard.TVDiskStateInfo VDisks = 30;
repeated TTabletStateInfo Tablets = 40;
optional uint32 Connections = 7; // total number of live connections
EFlag ConnectStatus = 10; // Max
optional uint64 ReceiveThroughput = 11;
optional uint64 SendThroughput = 12;
optional float NetworkUtilization = 20; // Sum
optional float NetworkUtilizationMin = 21;
optional float NetworkUtilizationMax = 22;
optional int64 ClockSkewUs = 30; // Avg
optional int64 ClockSkewMinUs = 31;
optional int64 ClockSkewMaxUs = 32;
optional int64 ReverseClockSkewUs = 33; // Avg
optional uint64 PingTimeUs = 40; // Avg
optional uint64 PingTimeMinUs = 41;
optional uint64 PingTimeMaxUs = 42;
optional uint64 ReversePingTimeUs = 43; // Avg
NKikimrWhiteboard.TSystemStateInfo SystemState = 50;
repeated NKikimrWhiteboard.TPDiskStateInfo PDisks = 51;
repeated NKikimrWhiteboard.TVDiskStateInfo VDisks = 52;
repeated TTabletStateInfo Tablets = 53;
repeated NKikimrWhiteboard.TNodeStateInfo Peers = 54;
repeated NKikimrWhiteboard.TNodeStateInfo ReversePeers = 55;
}

message TNodesInfo {
Expand Down Expand Up @@ -668,13 +685,14 @@ message TEvViewerRequest {
NKikimrWhiteboard.TEvVDiskStateRequest VDiskRequest = 16;
NKikimrWhiteboard.TEvPDiskStateRequest PDiskRequest = 17;
NKikimrWhiteboard.TEvBSGroupStateRequest BSGroupRequest = 18;
NKikimrWhiteboard.TEvNodeStateRequest NodeRequest = 19;
THttpProxyRequest QueryRequest = 13;
THttpProxyRequest RenderRequest = 14;
TSchemeCacheRequest AutocompleteRequest = 15;
bytes Reserved19 = 19;
bytes Reserved20 = 20;
bytes Reserved21 = 21;
bytes Reserved22 = 22;
bytes Reserved23 = 23;
}
}

Expand All @@ -686,13 +704,14 @@ message TEvViewerResponse {
NKikimrWhiteboard.TEvVDiskStateResponse VDiskResponse = 16;
NKikimrWhiteboard.TEvPDiskStateResponse PDiskResponse = 17;
NKikimrWhiteboard.TEvBSGroupStateResponse BSGroupResponse = 18;
NKikimrWhiteboard.TEvNodeStateResponse NodeResponse = 19;
NKikimrKqp.TEvQueryResponse QueryResponse = 13;
NKikimrGraph.TEvMetricsResult RenderResponse = 14;
TQueryAutocomplete AutocompleteResponse = 15;
bytes Reserved19 = 19;
bytes Reserved20 = 20;
bytes Reserved21 = 21;
bytes Reserved22 = 22;
bytes Reserved23 = 23;
}
}

Expand Down Expand Up @@ -789,3 +808,4 @@ message TFeatureFlagsConfig {
uint32 Version = 1;
repeated TDatabase Databases = 2;
}

Loading

0 comments on commit 804f3d6

Please sign in to comment.