-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatch between Promxy and Trickster times returning empty responses #677
Comments
First off, thanks for the question! And a nicely presented one at that! I'll go ahead and jump into it:
To me this seems like "expected behavior" since promxy is configured to ignore the error; so it is "as good" as if it returned nothing.
So AFAIK promxy doesn't mess with the "step" of a query. The example you posted there is for handling the case where someone does a query like
That is my expected behavior as well. When I've run trickster + promxy I have always run it as
I answered this above, so I'll consider this answered :)
To clarify a bit; this is a promxy thing. Promql has some internal logic for altering the timestamp in the offset -- but when promxy does nodereplacer it doesn't have that same logic -- so we have to adjust the offset to get a timeseries back at the correct time.
The
I covered this a bit earlier; but I don't think there are times where promxy re-aligns the step like that. As a matter of fact there was a bug earlier where that was happening when it shouldn't (#663). So overall for your use-case putting something in front of promxy to handle the "extent alignment" fixes the "shifting" and your approach of caching pre-prometheus API seems to address that side. This also reminds me of an old issue I created for adding |
@jacksontj thanks for your time and detailed answers! As per your comments, our approach will be returning to the trickster -> promxy architecture, with all server groups as mandatory. (Our "optionals" server groups had "non-critical" metrics (eg: non-productive env's), but now seems reasonable configuring them as mandatory) |
I'm glad that we were able to sort that out! Metrics systems seem simple; but can easily get quite complex :) I'll go ahead and close this out for now; but if you have any further questions feel free to re-open or create a new issue; happy promxy-ing :) |
Hi!
We are exploring a new setup for promxy and trickster, but we are facing time shifting issues and empty responses. Maybe with some similarity to #537
With our current setup (centralized cache):
Assuming that we are requesting data ingested only in B, but B is returning a punctual error. A and C are returning a valid empty response.
Promxy, as configured, returns an empty response ignoring the B error.
But then trickster caches the empty response, returning it until the cache expires.
We can assume a punctual no data due to the punctual error, but not the long-term cached no data.
New explored setup (cache per servergroup):
With this new setup, errors on B are not cached by trickster but we've realised that some queries are returning unexpected empty responses:
After some investigation, we are pointing to the time mismatch between Trickster and Promxy:
For example, a query range with the following params to trickster:
Truncates the times and returns samples on the following timestamps:
So, in our responses:
At this point, truncating the time range (as trickster does) before promxy, could fix our value shifting and empty responses.
But we've realized that promxy can adapts the start and end time in some cases, for example, when the query includes an offset.
promxy/pkg/proxystorage/proxy.go
Lines 388 to 395 in 7c5eda6
So we are exposed again to the shifted values and empty responses...
and here some questions...
The text was updated successfully, but these errors were encountered: