Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up[feature] Add PromQL support for querying metrics at an absolute time #1888
Comments
This comment has been minimized.
This comment has been minimized.
|
@ncabatoffims Would this be solved by this UI feature? #1246 |
This comment has been minimized.
This comment has been minimized.
|
Not really, because sometimes I want to look at the raw data in text form rather than the graph. I can just use Grafana if I want to have a static window of time in which to experiment with graphs. |
This comment has been minimized.
This comment has been minimized.
|
I think #1246 is about that - allowing timestamp also for instant queries in the console. |
This comment has been minimized.
This comment has been minimized.
|
I'm not sure this belongs in PromQL itself, wanting to compare a range against an absolute vs relative time slice that we currently support doesn't seem like something that you'd want to do and may cause confusion. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I think #1246 only makes sense in the context of console / instant queries since graphs allow you to specify the exact time range already. So yeah, it's about the console view. Would be an easy feature to add, as the backend support for that is already there. |
This comment has been minimized.
This comment has been minimized.
|
Ah, you're right, shows how little I use the Prometheus Graph feature. Closing as dup. |
ncabatoffims
closed this
Aug 11, 2016
This comment has been minimized.
This comment has been minimized.
sharpensteel
commented
Oct 30, 2017
•
This comment has been minimized.
This comment has been minimized.
flaviostutz
commented
Sep 25, 2018
|
I wanted to create an alert that compares the current metrics to another in a specific point in time. In this case, this specific point in time was a time when I determined everything was normal. How would I do this in a query? Any ideas? |
This comment has been minimized.
This comment has been minimized.
|
@flaviostutz I don't think there's a way to do that in a single PromQL alerting rule as long as it's about an absolute time and not a relative one. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |

ncabatoffims commentedAug 11, 2016
When investigating anomalies it would be helpful to be able to issue queries relative to a specific point in time. For example, when I was trying to determine what was causing the odd histogram_quantile graphs which led me to file #1887, I was trying to see the raw data for the anomalous data point in the console. The process was iterative as I refined my query and tried different ways to make sense of the data. Each time I tried a new query, I would often find that the offset had to be updated, e.g.
test1 offset 53m
think, read docs
test2 offset 53m
nope, more than 1m passed
test2 offset 54m
test2 offset 55m
think, read docs
test3 offset 55m
test3 offset 56m
It's annoying. I'd like to be able to simply say
test1 @ 1470941522
or maybe even
test1 @ 20160811T185803Z
I understand the use case for wanting to get metrics from an absolute point in time isn't a very important one, but it would be a nice convenience.