#support

Deleting Logs and Traces for Docker

TLDR Vishal asked how to delete logs and traces for Docker. vishal-signoz provided a solution to truncate tables and shared steps to connect for Docker users.

Powered by Struct AI
raised_hands1
4
6mo
Solved
Join the chat
Mar 06, 2023 (6 months ago)
Vishal
Photo of md5-025a9ce02e4e73a327256dd5dc0f4401
Vishal
04:56 AM
@support how to delete all logs and traces for the docker ?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
05:46 AM
If you are able to connect to clickhouse then you can truncate tables:
kubectl exec -n platform -it chi-my-release-clickhouse-cluster-0-0-0 -- sh

clickhouse client

// run below clickhouse queries to trunacte

truncate table signoz_logs.logs;

truncate table signoz_traces.signoz_index_v2;
truncate table signoz_traces.signoz_spans;
truncate table signoz_traces.signoz_error_index_v2;
truncate table signoz_traces.durationSort;
truncate table signoz_traces.top_level_operations;
truncate table signoz_traces.usage_explorer;
Vishal
Photo of md5-025a9ce02e4e73a327256dd5dc0f4401
Vishal
05:47 AM
what about docker then?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
05:47 AM
If you are using docker then try below commands to connect: https://signoz.io/docs/operate/clickhouse/connect-to-clickhouse/#for-docker-users
raised_hands1