elijah / chef-prometheus

Chef cookbook for Prometheus. The open source service monitoring system and time-series database.
Apache License 2.0
52 stars 93 forks source link

Unpacking binary overwrites prometheus.yml #68

Closed savoie closed 7 years ago

savoie commented 7 years ago

When using the binary install method, prometheus.yml is written to correctly, then binary.rb runs and ark overwrites it with the default prometheus.yml from the tarball.

As far as I can tell, the minimum effective fix is simply to move include_recipe "prometheus::#{node['prometheus']['install_method']}" above the config section of default.rb, so the recipe workflow becomes directory setup -> installation -> write config -> run service. (Gitlab's Prometheus cookbook appears to have taken this approach.)

I'd be happy to submit a (slightly more refined) patch, but would like a second pair of eyes to confirm that this is an actual bug and not a case of me being new to Chef and missing a gotcha.

elijah commented 7 years ago

This sounds like a proper fix to me, and like it's an actual bug. Please do feel free to submit a patch. ;-)