Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions ydb/core/health_check/health_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1326,15 +1326,15 @@ class TSelfCheckRequest : public TActorBootstrapped<TSelfCheckRequest> {
static void Check(TSelfCheckContext& context, const NKikimrWhiteboard::TSystemStateInfo::TPoolStats& poolStats) {
if (poolStats.name() == "System" || poolStats.name() == "IC" || poolStats.name() == "IO") {
if (poolStats.usage() >= 0.99) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::ORANGE, "Pool usage is over than 99%", ETags::OverloadState);
context.ReportStatus(Ydb::Monitoring::StatusFlag::ORANGE, "Pool usage is over 99%", ETags::OverloadState);
} else if (poolStats.usage() >= 0.95) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Pool usage is over than 95%", ETags::OverloadState);
context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Pool usage is over 95%", ETags::OverloadState);
} else {
context.ReportStatus(Ydb::Monitoring::StatusFlag::GREEN);
}
} else {
if (poolStats.usage() >= 0.99) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Pool usage is over than 99%", ETags::OverloadState);
context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Pool usage is over 99%", ETags::OverloadState);
} else {
context.ReportStatus(Ydb::Monitoring::StatusFlag::GREEN);
}
Expand Down Expand Up @@ -1530,9 +1530,9 @@ class TSelfCheckRequest : public TActorBootstrapped<TSelfCheckRequest> {
if (static_cast<i64>(domain.GetPathsLimit()) - static_cast<i64>(domain.GetPathsInside()) <= 1) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::RED, "Paths quota exhausted", ETags::QuotaUsage);
} else if (usage >= 0.99) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::ORANGE, "Paths quota usage is over than 99%", ETags::QuotaUsage);
context.ReportStatus(Ydb::Monitoring::StatusFlag::ORANGE, "Paths quota usage is over 99%", ETags::QuotaUsage);
} else if (usage >= 0.90) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Paths quota usage is over than 90%", ETags::QuotaUsage);
context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Paths quota usage is over 90%", ETags::QuotaUsage);
} else {
context.ReportStatus(Ydb::Monitoring::StatusFlag::GREEN);
}
Expand All @@ -1543,9 +1543,9 @@ class TSelfCheckRequest : public TActorBootstrapped<TSelfCheckRequest> {
if (static_cast<i64>(domain.GetShardsLimit()) - static_cast<i64>(domain.GetShardsInside()) <= 1) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::RED, "Shards quota exhausted", ETags::QuotaUsage);
} else if (usage >= 0.99) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::ORANGE, "Shards quota usage is over than 99%", ETags::QuotaUsage);
context.ReportStatus(Ydb::Monitoring::StatusFlag::ORANGE, "Shards quota usage is over 99%", ETags::QuotaUsage);
} else if (usage >= 0.90) {
context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Shards quota usage is over than 90%", ETags::QuotaUsage);
context.ReportStatus(Ydb::Monitoring::StatusFlag::YELLOW, "Shards quota usage is over 90%", ETags::QuotaUsage);
} else {
context.ReportStatus(Ydb::Monitoring::StatusFlag::GREEN);
}
Expand Down Expand Up @@ -2241,15 +2241,15 @@ class TSelfCheckRequest : public TActorBootstrapped<TSelfCheckRequest> {
break;
}
case ETags::VDiskState: {
message = std::regex_replace(message.c_str(), std::regex("^VDisk has "), "VDisk have ");
message = std::regex_replace(message.c_str(), std::regex("^VDisk has "), "VDisks have ");
message = std::regex_replace(message.c_str(), std::regex("^VDisk is "), "VDisks are ");
message = std::regex_replace(message.c_str(), std::regex("^VDisk "), "VDisk ");
message = std::regex_replace(message.c_str(), std::regex("^VDisk "), "VDisks ");
break;
}
case ETags::PDiskState: {
message = std::regex_replace(message.c_str(), std::regex("^PDisk has "), "PDisk have ");
message = std::regex_replace(message.c_str(), std::regex("^PDisk has "), "PDisks have ");
message = std::regex_replace(message.c_str(), std::regex("^PDisk is "), "PDisks are ");
message = std::regex_replace(message.c_str(), std::regex("^PDisk "), "PDisk ");
message = std::regex_replace(message.c_str(), std::regex("^PDisk "), "PDisks ");
break;
}
default:
Expand Down