-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
365c6d1
commit cc693fd
Showing
1 changed file
with
20 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
ALTER TABLE events | ||
ALTER ENGINE = MergeTree(); | ||
CREATE TABLE IF NOT EXISTS new_events ( | ||
ClusterName String, | ||
Id String, | ||
EventTime DateTime('UTC'), | ||
OpType String, | ||
Name String, | ||
Namespace String, | ||
Kind String, | ||
Message String, | ||
Reason String, | ||
Host String, | ||
Event String, | ||
FirstTime String, | ||
LastTime String | ||
) ENGINE = MergeTree() | ||
ORDER BY (ClusterName, EventTime) | ||
TTL EventTime + INTERVAL 10 MINUTE | ||
SETTINGS index_granularity = 8192; | ||
|
||
ALTER TABLE new_events RENAME TO events; |