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

open consoles/node.html: no such file or directory #1540

Closed
hryamzik opened this Issue Apr 9, 2016 · 12 comments

Comments

Projects
None yet
7 participants
@hryamzik
Copy link

hryamzik commented Apr 9, 2016

After updating to the latest version consoles stopped working. I do have them on the file system, like /opt/prometheus/consoles/node.html. There's nothing in logs about this. Do I miss some configuration option at this point?

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Apr 9, 2016

Hmm, it still works for me - what is your exact Prometheus command line?

@hryamzik

This comment has been minimized.

Copy link
Author

hryamzik commented Apr 9, 2016

exec chpst -u prometheus "//opt/prometheus/prometheus" -config.file=/etc/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus -alertmanager.url=http://127.0.0.1:9093 -storage.local.retention=4464h0m0s -web.external-url=https://mycompany.org

Might be a tailing slash missing....

P.S. But I would really love to see something like /opt/prometheusconsoles/node.html file not found in logs.

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Apr 9, 2016

By default, Prometheus looks for your console files in the consoles directory, relative to the current working directory:

If it worked for you before, maybe it is because you still also had a consoles directory in the directory you were running Prometheus from?

For your path, you'll need to set -web.console.templates= opt/prometheus/consoles. You probably also need to adjust the -web.console.libraries flag, which defaults to console_libraries relative to the current working directory.

@hryamzik

This comment has been minimized.

Copy link
Author

hryamzik commented Apr 9, 2016

maybe it is because you still also had a consoles directory in the directory you were running Prometheus from?

Nope, I've been running it with runit so nothing really changed except the prometheus version. Will try templates options now, thank you!

@hryamzik hryamzik closed this Apr 9, 2016

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Apr 9, 2016

@hryamzik That's odd - I can't really explain why it worked before then, unless the current working directory contained those dirs. Do runit-started services perhaps inherit the current working dir from the user who starts them (a common problem with some supervisor systems is also that env vars leak in from the user who starts/stops services, etc. - something which systemd fixes)?

@hryamzik

This comment has been minimized.

Copy link
Author

hryamzik commented Apr 9, 2016

In fact I've also had to move from sudo to chpst on runit and that may be the cause. As we still run a lot of 14.04 I'm not going to change runit to systemd for now...

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Jun 7, 2017

I think I have the same issue

error executing template __console_/node.html: html/template:__console_/node.html:34:12: no such template "tail"

Upon https://prom.dabase.com/consoles/node.html

I'm launching prom/prometheus like so: https://github.com/kaihendry/pingprom/blob/master/prometheus%40.service

@gdmello

This comment has been minimized.

Copy link
Contributor

gdmello commented Jul 18, 2017

Had the same issue as @kaihendry above, but was resolved by setting web.console.libraries to the full path to console_libraries folder as @juliusv suggested above.

@kaihendry

This comment has been minimized.

Copy link

kaihendry commented Jul 19, 2017

Oh I forgot to mention I fixed it like so kaihendry/pingprom@395a4c6, i.e. not mounting like so -v /home/%i/pingprom/prometheus:/etc/prometheus/

@pajtai

This comment has been minimized.

Copy link

pajtai commented Nov 11, 2017

If anyone else runs into this with 2.0.0. The config flag is now, --web.console.templates=. The config flags can be seen by running prometheus -h.

Edit: When I tried to use the config flag in my /etc/systemd/system/prometheus.service, I got an error about ... tail ... What did work was using WorkingDirectory= in the service file.

@mperezco

This comment has been minimized.

Copy link

mperezco commented Feb 2, 2018

I have a running RPM deployment that works for Prometheus 2.1.0 ... in case it helps:
https://github.com/mperezco/prometheus-rpm

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 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 22, 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.