Hi Everyone, How do I filter my Dashboard variable with the relative time selected in the dashboard.
s
Hi Everyone, How do I filter my Dashboard variable with the relative time selected in the dashboard.
It seems that the filter is not working.
Copy code
timestamp BETWEEN {{.start_timestamp}} AND {{.start_timestamp}}
We are running an on premise version. v0.51.0
s
Share the full query (with specific details masked) you are using
s
Hi, Here you go.
Copy code
SELECT DISTINCT JSONExtractString(labels, 'id') AS name
FROM signoz_metrics.distributed_time_series_v2
WHERE JSONExtractString(labels, 'id') IS NOT NULL
AND JSONExtractString(labels, 'id') != ''
AND (timestamp BETWEEN {{.start_timestamp}} AND {{.start_timestamp}})
@Srikanth Chekuri does the query help?
s
Copy code
SELECT DISTINCT JSONExtractString(labels, 'id') AS name
FROM signoz_metrics.time_series_v4
WHERE metric_name IN [...]
AND (unix_milli >= intDiv({{.start_timestamp_ms}}, 3600000) * 3600000) AND (unix_milli <= intDiv({{.end_timestamp_ms}}, 3600000) * 3600000)
HAVING name != ''
Please make sure you add metric name, otherwise it will be slow.
s
Thank you, it seems our version does not have the start end end time variables. PR:https://github.com/SigNoz/signoz/pull/5714 Version 0.53.0