ansible icon indicating copy to clipboard operation
ansible copied to clipboard

[prometheus] - New scrape_config_files

Open Birckof opened this issue 2 years ago • 2 comments

Starting from version 2.43.0 of Prometheus, we have a new section available in the configuration file prometheus.yml called 'scrape_config_files,' where you can specify the paths of files containing the scrape_config settings.

Would it be possible to implement this functionality by adding the 'scrape_config_files' attribute to the prometheus.yml.j2 template if it is defined in a variable, for example, 'prometheus_scrape_config_files'? It could be a list of paths."

Birckof avatar Jun 13 '23 14:06 Birckof

Yes, that should be easy enough to add. PRs welcome.

SuperQ avatar Jun 14 '23 08:06 SuperQ

Yes, that should be easy enough to add. PRs welcome.

It's good to hear that. Thanks

Right now I'm testing it, once the role is executed, I'll add a block with that parameter and my list of paths in a task using the blockinfile module of Ansible.

Birckof avatar Jun 14 '23 09:06 Birckof