chef-prometheus icon indicating copy to clipboard operation
chef-prometheus copied to clipboard

Problems creating a wrapper cookbook around chef-prometheus

Open rberger opened this issue 10 years ago • 3 comments

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?

rberger avatar Aug 08 '15 20:08 rberger

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.

Magrath avatar Aug 09 '15 14:08 Magrath

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

rberger avatar Aug 09 '15 22:08 rberger

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.

Magrath avatar Aug 10 '15 09:08 Magrath