Skip to content

Too many historic pods causes querystring too long for Prometheus range_query API #60

Closed

Description

@lujiajing1126

Describe the bug

If we have many historic pods, the query expr will be very long. Then at some point, the request may be rejected by the gateway, e.g. Nginx. HTTP code 422 may be returned.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Use POST API instead of GET.

https://github.com/4n4nd/prometheus-api-client-python/blob/39c5710521134fc450e9b4103cbb5995c05c5273/prometheus_api_client/prometheus_connect.py#L403-L409

But since we are using prometheus-api-client-python, it is not possible to do this.

Screenshots

image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Activity

  1. LeaveMyYard commented on Jul 5, 2023

    @LeaveMyYard
    Contributor

    I have responded with a longer message in #67, but will repeat again here: we descided that using POST is a correct way and we can do that by subclassing the library connector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions