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

promtool: print file/line locations for warnings/errors #1758

Open
juergenhoetzel opened this Issue Jun 22, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@juergenhoetzel
Copy link

juergenhoetzel commented Jun 22, 2016

Checking my config I get warnings, but not the file-name + line-number which cause the warnings/errors:

→ ./promtool  check-config /srv/prometheus/prometheus.yml
Checking /srv/prometheus/prometheus.yml
WARN[0000] The 'target_groups' option for scrape configurations is deprecated, use 'static_configs' instead  source=config.go:468
WARN[0000] The 'target_groups' option for scrape configurations is deprecated, use 'static_configs' instead  source=config.go:468
WARN[0000] The 'target_groups' option for scrape configurations is deprecated, use 'static_configs' instead  source=config.go:468
  SUCCESS: 1 rule files found

These additional info could also improve editor support. I use Emacs and implementing a
Flycheck checker should be easy when this info is provided.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Jun 27, 2016

I agree that it would be handy but with the YAML parsing package we are using this is hardly doable.

@serathius

This comment has been minimized.

Copy link
Contributor

serathius commented Mar 15, 2018

I created issue for yaml package go-yaml/yaml#343

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.