This is my query, which aims to compute our Clickhouse instance's disk utilization:
Copy code
WITH
left_table AS (select metric, value, event_time from system.asynchronous_metric_log where metric = 'DiskTotal_default' and toSecond(event_time) == 0 and modulo(toMinute(event_time),5) == 0 limit 288),
right_table AS (select metric, value, event_time from system.asynchronous_metric_log where metric = 'DiskUsed_default' and toSecond(event_time) == 0 and modulo(toMinute(event_time),5) == 0 limit 288)
SELECT
r.value / l.value as value, l.event_time FROM left_table AS l
LEFT JOIN right_table AS r ON l.event_time = r.event_time;
Nicolas Rakover
01/04/2024, 4:43 PM
cc @Samuel Bacaner
🙏 1
s
Srikanth Chekuri
01/04/2024, 11:40 PM
When you run the query directly on ClickHouse what do you get as a result? Did you change any ClickHouse server settings?
SigNoz is an open-source APM. It helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc.