Promtool does not check config files on file_sd_configs

306 views
Skip to first unread message

joan....@marfeel.com

unread,
Oct 27, 2017, 6:34:05 AM10/27/17
to Prometheus Users
Hi,

we are putting in place prometheus in order to monitor different business metrics. What we want is that all the teams on our organization are able to generate new targets, alerts, ...
Our first approximation has been to put all the set up on a git repository and it is working fine.
When a user pushes a commit to master, our build system detects, and deploys.
What we want to do is check that the new set up is fine so we decided to use promtool to check the set up.
The main problem is that, if the error is in the syntax of prometheus.yml, everything works as we expect but, as we are using file_sd_configs to import better organize the set up, promtool does not detect errors on these files.

If we run promtool on all the fails, we receive errors that are not really an error like, for the file:
- targets:
  - test.marfeel.com
  labels:
    job: minute
    __metrics_path__: /minute

returns:
Checking minute.yml
  FAILED: yaml: unmarshal errors:
  line 1: cannot unmarshal !!seq into config.plain

So, there is any option to instruct promtool to follow file_sd_configs? Or do you have any recommendation to test the set up before to deploy?
Many thanks in advance,

Joan Tomàs

Reply all
Reply to author
Forward
0 new messages