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

Problems creating a wrapper cookbook around chef-prometheus #40

Open rberger opened 9 years ago

rberger commented 9 years ago

Since the default recipe runs the template command and accumulator among other things, there is no way to include_recipe "prometheus" in a wrapper cookbook that wants to override attributes or do the work of figuring out what prometheus jobs should be set up.

Am I missing something?

Magrath commented 9 years ago

You can use the job_config_template_name and job_config_cookbook_name attributes to override the template used to use the one in your wrapper cookbook.

rberger commented 9 years ago

How would I use the prometheus_job LWRP in that case? I can't call the LWRP without include_recipe "prometheus" which will have already generated the prometheus.yaml

Magrath commented 9 years ago

As long as your wrapper cookbook depends on the prometheus cookbook in the metadata.rb (which it needs to anyway), you should be able to use the LWRP before you include the recipe I think.