Closed coderfool closed 2 years ago
If I am reading the situtation correctly, maybe your Prometheus configuration file references/includes a file called "rules.yml"?
When the Prometheus configuration file is created, the 'promtool' configuration validation runs, the referenced "rules.yml" file doesn't yet exist, and an error is raised by promtool because of the missing rules file.
If I am reading the situtation correctly, maybe your Prometheus configuration file references/includes a file called "rules.yml"?
When the Prometheus configuration file is created, the 'promtool' configuration validation runs, the referenced "rules.yml" file doesn't yet exist, and an error is raised by promtool because of the missing rules file.
That is correct. I want to know how to deploy the rules.yml from the Ansible controller to the Prometheus server.
@mesaguy
I have a custom config file for Prometheus server in which 'rule_files' points to a file on that server. This rule file has to be copied from the controller. In prometheus.yml, the prometheus server config file is created before copying the local rule files:
This runs into a validation error because the rule file doesn't exist yet:
It works fine when I switch the order of these 2 tasks.
Playbook:
Am I missing something?