-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-14164] New Alert for clock drift
Summary: Created a new alert to report when chronyc (and soon ntpd) report clock skew >200 (warning) and > 400 (severe) milliseconds. This leverages the clock drift health check, which currently only uses chrony, but will be enhanced for ntpd. Test Plan: created universe and manually caused clock skew. Valdiated alert was correctly raised Reviewers: sanketh, amalyshev, skurapati Reviewed By: amalyshev Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D36850
- Loading branch information
Showing
6 changed files
with
61 additions
and
13 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
21 changes: 21 additions & 0 deletions
21
managed/src/main/resources/db/migration/default_/postgres/V366__Alert_Clock_Drift.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,21 @@ | ||
-- Copyright (c) YugaByte, Inc. | ||
|
||
-- Clock skew alert | ||
insert into alert_configuration | ||
(uuid, customer_uuid, name, description, create_time, target_type, target, thresholds, threshold_unit, template, active, default_destination) | ||
select | ||
gen_random_uuid(), | ||
uuid, | ||
'High clock drift', | ||
'Local clock on the node has drift too far from the actual time.', | ||
current_timestamp, | ||
'UNIVERSE', | ||
'{"all":true}', | ||
'{"WARNING":{"condition":"GREATER_THAN","threshold":200.0},"SEVERE":{"condition":"GREATER_THAN", "threshold":400.0}}', | ||
'MILLISECOND', | ||
'NODE_CLOCK_DRIFT', | ||
true, | ||
true | ||
from customer; | ||
|
||
select create_universe_alert_definitions('High clock drift'); |
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
Oops, something went wrong.