https://signoz.io logo
#support
Title
# support
c

C H

09/06/2022, 8:30 AM
How can i clean logs / traces history in signoz ?
v

Vishal Sharma

09/06/2022, 8:59 AM
Hey @C H you can update retention period in settings: https://signoz.io/docs/userguide/retention-period/
c

C H

09/06/2022, 9:12 AM
yes already done that
but my clickhouse dir is huge 24G ./clickhouse
with history set to one day and very very few traffic
v

Vishal Sharma

09/06/2022, 9:15 AM
After setting retention period the old data clean up happens slowly. Can you check if you can see old data by sorting trace table by timestamp in descending order?
c

C H

09/06/2022, 9:18 AM
no after cleanup i cannot see old traces / logs
but store dir is always huge 24G ./clickhouse/store
maybe an upgrade or a bad migration between signoz version or a bug ?
v

Vishal Sharma

09/06/2022, 9:19 AM
What’s total number of traces? Check on trace page by setting datetime to last 7 days/ 1 week
c

C H

09/06/2022, 9:20 AM
65k traces
v

Vishal Sharma

09/06/2022, 9:21 AM
Which version are you running? and did you upgrade to any new version?
Can you also if check logs are being stored?
c

C H

09/06/2022, 9:22 AM
yes but i set logs retention period to 1 day
Copy code
24G     ./clickhouse/store
4.0K    ./clickhouse/metadata_dropped
76K     ./clickhouse/preprocessed_configs
4.0K    ./clickhouse/user_defined
33M     ./clickhouse/rocksdb
4.0K    ./clickhouse/metadata/information_schema
4.0K    ./clickhouse/metadata/INFORMATION_SCHEMA
60K     ./clickhouse/metadata
24K     ./clickhouse/access
4.0K    ./clickhouse/tmp
4.0K    ./clickhouse/user_scripts
16K     ./clickhouse/data/default
20K     ./clickhouse/data/signoz_metrics
36K     ./clickhouse/data/system
20K     ./clickhouse/data/signoz_logs
36K     ./clickhouse/data/signoz_traces
132K    ./clickhouse/data
24G     ./clickhouse
v

Vishal Sharma

09/06/2022, 9:23 AM
Which version are you running? and did you upgrade to latest version recently?
c

C H

09/06/2022, 9:24 AM
yes : v0.11.0
what is a best way to reset alll, i can loose my traces / logs / history
v

Vishal Sharma

09/06/2022, 9:27 AM
If you want to reset signoz completely then you need to first uninstall signoz and then delete signoz folder. This will delete all the data, You can do a fresh install now.
c

C H

09/06/2022, 9:31 AM
ok but i don't want to loose my configs dashboard & co 🙂 Is there a way to reset only clickhouse bad datas ?
Copy code
if i remove dir like : ./clickhouse/store/894/894eef96-289d-42d1-945e-1192b1a9d54f/202208_620497_676942_1793
v

Vishal Sharma

09/06/2022, 9:32 AM
Yes, you can safely remove
./clickhouse/store
Dashboards and configs are stored in sqlite db so they won’t be deleted.
c

C H

09/06/2022, 9:33 AM
Thks, i'm gonna try that.
ok, i removed store dir & uninstall / reinstall signoz 🙂
p

Prashant Shahi

09/06/2022, 1:03 PM
@C H You can make use Make commands below to remove all persisted data: ClickHouse (traces, metrics, and logs data) and SQLite (dashboard, alerts, users, and org data). At first bring down SigNoz cluster, run the following commands and bring it back up. For Standalone:
Copy code
make clear-standalone-data
For Swarm:
Copy code
make clear-swarm-data
c

C H

09/06/2022, 1:27 PM
ok thks 🙂
11 Views