From 831fe390a9744f1148f1904151985174d7febd77 Mon Sep 17 00:00:00 2001 From: an1l4 <1995anila@gmail.com> Date: Sun, 5 Nov 2023 11:13:10 +0530 Subject: [PATCH 1/2] ttl-readme-added --- README.md | 12 +++++++++++- docs/CONFIGURATION_TTL.md | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 docs/CONFIGURATION_TTL.md diff --git a/README.md b/README.md index 0912d993..cc832512 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,17 @@ export POD_NAME=$(kubectl get pods --namespace kubviz -l "app.kubernetes.io/name kubectl --namespace kubviz port-forward $POD_NAME 3000 ``` -3. Access "localhost:3000" in your web browser, where you'll be prompted to enter your credentials. Utilize the username "admin" and the password obtained from step 1 to proceed. +3. Access "localhost:3000" in your web browser, where you'll be prompted to enter your credentials. Utilize the username "admin" and the password obtained from step 1 to proceed. + +#### TTL - Time-To-Live Feature + +We've implemented a Time-To-Live (TTL) feature to streamline the management of data within your ClickHouse tables. With TTL, historical data can be automatically relocated to alternative storage or purged to optimize storage space. This feature is particularly valuable for scenarios like time-series data or logs where older data gradually loses its relevance over time. + +#### Configuring TTL + +The TTL value is customizable, empowering you to define the specific duration after which data is marked as 'expired'. + +To guide you through the process of setting up a TTL, [please follow these steps](docs/CONFIGURATION_TTL.md) ## Use Cases diff --git a/docs/CONFIGURATION_TTL.md b/docs/CONFIGURATION_TTL.md new file mode 100644 index 00000000..cf4a165e --- /dev/null +++ b/docs/CONFIGURATION_TTL.md @@ -0,0 +1,17 @@ +# Configuring TTL: Guidelines and Instructions + +- **TTL_INTERVAL**: This parameter sets the numeric value for the TTL duration. For instance, if you wish for data to expire after a duration of 2 time units, set this value to 2. The default value is 1. + +- **TTL_UNIT**: This parameter specifies the time unit for the TTL duration. It accepts valid values such as SECOND, MINUTE, HOUR, DAY, MONTH, and more. For example, to set a TTL of 2 hours, you would set TTL_INTERVAL to 2 and TTL_UNIT to HOUR. The default unit is MONTH. + +# Usage + +## Setting Environment Variables + +To configure TTL for your application, set the desired environment variables. Here's an example of how to do this: + +```bash +export TTL_INTERVAL=5 +export TTL_UNIT=MINUTE +``` + From 60b0c95ea91604bec354367c4a076f6f12083d12 Mon Sep 17 00:00:00 2001 From: an1l4 <1995anila@gmail.com> Date: Fri, 10 Nov 2023 22:35:52 +0530 Subject: [PATCH 2/2] conflict --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc832512..bb19e359 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ helm upgrade -i kubviz-agent kubviz/agent -n kubviz --set nats.host=