Skip to content

Commit 7b489c6

Browse files
authored
Move blobstorageproxies actor services to different monitoring shard (#8813)
1 parent bebd396 commit 7b489c6

File tree

7 files changed

+21
-6
lines changed

7 files changed

+21
-6
lines changed

ydb/core/base/counters.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ static const THashSet<TString> DATABASE_SERVICES
1010
= {{ TString("compile"),
1111
TString("coordinator"),
1212
TString("dsproxy"),
13+
TString("dsproxy_mon"),
1314
TString("dsproxynode"),
1415
TString("dsproxy_overview"),
1516
TString("dsproxy_percentile"),

ydb/core/blobstorage/dsproxy/dsproxy_monactor.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,15 @@ class TBlobStorageGroupProxyMonActor : public TActorBootstrapped<TBlobStorageGro
402402

403403
TString path = Sprintf("blobstorageproxy%09" PRIu32, (ui32)GroupId);
404404
TString name = Sprintf("BlobStorageProxy%09" PRIu32, (ui32)GroupId);
405-
mon->RegisterActorPage(proxiesMonPage, path, name, false, TlsActivationContext->ExecutorThread.ActorSystem,
406-
SelfId());
405+
mon->RegisterActorPage(TMon::TRegisterActorPageFields{
406+
.Title = name,
407+
.RelPath = path,
408+
.ActorSystem = TlsActivationContext->ExecutorThread.ActorSystem,
409+
.Index = proxiesMonPage,
410+
.PreTag = false,
411+
.ActorId = SelfId(),
412+
.MonServiceName = "dsproxy_mon"
413+
});
407414
}
408415

409416
Become(&TThis::StateOnline);

ydb/core/mon/async_http_mon.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ class THttpMonLegacyActorRequest : public TActorBootstrapped<THttpMonLegacyActor
214214
void ReplyWith(NHttp::THttpOutgoingResponsePtr response) {
215215
TString url(Event->Get()->Request->URL.Before('?'));
216216
TString status(response->Status);
217-
NMonitoring::THistogramPtr ResponseTimeHgram = NKikimr::GetServiceCounters(NKikimr::AppData()->Counters, "utils")
217+
NMonitoring::THistogramPtr ResponseTimeHgram = NKikimr::GetServiceCounters(NKikimr::AppData()->Counters,
218+
ActorMonPage->MonServiceName)
218219
->GetSubgroup("subsystem", "mon")
219220
->GetSubgroup("url", url)
220221
->GetSubgroup("status", status)
@@ -824,7 +825,8 @@ NMonitoring::IMonPage* TAsyncHttpMon::RegisterActorPage(TRegisterActorPageFields
824825
fields.ActorSystem,
825826
fields.ActorId,
826827
fields.AllowedSIDs ? fields.AllowedSIDs : Config.AllowedSIDs,
827-
fields.UseAuth ? Config.Authorizer : TRequestAuthorizer());
828+
fields.UseAuth ? Config.Authorizer : TRequestAuthorizer(),
829+
fields.MonServiceName);
828830
if (fields.Index) {
829831
fields.Index->Register(page);
830832
if (fields.SortPages) {

ydb/core/mon/mon.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class TMon {
5454
bool UseAuth = true;
5555
TVector<TString> AllowedSIDs;
5656
bool SortPages = true;
57+
TString MonServiceName = "utils";
5758
};
5859

5960
virtual NMonitoring::IMonPage* RegisterActorPage(TRegisterActorPageFields fields) = 0;

ydb/core/mon/mon_impl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,14 +360,15 @@ class TActorMonPage: public IMonPage {
360360
public:
361361
TActorMonPage(const TString &path, const TString &title, const TString &host, bool preTag,
362362
TActorSystem *actorSystem, const TActorId &actorId, const TVector<TString> &sids,
363-
TMon::TRequestAuthorizer authorizer)
363+
TMon::TRequestAuthorizer authorizer, TString monServiceName = "utils")
364364
: IMonPage(path, title)
365365
, Host(host)
366366
, PreTag(preTag)
367367
, ActorSystem(actorSystem)
368368
, TargetActorId(actorId)
369369
, AllowedSIDs(sids)
370370
, Authorizer(std::move(authorizer))
371+
, MonServiceName(monServiceName)
371372
{
372373
}
373374

@@ -405,6 +406,7 @@ class TActorMonPage: public IMonPage {
405406
TActorId TargetActorId;
406407
const TVector<TString> AllowedSIDs;
407408
TMon::TRequestAuthorizer Authorizer;
409+
TString MonServiceName;
408410
};
409411

410412
inline TString GetPageFullPath(const NMonitoring::IMonPage* page) {

ydb/core/mon/sync_http_mon.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ namespace NActors {
8181
fields.ActorSystem,
8282
fields.ActorId,
8383
fields.AllowedSIDs ? fields.AllowedSIDs : Config.AllowedSIDs,
84-
fields.UseAuth ? Config.Authorizer : TRequestAuthorizer());
84+
fields.UseAuth ? Config.Authorizer : TRequestAuthorizer(),
85+
fields.MonServiceName);
8586
if (fields.Index) {
8687
fields.Index->Register(page);
8788
if (fields.SortPages) {

ydb/deploy/helm/ydb-prometheus/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ ydb:
102102
format: prometheus
103103
tenant: "{{ .target.path }}"
104104
skipNameRelabeling: true
105+
- counter: dsproxy_mon
105106

106107
# Cluster which will be monitored
107108
clusters: []

0 commit comments

Comments
 (0)