Grafana Explorer wrong syntax

Please help me how to construct query in Grafana Explorer
if i need particular one of parameteres given here
for example i need only host=“database”
when i do nginx_ingress_controller_request_duration_seconds_bucket (host=“database”) it says wrong syntax
nginx_ingress_controller_request_duration_seconds_bucket{app_kubernetes_io_name=“ingress-nginx”, app_kubernetes_io_part_of=“ingress-nginx”, controller_class=“nginx”, controller_namespace=“ingress-nginx”, controller_pod=“nginx-ingress-controller-d4fc54”, host=“database”, instance=“bla_bla”, job=“kubernetes-pods”, kubernetes_namespace=“ingress-nginx”, kubernetes_pod_name=“nginx-ingress-controller-d4fc54b49-555mc”, le="+Inf", method=“GET”, namespace=“database”, path="/", service=“database-frontend”, status=“200”}

  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?

  • How are you trying to achieve it?

  • What happened?

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?strong text

It would appear you are trying to query Kubernetes? Are you using a plugin that is still supported? Or are you querying an actual database?

Grant !

I appreciate that you reacted to my question
i am using Ingres for kubernets 1.16

Please help me I will be very grateful to you
i am writing in query metrics Prometheus in Grafana to query ingress endpoint written in Kubernetes i have paths like /api /api/documents /api/database

histogram_quantile(
.5,
sum by (le, “//api”)(
rate(
nginx_ingress_controller_response_duration_seconds_bucket{
ingress =~ “$ingress”, path = ~"//api"
}[1m]
)

Grafana checks and syntax is ok but still it does work does not produce any graph

Could you be so kind to hint me where can i find how tor write paths with regular expression
because if i write
histogram_quantile(
.5,
sum by (le, path)(
rate(
nginx_ingress_controller_response_duration_seconds_bucket{
ingress =~ “$ingress”
}[1m]
)
)
)
it works ok

Please give me a hint what is wrong how to deal with that
Be healthy and strong!
Anatoli Guliaev
Kiev
Ukraine
)
)

сб, 30 окт. 2021 г. в 02:37, Grant Pinkos via Grafana Labs Community Forums <grafana@discoursemail.com>:

What Grafana version are you using? Can you post screenshots of your variables?

Grant!

I thank you for your answer
Sure i attached screenshots i have
If you know a bit more or somehow you can help me i will never forget it

the question is

there’s a API application in 12 pods of kubernetes
How can I pull the number of http queries
going to application
in grafana not just by paths written in ingress
but by different regular expressions like

/api/baza/operation/(?P<operation_id>[^{}/]+)

how can you pull them out, maybe know where to find info

i think i have kuber standard metrics, but i don’t know how to collect them in grafana from an application
within the pod of kubernetes

With respect
Anatoli Guliaev
Keiv

пн, 1 нояб. 2021 г. в 11:05, Grant Pinkos via Grafana Labs Community Forums <grafana@discoursemail.com>:

I think you need each of these items to be set up as separate variables. From your screenshots, it appears you have only 2 variables: Datasource and Service Ingress.

variables
attached

пн, 1 нояб. 2021 г. в 11:05, Grant Pinkos via Grafana Labs Community Forums <grafana@discoursemail.com>:

Have you tried to create another variable (e.g. operation)?

Thanks Grant!
But how could i query variable path from Prometheus

Variables

New

пн, 1 нояб. 2021 г. в 14:47, Grant Pinkos via Grafana Labs Community Forums <grafana@discoursemail.com>:

Grant !
Thanks for answering me
I even made screenshots you asked
where i am getting error

Please look at them and I ask you for help where can i find how to write by path = /api/documents in Grafana right syntax may be i need //\ some construction
Please help me

пн, 1 нояб. 2021 г. в 14:47, Grant Pinkos via Grafana Labs Community Forums <grafana@discoursemail.com>:

I’m sorry, but I have zero knowledge about Kubernetes, Ingress, and nginx (how does one pronounce that word?).

Maybe this will help? Kubernetes Ingress Controller Dashboard dashboard for Grafana | Grafana Labs

Good luck!

I’m sorry, but I have zero knowledge about Kubernetes, Ingress, and nginx

(how does one pronounce that word?).

I believe the standard interpretation is “Engine-X”.

Antony.

This topic was automatically closed after 365 days. New replies are no longer allowed.