-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-13520] Create alert for running out of tablets
Summary: Create alert for running out of tablets. DB team is introducing a new feature, the tablet guardrail mechanism, that will be available in 2024.1 onwards. If the below two metrics exist (they are not present in older versions) and the first metric is not -1 then for each TServer the ratio `ts_live_tablet_peers/ts_supportable_tablet_peers` tends towards 1.0 as we approach the tablet peer limit for that TServer. This PR adds a universe level alert with a warning when this ratio is more than 0.9 and severe if ratio is more than 1.0. Test Plan: Manually tested the alert: * With a threshold of 0 on a universe - alert triggered (Expected) * With default threshold on a universe - alert not triggered (Expected) Reviewers: amalyshev, mlillibridge Reviewed By: amalyshev Subscribers: sanketh, yugaware Differential Revision: https://phorge.dev.yugabyte.com/D34913
- Loading branch information
Showing
5 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
.../src/main/resources/db/migration/default_/postgres/V346__Tablet_Peers_Guardrail_Alert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- Copyright (c) YugaByte, Inc. | ||
|
||
-- Tablet peers guardrail | ||
insert into alert_configuration | ||
(uuid, customer_uuid, name, description, create_time, target_type, target, thresholds, threshold_unit, template, duration_sec, active, default_destination) | ||
select | ||
gen_random_uuid(), | ||
uuid, | ||
'Percentage of tablet peers is high', | ||
'It represents the percentage of number of live tablet peers compared to number of tablet peers that can be supported based on available RAM, cores, etc.', | ||
current_timestamp, | ||
'UNIVERSE', | ||
'{"all":true}', | ||
'{"WARNING":{"condition":"GREATER_THAN","threshold":90.0},"SEVERE":{"condition":"GREATER_THAN", "threshold":100.0}}', | ||
'PERCENT', | ||
'TABLET_PEERS_GUARDRAIL', | ||
1200, | ||
true, | ||
true | ||
from customer; | ||
|
||
select create_universe_alert_definitions('Percentage of tablet peers is high'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.