https://signoz.io logo
#general
Title
# general
a

Alejandro Decchi

05/11/2023, 8:36 PM
Looks I have not space at clickhouse:
Copy code
Cannot reserve 1.00 MiB, not enough space
how can i drop my data from clickhouse since x days?
a

Alejandro Decchi

05/12/2023, 11:28 AM
Ahaa ok. I thought I have an option via SigNoz UI to clean data from determined date
On the other hand, is a way to say for example application with tag service name helloworld keep traces from last 15 days ?
s

Srikanth Chekuri

05/12/2023, 3:35 PM
Yes, there is some form of tag level TTL, but there is no way to do it from UI.
a

Alejandro Decchi

05/14/2023, 5:06 PM
How can I do it ? Without the UI ?
s

Srikanth Chekuri

05/15/2023, 4:49 AM
through clickhouse command line
a

Alejandro Decchi

05/15/2023, 2:06 PM
can you share that command ?
s

Srikanth Chekuri

05/15/2023, 2:29 PM
I know it exists but haven’t tried it ourselves.
v

Vishal Sharma

05/15/2023, 2:36 PM
Here’s an example @Alejandro Decchi for the your case
Copy code
CREATE TABLE events
(
    `event` String,
    `time` DateTime,
    `value` UInt64
)
ENGINE = MergeTree
ORDER BY (event, time)
TTL time + INTERVAL 1 MONTH DELETE WHERE event != 'error',
    time + INTERVAL 6 MONTH DELETE WHERE event = 'error'
16 Views