PromQL query passing the interval '1vw' as a variable fails with error.

This article applies to:

• Querying/PromQl

• Product edition: All

• Feature Category: Prometheus


Feature Category: Query, Prometheus,


Problem Description:
When PromQL query passes the interval '1vw' as a variable it fails with 'Error' when the converted WQL query succeeds.




     Variable Name: time
     Variable Value: 1vw


Converted WQL
     rawcount(aliasMetric(mcount(${time}, ts(kube.pod.create, namespace="runners")), ''))


Error Messages/Messages

Your query contained a syntax error (Query syntax error: rule stack: [program, expr, atom, application, exprList, expr, atom, application, exprList, expr, subQuery] line 1:61,1:63 (text='vw'): - no viable alternative at input '[1vw' )



Currently it is possible only to pass variables such as minute, hour and day (Example, 1m, 1h, 1d) but not the View Window length, '1vw'.

A feature request has been submitted to pass the View Window length (1vw) as a variable.



Currently there is no workaround, must use defined values such as 1h, 1w, 1m,  as a variable value.


See also:

Using PromQL with Tanzu Observability
Set Up Tanzu Observability as a PromQL Data Source in Grafana

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request