Skip to content

Commit a1a4409

Browse files
authored
Move blobstorageproxies actor services to different monitoring shard (#8815)
1 parent df7e1b2 commit a1a4409

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
@@ -219,7 +219,8 @@ class THttpMonLegacyActorRequest : public TActorBootstrapped<THttpMonLegacyActor
219219
void ReplyWith(NHttp::THttpOutgoingResponsePtr response) {
220220
TString url(Event->Get()->Request->URL.Before('?'));
221221
TString status(response->Status);
222-
NMonitoring::THistogramPtr ResponseTimeHgram = NKikimr::GetServiceCounters(NKikimr::AppData()->Counters, "utils")
222+
NMonitoring::THistogramPtr ResponseTimeHgram = NKikimr::GetServiceCounters(NKikimr::AppData()->Counters,
223+
ActorMonPage->MonServiceName)
223224
->GetSubgroup("subsystem", "mon")
224225
->GetSubgroup("url", url)
225226
->GetSubgroup("status", status)
@@ -870,7 +871,8 @@ NMonitoring::IMonPage* TAsyncHttpMon::RegisterActorPage(TRegisterActorPageFields
870871
fields.ActorSystem,
871872
fields.ActorId,
872873
fields.AllowedSIDs ? fields.AllowedSIDs : Config.AllowedSIDs,
873-
fields.UseAuth ? Config.Authorizer : TRequestAuthorizer());
874+
fields.UseAuth ? Config.Authorizer : TRequestAuthorizer(),
875+
fields.MonServiceName);
874876
if (fields.Index) {
875877
fields.Index->Register(page);
876878
if (fields.SortPages) {

ydb/core/mon/mon.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class TMon {
6060
bool UseAuth = true;
6161
TVector<TString> AllowedSIDs;
6262
bool SortPages = true;
63+
TString MonServiceName = "utils";
6364
};
6465

6566
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)