Skip to content
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

Monitoring Dashboards: Use /query_range to fetch label values #4099

Conversation

kyoto
Copy link
Member

@kyoto kyoto commented Jan 29, 2020

Use /query_range instead of /query to fetch the available label
values so that all values during the time range are returned, not just
the values available right now.

Using /query_range is not perfect because it is not 100% guaranteed to
return all values. Specifically, short lived series could be missed by
/query_range's data sampling. Although this should be very unlikely in
practice.

Using /series would be guaranteed to return all series, but it is not
yet available through our API proxy. Using /series should also be more
efficient.

We also can't use /label/<LABEL>/values because it doesn't take a
label selector.

In future, we should aim to make the Prometheus /series endpoint available through our API proxy.

FYI @s-urbaniak

Use `/query_range` instead of `/query` to fetch the available label
values so that all values during the time range are returned, not just
the values available right now.

Using `/query_range` is not perfect because it is not 100% guaranteed to
return all values. Specifically, short lived series could be missed by
`/query_range`'s data sampling. Although this should be very unlikely in
practice.

Using `/series` would be guaranteed to return all series, but it is not
yet available through our API proxy. Using `/series` should also be more
efficient.

We also can't use `/label/<LABEL>/values` because it doesn't take a
label selector.
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/monitoring Related to monitoring labels Jan 29, 2020
@s-urbaniak
Copy link
Contributor

As discussed yesterday OOB this is to my knowledge the current low-hanging fruit workaround.

/cc @openshift/openshift-team-monitoring
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kyoto, s-urbaniak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit fc46950 into openshift:master Jan 29, 2020
@brancz
Copy link

brancz commented Jan 29, 2020

cc @simonpasquier how difficult would it be to add the series endpoint filtering to the prom label proxy? The way I see it is just doing the request and filtering for the configured label, seems like a pretty quick change no?

@s-urbaniak
Copy link
Contributor

fwiw created https://issues.redhat.com/browse/MON-960 so we can track this internally.

@simonpasquier
Copy link
Contributor

@brancz yes it should be easy to do. This is similar to what we're doing for the alerts and rules endpoints.

@brancz
Copy link

brancz commented Jan 29, 2020

If you think you can get it done in a reasonably time boxed manner, I'd be more than happy to review that. Query range is somewhat problematic performance wise.

@kyoto kyoto deleted the monitoring-dashboards-label-values-range branch January 30, 2020 01:05
@spadgett spadgett added this to the v4.4 milestone Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/monitoring Related to monitoring lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants