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

Add graph button throws Handlebar Exeception #2399

Open
medyagh opened this Issue Feb 6, 2017 · 4 comments

Comments

Projects
None yet
6 participants
@medyagh
Copy link

medyagh commented Feb 6, 2017

What did you do?

Click on Add Graph

What did you expect to see?
Anything to happen (a graph to be added or aything)

What did you see instead? Under which circumstances?
Nothing. and I get these exceptions in chrome inspect:

in chrome's inspect I see

Uncaught ReferenceError: Handlebars is not defined
    at graph.js:6

that line is

Handlebars.registerHelper('pathPrefix', function() { return PATH_PREFIX; });

Environment
Mac OS, Chrome, and I used prometheus-1.5.0.darwin-amd64 version.

  • System information:

    Darwin 15.6.0 x86_64

  • Prometheus version:

	prometheus, version 1.5.0 (branch: master, revision: d840f2c400629a846b210cf58d65b9fbae0f1d5c)
  build user:       root@a04ed5b536e3
  build date:       20170123-13:59:53
  go version:       go1.7.4

screenshots
screen shot 2017-02-06 at 10 21 17 am
screen shot 2017-02-06 at 10 14 39 am

@bvis

This comment has been minimized.

Copy link

bvis commented Feb 7, 2017

I've found this same issue when Prometheus is deployed under a path. For example:

It could be related with this line:

url: PATH_PREFIX + "/static/js/graph_template.handlebar",

Where PATH_PREFIX wouldn't have any value.

@h0tbird

This comment has been minimized.

Copy link

h0tbird commented Feb 15, 2017

Same thing exposing via Kubernetes API server + kubectl proxy:

[0] ~ >> kubectl cluster-info --namespace monitoring | grep Prometheus
Prometheus is running at https://104.155.8.87/api/v1/proxy/namespaces/monitoring/services/prometheus

add_graph

@h0tbird

This comment has been minimized.

Copy link

h0tbird commented Feb 16, 2017

Setting -web.external-url to the value below makes the WebUI unreachable.

-web.external-url=http://127.0.0.1:8001/api/v1/proxy/namespaces/monitoring/services/prometheus

However, I managed to reach the /graph endpoint by setting PATH_PREFIX='http://127.0.0.1:8001/api/v1/proxy/namespaces/monitoring/services/prometheus'

debug

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jul 14, 2017

This might be a bug, this might be the kubeproxy doing something that's fundamentally unsupportable. Requires investigation.

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