Create custom dynamic variable for Prometheus

Hello All,

I want to create a custom variable with key-value pairs.
But I want to value to be changed dynamically… will it be possible?
Actually, I want to pass the current epoch as a value that should increment automatically. will it be possible?

ex: value : ${__from:date:seconds} ----> this will give current epoch time,
can we do any subtraction operations from ${__from:date:seconds}
is my syntax correct?

Can anyone help me?

Thanks & regards,
Bharath Kumar

Hi @chembakayalabharath

What datasource you are using ?

Hello @usman.ahmad ,

Prometheus Data source

ex: value : ${__from:date:seconds}

This is throwing me syntax error… can anyone help me?

So your query ${__from:date:seconds} does not give me an error when using it.

OR do you get an error when using it with a subtraction operation of yours?

Can you please maybe share some screenshots?