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

Srikanth Chekuri

01/11/2023, 7:37 PM
Can I access the time variable in Signoz for dashboard queries?
Yes, you could use
{{.SIGNOZ_START_TIME}}
and
{{.SIGNOZ_END_TIME}}
.
If not then what is it’s purpose for in the dashboard tab?
The configure tab allows you to define a variable whose values are queryable from ClickHouse.
t

Timothy Wigginton

01/11/2023, 8:02 PM
Thanks for the help, I appreciate it. So can I use it like
WHERE timestamp BETWEEN {{.SIGNOZ_START_TIME}}  AND {{.SIGNOZ_END_TIME}}
or will I have to convert them?
s

Srikanth Chekuri

01/11/2023, 8:03 PM
The precision is in millis so depending on the target column you would have to convert.
The result should have a time type column, one float column and any number of optional string columns. Only the string labels columns in the result can be used for legend formatting.
a

Ankit Nayan

01/12/2023, 6:01 AM
@Srikanth Chekuri 👆 is part of any docs? If not we should add
t

Timothy Wigginton

01/12/2023, 7:23 PM
Okay one of the things that confused me was using variables in the Legend Format. For example I have variable called Workflow which I use in my queries but the Legend Format can only use variables within the query not the ones defined outside of the query. So I couldn’t use workflow but I can use serviceName.
s

Srikanth Chekuri

01/13/2023, 12:02 AM
You can only use the labels that are part of the query response because we wouldn’t know anything about the workflow in the response time series. If you want to have a workflow in legend formatting, aggregate group by workflow, and you will be able to use it.
7 Views