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

No error message when file_sd_configs include cannot be found #1553

Closed
kaihendry opened this Issue Apr 13, 2016 · 6 comments

Comments

Projects
None yet
6 participants
@kaihendry
Copy link

kaihendry commented Apr 13, 2016

Tested on 322ad49:

 wget http://s.natalian.org/2016-04-13/prometheus-missing.yml
 prometheus -config.file=prometheus-missing.yml

No complaint of missing YML include.

Furthermore promtool doesn't detect anything is amiss either:

$ promtool check-config prometheus-missing.yml
Checking prometheus.yml
 SUCCESS: 0 rule files found
@grobie

This comment has been minimized.

Copy link
Member

grobie commented Apr 13, 2016

👍 We should at least give a warning in promtool if the file is not present. While it's a valid config (the file might just be added later on by a different process), it would also help speed up investiations to warn about it during prometheus server start.

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Jul 21, 2017

So promtool now errors out instead of warning if the file is not in place:

➜  prometheus-1.7.1.linux-amd64 ./promtool check-config prometheus.yml
Checking prometheus.yml
  FAILED: "first.rules" does not point to an existing file

I think a warning is what was agreed upon. For anyone looking to tackle this:

promtool: Instead of returning an error here, logging it as warning would be better: https://github.com/prometheus/prometheus/blob/master/cmd/promtool/main.go#L96

prometheus: Logging a warning when the number of files matched is 0 would be good: https://github.com/prometheus/prometheus/blob/master/discovery/file/file.go#L82

@cstyan

This comment has been minimized.

Copy link
Contributor

cstyan commented Jul 26, 2017

if you haven't started this already, I'll give it a shot @gouthamve

@cstyan

This comment has been minimized.

Copy link
Contributor

cstyan commented Aug 24, 2017

Fixed in #3062, will go out in 2.0. Should we mark this as fixed?

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Sep 28, 2017

Thanks @cstyan!

@gouthamve gouthamve closed this Sep 28, 2017

@lock

This comment has been minimized.

Copy link

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