Skip to content

Commit

Permalink
Use uptime() instead of relying on asynchronous metrics
Browse files Browse the repository at this point in the history
Later may not be updated that frequently, anyway it has lag.
  • Loading branch information
azat committed Nov 29, 2023
1 parent 8045bcd commit 70af7e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interpreter/clickhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ impl ClickHouse {
-- NOTE: cast should be after aggregation function since the type is Float64
SELECT
minIf(value, metric == 'OSUptime')::UInt64 AS os_uptime,
minIf(value, metric == 'Uptime')::UInt64 AS uptime,
min(uptime())::UInt64 AS uptime,
-- memory
sumIf(value, metric == 'OSMemoryTotal')::UInt64 AS os_memory_total,
sumIf(value, metric == 'MemoryResident')::UInt64 AS memory_resident,
Expand Down

0 comments on commit 70af7e4

Please sign in to comment.