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

/graph ignores plus character in query string #2109

Closed
EdSchouten opened this Issue Oct 21, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@EdSchouten
Copy link
Contributor

EdSchouten commented Oct 21, 2016

What did you do?

On /status I have a recording rule that looks like this:

node:container_cpu_user_system_seconds:rate10m{} = (sum(rate(container_cpu_user_seconds_total{job="kubernetes-nodes"}[10m]) + rate(container_cpu_system_seconds_total{job="kubernetes-nodes"}[10m])) BY (kubernetes_io_hostname)) / (sum(machine_cpu_cores) BY (kubernetes_io_hostname))

Both the left hand side and the right hand side of the assignment are links on which I can click. Let's click on the right hand side, linking to this page:

/graph?g0.expr=%28sum%28rate%28container_cpu_user_seconds_total%7Bjob%3D%22kubernetes-nodes%22%7D%5B10m%5D%29+%2B+rate%28container_cpu_system_seconds_total%7Bjob%3D%22kubernetes-nodes%22%7D%5B10m%5D%29%29+BY+%28kubernetes_io_hostname%29%29+%2F+%28sum%28machine_cpu_cores%29+BY+%28kubernetes_io_hostname%29%29&g0.tab=0

What did you expect to see?

The /graph page, rendering the graph for the right hand side of the assignment.

What did you see instead? Under which circumstances?

The graph page, giving me this error message:

Error executing query: parse error at char 76: unexpected identifier "rate" in aggregation, expected ")"

The text box above holds the following query:

(sum(rate(container_cpu_user_seconds_total{job="kubernetes-nodes"}[10m]) rate(container_cpu_system_seconds_total{job="kubernetes-nodes"}[10m])) BY (kubernetes_io_hostname)) / (sum(machine_cpu_cores) BY (kubernetes_io_hostname))

Notice how the plus symbol between the two rate() functions has disappeared. The weird thing is that the URL does contain the plus character (%2B).

Environment

  • System information:

Some CoreOS Linux instance running on EC2. ;-)

  • Prometheus version:

From /status:

Build Information
Version 1.2.1
Revision dd66f2e
Branch master
BuildUser root@fd9b0daff6bd
BuildDate 20161010-15:58:23
GoVersion go1.7.1

@tattsun

This comment has been minimized.

Copy link
Contributor

tattsun commented Oct 21, 2016

@EdSchouten @brian-brazil
It seems to be UI bug. I created fixed PR, plz watch it.

@EdSchouten

This comment has been minimized.

Copy link
Contributor Author

EdSchouten commented Oct 21, 2016

Thank you for working on this so quickly!

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.