[chef] sensu data bag file


Chronological Thread 
  • From: "A. Kong" < >
  • To:
  • Subject: [chef] sensu data bag file
  • Date: Tue, 4 Nov 2014 11:18:15 +1100

Hi

I am trying to use sensu with chef-solo. Chef requires a data_bag file. Unfortunately I can’t locate any info about what need to go into a data_bag file for the sensu package. I wonder if anyone can give me a pointer?

Currently I have put a file ‘mycompany.json’ in ~/.chef/data_bags/sensu/

The content of mycompany.json is just:

{
"id”:"mycompany"
}

This is the error message I am getting:

==> default: TypeError
==> default: ---------
==> default: can't convert Array into String
==> default:
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/sensu/libraries/sensu_helpers.rb:36:in `data_bag_item'
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/sensu/recipes/default.rb:65:in `from_file'
==> default:
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/sensu/libraries/sensu_helpers.rb:
==> default:
==> default:  29:            "/opt/sensu/embedded/bin/gem"
==> default:  30:          else
==> default:  31:            "gem"
==> default:  32:          end
==> default:  33:        end
==> default:  34:
==> default:  35:        def data_bag_item(item, missing_ok=false)
==> default:  36>>         raw_hash = Chef::DataBagItem.load("sensu", item)

Thanks, Tony



Archive powered by MHonArc 2.6.16.

§