From 8b2450e00b9ddbd70cc8fdba5cf14bc8b75e801b Mon Sep 17 00:00:00 2001 From: Daniil Komarevtsev Date: Sat, 20 Jan 2024 18:00:55 +0700 Subject: [PATCH] NBS-4748: review fixes --- .../blockstore/libs/diagnostics/hostname.cpp | 2 +- cloud/blockstore/libs/diagnostics/hostname.h | 2 +- .../libs/storage/core/monitoring_utils.cpp | 2 +- .../libs/storage/core/monitoring_utils.h | 2 +- .../partition/part_actor_monitoring.cpp | 43 ++++++++++--------- .../partition2/part2_actor_monitoring.cpp | 4 +- .../volume/volume_actor_monitoring.cpp | 1 - cloud/filestore/config/diagnostics.proto | 2 +- cloud/filestore/libs/diagnostics/config.h | 5 +-- 9 files changed, 30 insertions(+), 33 deletions(-) diff --git a/cloud/blockstore/libs/diagnostics/hostname.cpp b/cloud/blockstore/libs/diagnostics/hostname.cpp index 1b9245030a4..507246456cb 100644 --- a/cloud/blockstore/libs/diagnostics/hostname.cpp +++ b/cloud/blockstore/libs/diagnostics/hostname.cpp @@ -115,7 +115,7 @@ TString GetMonitoringNBSOverviewToTVUrl(const TDiagnosticsConfig& config) << data.MonitoringClusterName << "&p.host=cluster"; } -TString GetSolomonBsProxyUrl( +TString GetMonitoringYDBGroupUrl( const TDiagnosticsConfig& config, ui32 groupId, const TString& storagePool) diff --git a/cloud/blockstore/libs/diagnostics/hostname.h b/cloud/blockstore/libs/diagnostics/hostname.h index 2d275e5f647..2b68f2fcaa8 100644 --- a/cloud/blockstore/libs/diagnostics/hostname.h +++ b/cloud/blockstore/libs/diagnostics/hostname.h @@ -34,7 +34,7 @@ TString GetMonitoringVolumeUrl( TString GetMonitoringPartitionUrl(const TDiagnosticsConfig& config); -TString GetSolomonBsProxyUrl( +TString GetMonitoringYDBGroupUrl( const TDiagnosticsConfig& config, ui32 groupId, const TString& storagePool); diff --git a/cloud/blockstore/libs/storage/core/monitoring_utils.cpp b/cloud/blockstore/libs/storage/core/monitoring_utils.cpp index 3d6665d06ce..20c5f3e8ee6 100644 --- a/cloud/blockstore/libs/storage/core/monitoring_utils.cpp +++ b/cloud/blockstore/libs/storage/core/monitoring_utils.cpp @@ -981,7 +981,7 @@ void DumpMonitoringVolumeLink( } } -void DumpSolomonPartitionLink( +void DumpMonitoringPartitionLink( IOutputStream& out, const TDiagnosticsConfig& config) { diff --git a/cloud/blockstore/libs/storage/core/monitoring_utils.h b/cloud/blockstore/libs/storage/core/monitoring_utils.h index f444d407edb..9270bf90ad3 100644 --- a/cloud/blockstore/libs/storage/core/monitoring_utils.h +++ b/cloud/blockstore/libs/storage/core/monitoring_utils.h @@ -164,7 +164,7 @@ void DumpMonitoringVolumeLink( const TDiagnosticsConfig& config, const TString& diskId); -void DumpSolomonPartitionLink( +void DumpMonitoringPartitionLink( IOutputStream& out, const TDiagnosticsConfig& config); diff --git a/cloud/blockstore/libs/storage/partition/part_actor_monitoring.cpp b/cloud/blockstore/libs/storage/partition/part_actor_monitoring.cpp index cddb788d2c6..fa6d82b0b78 100644 --- a/cloud/blockstore/libs/storage/partition/part_actor_monitoring.cpp +++ b/cloud/blockstore/libs/storage/partition/part_actor_monitoring.cpp @@ -7,16 +7,17 @@ #include #include #include - #include -#include - -#include #include +#include #include +#include + +#include + namespace NCloud::NBlockStore::NStorage::NPartition { using namespace NKikimr; @@ -66,23 +67,23 @@ void DumpDownGroups( } return entry->GroupID == groupId; }; - auto it = std::ranges::find_if( - storage.Channels, - groupIdFinder); - if (it == storage.Channels.end() || - std::any_of( - it + 1, - storage.Channels.end(), - groupIdFinder)) - { + auto matchedInfos = storage.Channels | + std::views::filter(groupIdFinder); + if (matchedInfos.empty()) { out << groupId; } else { - out << groupId << " Graphs"; + for (const TTabletChannelInfo& channelInfo: + matchedInfos) + { + out << groupId << " Graphs " + << "(Channel=" << channelInfo.Channel + << ")
"; + } } } TABLEH() { @@ -180,7 +181,7 @@ void DumpChannels( } TABLED() { out << "GroupID, channel.StoragePool) @@ -331,7 +331,7 @@ void TPartitionActor::HandleHttpInfo_Default( DIV_CLASS("tab-content") { DIV_CLASS_ID("tab-pane active", "Overview") { DumpDefaultHeader(out, *Info(), SelfId().NodeId(), *DiagnosticsConfig); - DumpSolomonPartitionLink(out, *DiagnosticsConfig); + DumpMonitoringPartitionLink(out, *DiagnosticsConfig); TAG(TH3) { out << "State"; } State->DumpHtml(out); diff --git a/cloud/blockstore/libs/storage/volume/volume_actor_monitoring.cpp b/cloud/blockstore/libs/storage/volume/volume_actor_monitoring.cpp index 81511b44f4a..089d02164b3 100644 --- a/cloud/blockstore/libs/storage/volume/volume_actor_monitoring.cpp +++ b/cloud/blockstore/libs/storage/volume/volume_actor_monitoring.cpp @@ -1,7 +1,6 @@ #include "volume_actor.h" #include -#include #include #include diff --git a/cloud/filestore/config/diagnostics.proto b/cloud/filestore/config/diagnostics.proto index 9da3e5483a8..d38472bb297 100644 --- a/cloud/filestore/config/diagnostics.proto +++ b/cloud/filestore/config/diagnostics.proto @@ -11,7 +11,7 @@ import "cloud/storage/core/protos/trace.proto"; message TMonitoringUrlData { - // Monitoring cluster name (e.g. yandexcloud_prod_vla). + // Monitoring cluster name. optional string MonitoringClusterName = 1; // Monitoring host url. optional string MonitoringUrl = 2; diff --git a/cloud/filestore/libs/diagnostics/config.h b/cloud/filestore/libs/diagnostics/config.h index 2ecd0ce0594..08d6c9c37f5 100644 --- a/cloud/filestore/libs/diagnostics/config.h +++ b/cloud/filestore/libs/diagnostics/config.h @@ -19,10 +19,7 @@ struct TMonitoringUrlData: public TAtomicRefCount TString MonitoringUrl; TString MonitoringProject; - TMonitoringUrlData() - : MonitoringUrl("https://monitoring.yandex-team.ru") - , MonitoringProject("nfs") - {} + TMonitoringUrlData() : MonitoringProject("nfs") {} TMonitoringUrlData(const TMonitoringUrlData& rhs) = default; TMonitoringUrlData(const NProto::TMonitoringUrlData& data)