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

Rules silently ignored if one can't be found. #899

Closed
miekg opened this Issue Jul 16, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@miekg
Copy link

miekg commented Jul 16, 2015

If you have a rule_files listing:

rule_files:
  - "/prometheus_config/bla.rules"
  - "/prometheus_config/bliep.rules

And ff the file bla.rules can't be found all rules are (silently ignored).

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Jul 16, 2015

What version are you running? In 0.14.0 you should get an error logged at least (reproduced it this way).

ERRO[0000] Error loading rules, previous rule set restored: open test/test.rules: no such file or directory

Do you not see this error?

Previous rule set is the empty one on startup.

In 0.15.0 it should error on reading bad rule files and exit if that happens on startup. Missing files are not errored on (to be a bit liberal as one might add them later and adding whole directories like a/*.rules is possible). Other files are still read.

The new promtool is actually errors during config checking if there is a non-glob file that does not exist. Having more strictness in this direction seems fine.

Is that more like the behavior you would expect?

@miekg

This comment has been minimized.

Copy link
Author

miekg commented Jul 16, 2015

[ Quoting notifications@github.com in "Re: [prometheus] Rules silently ign..." ]

What version are you running? In 0.14.0 you should get an error logged at least (reproduced it this way).

ERRO[0000] Error loading rules, previous rule set restored: open test/test.rules: no such file or directory

Do you not see this error?

Yep, I see it.

Previous rule set is the empty one on startup.

Hmmm, yes. Dropping all rules makes it easier to spot a bit one.

In 0.15.0 it should error on reading bad rule files and exit if that happens on startup. Missing files are not errored on (to be a bit liberal as one might add them later and adding whole directories like a/*.rules is possible). Other files are still read.

The new promtool is actually errors during config checking if there is a non-glob file that does not exist. Having more strictness in this direction seems fine.

Is that more like the behavior you would expect?

Jep, what you describe for 0.15.0 is exactly what I am looking for.

Thanks!

/Miek

Miek Gieben

@miekg miekg closed this Jul 16, 2015

@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.