-
Notifications
You must be signed in to change notification settings - Fork 128
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
recording rules not work #74
Comments
My lack of knowledge might not be identifying this issue properly but.. are you following config example file? https://github.com/jacksontj/promxy/blob/master/cmd/promxy/config.yaml#L11 |
@marioanton Yes, I add it. I can find rule details in web ui. but query 'query_qps', result |
isn't that looking for rule files created on prom? Rule files specifies a list of globs. Rules and alerts are read from all matching files.Sorry, might be confusing this a bit more. |
I want to know , recording rules config on promxy or prometheus? When I config on promxy, look for rules on promxy web ui, but it can't query in promxy. However, When I config rule on prometheus, it can query in promxy. |
Thanks for opening an issue! Promxy does load the config for recording rules, and it even actually executes them, but it has no place to store them. Promxy used to actually log the values with a warning saying they aren't stored, but it looks like in the prom 2.x upgrade that was lost. Basically for this to work promxy needs to implement the Appender interface here. Unfortunately prometheus doesn't expose a remote_write endpoint or other API for external services to append points into it. So, in case you got lost in the wall of text (apologies if its too much detail)-- promxy executes the rules but has no place to put the metrics (prom doesn't have an API to append points into). If its helpful I can implement an option to push that to a remote_write endpoint, but prom doesn't have that-- so you'd need something else to store that. Alternatively, if thats not useful I'll just add back in the warning logs etc. about this behavior. |
Promxy doesn't currently support storing recording rules, because prometheus has no remote write API -- meaning promxy has no place to put the metrics. This used to log (before the 2.x upgrade)-- but that was dropped and this is confusing again. This patch adds 2 layers of logging. (1) in main it checks for recording rules on start (where it will fatal log) and on reload (error log) (2) the ProxyStorage.Appender() now also logs a warning. This will remain in place until #79 (the long term plan) is figured out and executed Fixes #74
Promxy doesn't currently support storing recording rules, because prometheus has no remote write API -- meaning promxy has no place to put the metrics. This used to log (before the 2.x upgrade)-- but that was dropped and this is confusing again. This patch adds 2 layers of logging. (1) in main it checks for recording rules on start (where it will fatal log) and on reload (error log) (2) the ProxyStorage.Appender() now also logs a warning. This will remain in place until #79 (the long term plan) is figured out and executed Fixes #74
As an update here, #90 was merged in which adds support for recording rules through the use of remote_write endpoints. |
set a recording rule:
query
irate(http_requests_total{handler="query"}[5m])
, can find data.query
query_qps
, resultno data
.The text was updated successfully, but these errors were encountered: