My Prometheus Query from grafana yields Http 400 due to request size.

15 views
Skip to first unread message

Debashish Ghosh

unread,
Jan 11, 2021, 11:49:48 AM1/11/21
to Prometheus Users
Hi,
   I am using grafana templating to form prometheus query based on values from the template. Currently I am using 2 template parameters Organization and Product . The full query is below :
(sum by (Organization,Endpoint) (rate(custom_latency_endpoint_organization_total{job="Interop-InboundApiListener-Staging",Organization=~"$Organization",Endpoint=~"$Endpoint"}[5m])) - sum by (Organization,Endpoint) (rate(custom_latency_backend_endpoint_organization_total{job="Interop-InboundApiListener-Staging",Organization=~"$Organization",Endpoint=~"$Endpoint"}[5m])))/sum by (Organization,Endpoint) (rate(custom_message_volume_endpoint_organization_total{job="Interop-InboundApiListener-Staging",Organization=~"$Organization",Endpoint=~"$Endpoint"}[5m])) 

It gets the differential between 2 latency values and divides by the number of events.
It keeps giving "400 Bad Request. Your browser send an invalid request" . I figured out that when I decrease the number of items in Organization variable it works . There is a threshold after which even when I add a single organization it fails. Is there a way to get around this issue ? We anticipate the $Organization list will grow in future . What is the solution to work around this problem ?

Thanks
Debashish

Julien Pivotto

unread,
Jan 11, 2021, 2:37:59 PM1/11/21
to Debashish Ghosh, Prometheus Users
Hello

In the prometheus datasource settings in grafana, set HTTP Method to
"POST".

Regards,

>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/af47cb3c-54d0-46c8-b489-6c4a9a8a6f58n%40googlegroups.com.


--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages