Skip to content

Facing issue while executing "Prometheus" cookbook from chef-supermarket. #77

@BalasekharNelli12

Description

@BalasekharNelli12

Recipe: prometheus::default
* linux_user[prometheus] action create (up to date)
* directory[/opt/prometheus] action create (up to date)
* directory[/var/log/prometheus] action create (up to date)
* template[/opt/prometheus/prometheus.conf] action nothing (skipped due to action :nothing)
* prometheus_job[prometheus] action create (up to date)
* accumulator[/opt/prometheus/prometheus.conf] action create

       ================================================================================
       Error executing action `create` on resource 'accumulator[/opt/prometheus/prometheus.conf]'
       ================================================================================
       
       NameError
       ---------
       uninitialized constant Chef::Resource::PrometheusJob
       
       Cookbook Trace:
       ---------------
       /tmp/kitchen/cache/cookbooks/prometheus/recipes/default.rb:59:in `block (2 levels) in from_file'
       /tmp/kitchen/cache/cookbooks/accumulator/libraries/provider_accumulator.rb:48:in `action_create'
       
       Resource Declaration:
       ---------------------
       # In /tmp/kitchen/cache/cookbooks/prometheus/recipes/default.rb
       
        58: accumulator node['prometheus']['flags']['config.file'] do
        59:   filter        { |res| res.is_a? Chef::Resource::PrometheusJob }
        60:   target        template: node['prometheus']['flags']['config.file']
        61:   transform     { |jobs| jobs.sort_by(&:name) }
        62:   variable_name :jobs
        63:   notifies      :restart, 'service[prometheus]'
        64: 
        65:   not_if { node['prometheus']['allow_external_config'] && File.exist?(node['prometheus']['flags']['config.file']) }
        66: end
        67: 

Is it possible to update the cookbook in "Chef Supermarket"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions