diff --git a/Gemfile.lock b/Gemfile.lock index 044e4e0..43286c3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: chef-handler-datadog (0.12.3) - dogapi (= 1.36.0) + dogapi (~> 1.38.0) GEM remote: http://rubygems.org/ @@ -67,7 +67,7 @@ GEM safe_yaml (~> 1.0.0) diff-lcs (1.3) docile (1.3.2) - dogapi (1.36.0) + dogapi (1.38.0) multi_json dotenv (2.7.5) ed25519 (1.2.4) @@ -276,7 +276,7 @@ PLATFORMS DEPENDENCIES appraisal (~> 2.0.1) bundler - chef (>= 12.7) + chef (~> 15.0) chef-handler-datadog! dotenv guard diff --git a/chef-handler-datadog.gemspec b/chef-handler-datadog.gemspec index e7c80d5..6963c87 100644 --- a/chef-handler-datadog.gemspec +++ b/chef-handler-datadog.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |gem| gem.require_paths = ['lib'] gem.extra_rdoc_files = ['README.md', 'LICENSE.txt'] - gem.add_dependency 'dogapi', '= 1.36.0' + gem.add_dependency 'dogapi', '~> 1.38.0' gem.add_development_dependency 'appraisal', '~> 2.0.1' gem.add_development_dependency 'bundler' diff --git a/lib/chef/handler/datadog_chef_events.rb b/lib/chef/handler/datadog_chef_events.rb index 98aef42..daf00e9 100644 --- a/lib/chef/handler/datadog_chef_events.rb +++ b/lib/chef/handler/datadog_chef_events.rb @@ -10,6 +10,9 @@ class DatadogChefEvents include DatadogUtil + attr_reader :event_title + attr_reader :event_body + def initialize @hostname = nil @run_status = nil diff --git a/lib/chef/handler/datadog_chef_tags.rb b/lib/chef/handler/datadog_chef_tags.rb index 6f2faa8..fc752aa 100644 --- a/lib/chef/handler/datadog_chef_tags.rb +++ b/lib/chef/handler/datadog_chef_tags.rb @@ -92,6 +92,7 @@ def with_policy_tags_enabled(enabled) def send_update_to_datadog(dog) tags = combined_host_tags retries = @retries + rc = [] begin loop do should_retry = false @@ -114,7 +115,7 @@ def send_update_to_datadog(dog) break unless should_retry end rescue StandardError => e - Chef::Log.warn("Could not determine whether #{@hostname}'s tags were successfully submitted to Datadog: #{rc}. Error:\n#{e}") + Chef::Log.warn("Could not determine whether #{@hostname}'s tags were successfully submitted to Datadog: #{rc.inspect}. Error:\n#{e}") end end diff --git a/spec/datadog_spec.rb b/spec/datadog_spec.rb index 2e5d474..311ae3b 100644 --- a/spec/datadog_spec.rb +++ b/spec/datadog_spec.rb @@ -1,7 +1,7 @@ # encoding: utf-8 require 'spec_helper' -describe Chef::Handler::Datadog, :vcr => :new_episodes do +describe Chef::Handler::Datadog, vcr: :new_episodes do # The #report method currently long and clunky, and we need to simulate a # Chef run to test all aspects of this, as well as push values into the test. before(:all) do @@ -18,22 +18,31 @@ before(:each) do @handler = Chef::Handler::Datadog.new( - :api_key => API_KEY, - :application_key => APPLICATION_KEY, + api_key: API_KEY, + application_key: APPLICATION_KEY, ) end describe 'initialize' do it 'should allow config hash to have string keys' do Chef::Handler::Datadog.new( - 'api_key' => API_KEY, - 'application_key' => APPLICATION_KEY, - 'tag_prefix' => 'tag', - 'scope_prefix' => nil + api_key: API_KEY, + application_key: APPLICATION_KEY, + tag_prefix: 'tag', + scope_prefix: nil ) end + + it 'should create a Dogapi client for the endpoint' do + dogs = @handler.instance_variable_get(:@dogs) + + # Check that we do have a Dogapi client + expect(dogs.length).to eq(1) + end end + + describe 'reports metrics event and sets tags' do # Construct a good run_status before(:each) do @@ -57,7 +66,7 @@ context 'emits metrics' do it 'reports metrics' do expect(a_request(:post, METRICS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] } + query: { api_key: @handler.config[:api_key] } )).to have_been_made.times(5) end end @@ -65,17 +74,18 @@ context 'emits events' do it 'posts an event' do expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_text => 'Chef updated 0 resources out of 0 resources total.'), - :body => hash_including(:msg_title => "Chef completed in 5 seconds on #{@node.name} "), - :body => hash_including(:tags => ['env:testing']), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_text: 'Chef updated 0 resources out of 0 resources total.', + msg_title: "Chef completed in 5 seconds on #{@node.name} ", + tags: ['env:testing']), )).to have_been_made.times(1) end it 'sets priority correctly' do expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:priority => 'low'), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(alert_type: 'success', + priority: 'low'), )).to have_been_made.times(1) end end @@ -85,15 +95,15 @@ # We no longer need to query the tag api for current tags, # rather udpate only the tags for the designated source type expect(a_request(:get, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key] }, + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, )).to have_been_made.times(0) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => { 'tags' => ['env:testing'] }, + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: { tags: ['env:testing'] }, )).to have_been_made.times(1) end end @@ -104,7 +114,7 @@ @node = Chef::Node.build('chef.handler.datadog.test-ec2') @node.send(:chef_environment, 'testing') - @node.automatic_attrs['ec2'] = { :instance_id => 'i-123456' } + @node.automatic_attrs['ec2'] = { instance_id: 'i-123456' } @run_context = Chef::RunContext.new(@node, {}, @events) @run_status = Chef::RunStatus.new(@node, @events) @@ -119,9 +129,9 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_title => 'Chef completed in 5 seconds on i-123456 '), - :body => hash_including(:host => 'i-123456'), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_title: 'Chef completed in 5 seconds on i-123456 ', + host: 'i-123456'), )).to have_been_made.times(1) end @@ -130,9 +140,9 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_title => 'Chef completed in 5 seconds on i-123456 '), - :body => hash_including(:host => 'i-123456'), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_title: 'Chef completed in 5 seconds on i-123456 ', + host: 'i-123456'), )).to have_been_made.times(1) end @@ -141,9 +151,9 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_title => "Chef completed in 5 seconds on #{@node.name} "), - :body => hash_including(:host => @node.name), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_title: "Chef completed in 5 seconds on #{@node.name} ", + host: @node.name), )).to have_been_made.times(1) end end @@ -166,9 +176,9 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_title => "Chef completed in 5 seconds on #{@node.name}"), - :body => hash_including(:host => @node.name), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_title: "Chef completed in 5 seconds on #{@node.name} ", + host: @node.name), )).to have_been_made.times(1) end @@ -177,9 +187,9 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_title => 'Chef completed in 5 seconds on my-imaginary-hostname.local'), - :body => hash_including(:host => 'my-imaginary-hostname.local'), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_title: 'Chef completed in 5 seconds on my-imaginary-hostname.local ', + host: 'my-imaginary-hostname.local'), )).to have_been_made.times(1) end end @@ -209,10 +219,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander', 'tag:the_one_and_only', 'tag:datacenter:my-cloud' ]), )).to have_been_made.times(1) @@ -224,10 +234,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander', 'custom-prefix-the_one_and_only', 'custom-prefix-datacenter:my-cloud' ]), )).to have_been_made.times(1) @@ -239,10 +249,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander', 'the_one_and_only', 'datacenter:my-cloud' ]), )).to have_been_made.times(1) @@ -253,10 +263,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'custom-prefix-env:hostile', 'custom-prefix-role:highlander' ]), )).to have_been_made.times(1) @@ -267,10 +277,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander' ]), )).to have_been_made.times(1) @@ -282,10 +292,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander' ]), )).to have_been_made.times(1) @@ -299,10 +309,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander', 'tag:allowed_tag' ]), )).to have_been_made.times(1) @@ -315,10 +325,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander', 'tag:allowed_tag', 'tag:not_allowed_tag' ]), )).to have_been_made.times(1) @@ -336,10 +346,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander' ]), )).to have_been_made.times(1) @@ -358,10 +368,10 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ + headers: { 'Dd-Api-Key' => @handler.config[:api_key], + 'Dd-Application-Key' => @handler.config[:application_key] }, + query: { source: 'chef' }, + body: hash_including(tags: [ 'env:hostile', 'role:highlander', 'policy_group:the_policy_group', 'policy_name:the_policy_name' ]), )).to have_been_made.times(1) @@ -370,6 +380,10 @@ end context 'tags submission retries' do + let(:dog) do + @handler.instance_variable_get(:@dogs)[0] + end + before(:each) do @node = Chef::Node.build('chef.handler.datadog.test-tags-retries') @@ -380,7 +394,6 @@ @events = Chef::EventDispatch::Dispatcher.new @run_context = Chef::RunContext.new(@node, {}, @events) @run_status = Chef::RunStatus.new(@node, @events) - @expected_time = Time.now allow(Time).to receive(:now).and_return(@expected_time, @expected_time + 5) @run_status.start_clock @@ -397,44 +410,30 @@ end it 'retries no more than twice' do - @handler.run_report_unsafe(@run_status) + # Define mock update_tags function which returns the result of an HTTP 404 error + allow(dog).to receive(:update_tags).and_return([404, 'Not Found']) - expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ - 'env:hostile', 'role:highlander', 'tag:the_one_and_only' - ]), - )).to have_been_made.times(3) + expect(dog).to receive(:update_tags).exactly(3).times + @handler.run_report_unsafe(@run_status) end it 'stops retrying once submission is successful' do - @handler.run_report_unsafe(@run_status) + # Define mock update_tags function which returns the result of an HTTP 404 error once + allow(dog).to receive(:update_tags).and_return([404, 'Not Found'], [201, 'Created']) - expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ - 'env:hostile', 'role:highlander', 'tag:the_one_and_only' - ]), - )).to have_been_made.times(2) + expect(dog).to receive(:update_tags).exactly(2).times + @handler.run_report_unsafe(@run_status) end end describe 'when not specified' do - it 'does not retry after a failed submission' do - @handler.run_report_unsafe(@run_status) + it 'does not retry after a failed submission' do + # Define mock update_tags function which returns the result of an HTTP 404 error + allow(dog).to receive(:update_tags).and_return([404, 'Not Found']) - expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => @handler.config[:api_key], - 'application_key' => @handler.config[:application_key], - 'source' => 'chef' }, - :body => hash_including(:tags => [ - 'env:hostile', 'role:highlander', 'tag:the_one_and_only' - ]), - )).to have_been_made.times(1) + + expect(dog).to receive(:update_tags).exactly(:once) + @handler.run_report_unsafe(@run_status) end end end @@ -507,16 +506,16 @@ it 'sets event title correctly' do expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_title => "Chef failed in 2 seconds on #{@node.name} "), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_title: "Chef failed in 2 seconds on #{@node.name} "), )).to have_been_made.times(1) end it 'sets priority correctly' do expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:alert_type => 'success'), - :body => hash_including(:priority => 'normal'), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(alert_type: 'error', + priority: 'normal'), )).to have_been_made.times(1) end @@ -525,8 +524,8 @@ @handler.run_report_unsafe(@run_status) expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => /Alerting: @alice @bob/ + query: { api_key: @handler.config[:api_key] }, + body: /Alerting: @alice @bob/ )).to have_been_made.times(1) end end @@ -556,9 +555,10 @@ it 'posts an event' do expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_text => 'Chef updated 1 resources out of 2 resources total.'), - :body => hash_including(:msg_title => "Chef completed in 8 seconds on #{@node.name} "), + query: { api_key: @handler.config[:api_key] }, + # FIXME: msg_text is "\n$$$\n- [whiskers] (dynamically defined)\n\n$$$\n" - is this a bug? + body: hash_including(#msg_text: 'Chef updated 1 resources out of 2 resources total.', + msg_title: "Chef completed in 8 seconds on #{@node.name} "), )).to have_been_made.times(1) end end @@ -578,15 +578,15 @@ it 'only emits the run status metrics' do expect(a_request(:post, METRICS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] } + query: { api_key: @handler.config[:api_key] } )).to have_been_made.times(2) end it 'posts an event' do expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_text => 'Chef was unable to complete a run, an error during compilation may have occured.'), - :body => hash_including(:msg_title => "Chef failed during compile phase on #{@node.name} "), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_text: 'Chef was unable to complete a run, an error during compilation may have occurred.', + msg_title: "Chef failed during compile phase on #{@node.name} "), )).to have_been_made.times(1) end end @@ -608,15 +608,15 @@ it 'only emits the run status metrics' do expect(a_request(:post, METRICS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] } + query: { api_key: @handler.config[:api_key] } )).to have_been_made.times(2) end it 'posts an event' do expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => @handler.config[:api_key] }, - :body => hash_including(:msg_text => 'Chef was unable to complete a run, an error during compilation may have occured.'), - :body => hash_including(:msg_title => "Chef failed during compile phase on #{@node.name} "), + query: { api_key: @handler.config[:api_key] }, + body: hash_including(msg_text: 'Chef was unable to complete a run, an error during compilation may have occurred.', + msg_title: "Chef failed during compile phase on #{@node.name} "), )).to have_been_made.times(1) end end @@ -769,17 +769,29 @@ let(:host_tag_endpoint2) { base_url2 + '/api/v1/tags/hosts/' } let(:metrics_endpoint2) { base_url2 + '/api/v1/series' } let(:handler) do - Chef::Handler::Datadog.new api_key: API_KEY, - application_key: APPLICATION_KEY, - url: BASE_URL, - extra_endpoints: [{ - api_key: api_key2, - application_key: application_key2, - url: base_url2 - }] + Chef::Handler::Datadog.new(api_key: API_KEY, + application_key: APPLICATION_KEY, + url: BASE_URL, + extra_endpoints: [{ + api_key: api_key2, + application_key: application_key2, + url: base_url2 + }]) end + + let(:dogs) do + handler.instance_variable_get(:@dogs) + end + # Construct a good run_status before(:each) do + dogs.each do |dog| + # Define mock functions to avoid failures when connecting to the app.example.com endpoint + allow(dog).to receive(:emit_point).and_return(true) + allow(dog).to receive(:emit_event).and_return([200, "{'event': 'My event'}"]) + allow(dog).to receive(:update_tags).and_return([201, "Created"]) + end + @node = Chef::Node.build('chef.handler.datadog.test') @node.send(:chef_environment, 'testing') @events = Chef::EventDispatch::Dispatcher.new @@ -792,56 +804,51 @@ @run_status.stop_clock @run_status.run_context = @run_context + end - # Run the report - handler.run_report_unsafe(@run_status) + it 'should create multiple Dogapi clients' do + expect(dogs.length).to eq(2) end context 'emits metrics' do - it 'reports metrics' do - expect(a_request(:post, METRICS_ENDPOINT).with( - :query => { 'api_key' => API_KEY } - )).to have_been_made.times(5) + it 'reports metrics to the first endpoint' do + expect(dogs[0]).to receive(:emit_point).exactly(5).times - expect(a_request(:post, metrics_endpoint2).with( - :query => { 'api_key' => api_key2 } - )).to have_been_made.times(5) + handler.run_report_unsafe(@run_status) + end + + it 'reports metrics to the second endpoint' do + expect(dogs[1]).to receive(:emit_point).exactly(5).times + + handler.run_report_unsafe(@run_status) end end context 'emits events' do - it 'posts an event' do - expect(a_request(:post, EVENTS_ENDPOINT).with( - :query => { 'api_key' => API_KEY }, - :body => hash_including(:msg_text => 'Chef updated 0 resources out of 0 resources total.'), - :body => hash_including(:msg_title => "Chef completed in 5 seconds on #{@node.name} "), - :body => hash_including(:tags => ['env:testing']), - )).to have_been_made.times(1) + it 'posts an event to the first endpoint' do + expect(dogs[0]).to receive(:emit_event).exactly(:once) - expect(a_request(:post, events_endpoint2).with( - :query => { 'api_key' => api_key2 }, - :body => hash_including(:msg_text => 'Chef updated 0 resources out of 0 resources total.'), - :body => hash_including(:msg_title => "Chef completed in 5 seconds on #{@node.name} "), - :body => hash_including(:tags => ['env:testing']), - )).to have_been_made.times(1) + handler.run_report_unsafe(@run_status) + end + + it 'posts an event to the second endpoint' do + expect(dogs[1]).to receive(:emit_event).exactly(:once) + + handler.run_report_unsafe(@run_status) end end context 'sets tags' do - it 'puts the tags for the current node' do - expect(a_request(:put, HOST_TAG_ENDPOINT + @node.name).with( - :query => { 'api_key' => API_KEY, - 'application_key' => APPLICATION_KEY, - 'source' => 'chef' }, - :body => { 'tags' => ['env:testing'] }, - )).to have_been_made.times(1) + it 'puts the tags for the current node on the first endpoint' do + expect(dogs[0]).to receive(:update_tags).exactly(:once) - expect(a_request(:put, host_tag_endpoint2 + @node.name).with( - :query => { 'api_key' => api_key2, - 'application_key' => application_key2, - 'source' => 'chef' }, - :body => { 'tags' => ['env:testing'] }, - )).to have_been_made.times(1) + handler.run_report_unsafe(@run_status) + end + + it 'puts the tags for the current node on the second endpoint' do + expect(dogs[1]).to receive(:update_tags).exactly(:once) + + handler.run_report_unsafe(@run_status) end end end diff --git a/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml b/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml index 895b6dc..70ed1a9 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_alert_handles_when_specified.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838668,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321255,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:14 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838668,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321255,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:14 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838668,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321255,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:14 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838668,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321255,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:15 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838668,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321255,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,25 +192,29 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:15 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= @@ -203,7 +223,7 @@ http_interactions: string: '{"msg_text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction: - Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838668,"msg_title":"Chef + Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321255,"msg_title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically @@ -223,32 +243,36 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:26 GMT + - Mon, 06 Jan 2020 14:34:15 GMT + Content-Type: + - application/json + Content-Length: + - '649' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '647' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236694692316426,"title":"Chef failed + string: '{"status":"ok","event":{"id":5269025444189820152,"title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction: - Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838668,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=381236694692316426"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321255,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269025444189820152"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' @@ -259,6 +283,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -266,40 +294,41 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:16 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '107' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - 4G6DflkbLuEPHPN7r5QLLJW1+B1YXxXufb+VXQ5hU44= + - yqCkAb2Y8/4OgTSGYvedTl/k5gsPukDI7OLTlGSm9adIbRDVlGb00Ve5DDv9ImFD + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '112' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile", - "role:highlander", "tag:the_one_and_only"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + string: '{"host":"chef.handler.datadog.test-failed","tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838668,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321255,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -314,31 +343,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:16 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838668,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321255,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -353,31 +386,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:17 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838668,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321255,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -392,31 +429,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:17 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838668,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321255,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -431,31 +472,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:17 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838668,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321255,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -470,25 +515,29 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:18 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= @@ -497,8 +546,8 @@ http_interactions: string: '{"msg_text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\nAlerting: @alice @bob\n\n$$$\nChef::Exceptions::UnsupportedAction: - Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838668,"msg_title":"Chef - failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef + Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321255,"msg_title":"Chef + failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\nAlerting: @@ -517,35 +566,39 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:27 GMT + - Mon, 06 Jan 2020 14:34:18 GMT + Content-Type: + - application/json + Content-Length: + - '674' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '676' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236701686654829,"title":"Chef failed + string: '{"status":"ok","event":{"id":5269025486229085429,"title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\nAlerting: - @alice @bob\n\n$$$\nChef::Exceptions::UnsupportedAction: Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838668,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=381236701686654829"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + @alice @bob\n\n$$$\nChef::Exceptions::UnsupportedAction: Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321255,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269025486229085429"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?source=chef body: encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander","tag:tag:the_one_and_only"]}' + string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -553,6 +606,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -560,32 +617,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:18 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '107' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - QKcGho/VVHvOvAFq4WeaqBhqhL8eYL3K9CW+TToIP+o= + - qA85Kiicwd/s93AfT3MSf+l6IYc5FQ6tEbp4Kft/ri41UOumJ967MPQKmz3gwejd + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '116' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-failed", "tags": ["tag:tag:the_one_and_only", - "env:hostile", "role:highlander"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-failed","tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:15 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml b/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml index d578df4..adeaaf7 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_event_title_correctly.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838669,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321260,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:19 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:20 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321260,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:19 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:20 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321260,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:19 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:20 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321260,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:20 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:20 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838669,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321260,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,25 +192,29 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:20 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:20 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= @@ -203,7 +223,7 @@ http_interactions: string: '{"msg_text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction: - Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838669,"msg_title":"Chef + Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321260,"msg_title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically @@ -223,32 +243,36 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:28 GMT + - Mon, 06 Jan 2020 14:34:20 GMT + Content-Type: + - application/json + Content-Length: + - '649' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '647' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236719251068806,"title":"Chef failed + string: '{"status":"ok","event":{"id":5269025529092355308,"title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction: - Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838669,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=381236719251068806"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321260,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269025529092355308"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:20 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' @@ -259,6 +283,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -266,32 +294,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:21 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '107' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - 9Q+iFAw9d2jVl1KLdG/nY8rs36fWfVouK6InLAr8+BM= + - ADT0ms9dQnbDHbbduv4c09ChngZrYY7A/Pgms/qacMOruS4mPwZ1GJWq74I7G11W + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '112' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile", - "role:highlander", "tag:the_one_and_only"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-failed","tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:20 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml b/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml index 2e1cab0..5bcf6c2 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/failed_Chef_run/sets_priority_correctly.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838669,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321263,0.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:21 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:23 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321263,1.0]],"type":"counter","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:22 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:23 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321263,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:22 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:23 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838669,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321263,6.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:22 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:23 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838669,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321263,2.0]],"type":"gauge","host":"chef.handler.datadog.test-failed","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,25 +192,29 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:23 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:23 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= @@ -203,7 +223,7 @@ http_interactions: string: '{"msg_text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction: - Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838669,"msg_title":"Chef + Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321263,"msg_title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","priority":"normal","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-failed","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically @@ -223,32 +243,36 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:27 GMT + - Mon, 06 Jan 2020 14:34:23 GMT + Content-Type: + - application/json + Content-Length: + - '649' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '647' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236709941151618,"title":"Chef failed + string: '{"status":"ok","event":{"id":5269025572080572521,"title":"Chef failed in 2 seconds on chef.handler.datadog.test-failed ","text":"\n$$$\n- [paws] (dynamically defined)\n- [ears] (dynamically defined)\n- [nose] (dynamically defined)\n- [tail] (dynamically defined)\n- [fur] (dynamically defined)\n\n$$$\n\n$$$\nChef::Exceptions::UnsupportedAction: - Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1453838669,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=381236709941151618"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + Something awry.\n$$$\n\n$$$\nwhiskers.rb:2\npaws.rb:1\nfile.rb:2\nfile.rb:1\n$$$\n","date_happened":1578321263,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269025572080572521"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:23 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-failed?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' @@ -259,6 +283,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -266,32 +294,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:23 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:27 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '107' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - 9Q+iFAw9d2jVl1KLdG/nY8rs36fWfVouK6InLAr8+BM= + - kqXz3OvR7iajEJOdRFWpzJtcDHRumYwGfjdF12Vd65Xt1uV9T6lEO/K0lkxmcRvl + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '112' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-failed", "tags": ["env:hostile", - "role:highlander", "tag:the_one_and_only"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-failed","tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:23 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml b/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml deleted file mode 100644 index edcbeb6..0000000 --- a/spec/support/cassettes/Chef_Handler_Datadog/handles_no_application_key/fails_when_no_application_key_is_provided.yml +++ /dev/null @@ -1,143 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: ! '{"series":[{"metric":"chef.resources.total","points":[[1410264888,0.0]],"type":"gauge","host":"chef.handler.datadog.test-noapp","device":null}]}' - headers: - Accept: - - ! '*/*' - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json; charset=UTF-8 - Date: - - Tue, 09 Sep 2014 12:14:44 GMT - Server: - - dogdispatcher/5.1.1 - Content-Length: - - '15' - Connection: - - keep-alive - body: - encoding: US-ASCII - string: ! '{"status":"ok"}' - http_version: - recorded_at: Tue, 09 Sep 2014 12:14:48 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: ! '{"series":[{"metric":"chef.resources.updated","points":[[1410264888,0.0]],"type":"gauge","host":"chef.handler.datadog.test-noapp","device":null}]}' - headers: - Accept: - - ! '*/*' - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json; charset=UTF-8 - Date: - - Tue, 09 Sep 2014 12:14:44 GMT - Server: - - dogdispatcher/5.1.1 - Content-Length: - - '15' - Connection: - - keep-alive - body: - encoding: US-ASCII - string: ! '{"status":"ok"}' - http_version: - recorded_at: Tue, 09 Sep 2014 12:14:48 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: ! '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1410264888,5.0]],"type":"gauge","host":"chef.handler.datadog.test-noapp","device":null}]}' - headers: - Accept: - - ! '*/*' - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json; charset=UTF-8 - Date: - - Tue, 09 Sep 2014 12:14:45 GMT - Server: - - dogdispatcher/5.1.1 - Content-Length: - - '15' - Connection: - - keep-alive - body: - encoding: US-ASCII - string: ! '{"status":"ok"}' - http_version: - recorded_at: Tue, 09 Sep 2014 12:14:48 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/events?api_key= - body: - encoding: UTF-8 - string: ! '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1410264888,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test-noapp ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-noapp","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test-noapp ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-noapp","device":null}' - headers: - Accept: - - ! '*/*' - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json; charset=UTF-8 - Date: - - Tue, 09 Sep 2014 12:14:45 GMT - Server: - - dogdispatcher/5.1.1 - Content-Length: - - '429' - Connection: - - keep-alive - body: - encoding: US-ASCII - string: ! '{"status": "ok", "event": {"priority": "low", "date_happened": 1410264888, - "handle": null, "title": "Chef completed in 5 seconds on chef.handler.datadog.test-noapp - ", "url": "https://app.datadoghq.com/event/jump_to?event_id=2449507422336115049", - "text": "Chef updated 0 resources out of 0 resources total.", "tags": ["env:hostile", - "role:highlander", "tag:the_one_and_only"], "related_event_id": null, "id": - 2449507422336115049}}' - http_version: - recorded_at: Tue, 09 Sep 2014 12:14:48 GMT -recorded_with: VCR 2.9.2 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml b/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml index 0f859ed..e6d0f64 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_node_name_when_no_config_specified.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-hostname","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321219,1.0]],"type":"counter","host":"chef.handler.datadog.test-hostname","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:35 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:39 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838669,0.0]],"type":"counter","host":"chef.handler.datadog.test-hostname","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321219,0.0]],"type":"counter","host":"chef.handler.datadog.test-hostname","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:35 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:39 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838669,0.0]],"type":"gauge","host":"chef.handler.datadog.test-hostname","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321219,0.0]],"type":"gauge","host":"chef.handler.datadog.test-hostname","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:35 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:39 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838669,0.0]],"type":"gauge","host":"chef.handler.datadog.test-hostname","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321219,0.0]],"type":"gauge","host":"chef.handler.datadog.test-hostname","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:36 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:39 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838669,5.0]],"type":"gauge","host":"chef.handler.datadog.test-hostname","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321219,5.0]],"type":"gauge","host":"chef.handler.datadog.test-hostname","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:36 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:39 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838669,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321219,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-hostname ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test-hostname","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-hostname ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-hostname","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:24 GMT + - Mon, 06 Jan 2020 14:33:37 GMT + Content-Type: + - application/json + Content-Length: + - '361' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '359' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236660345629768,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024791991767853,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-hostname ","text":"Chef updated - 0 resources out of 0 resources total.","date_happened":1453838669,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236660345629768"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + 0 resources out of 0 resources total.","date_happened":1578321219,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024791991767853"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:39 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-hostname?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-hostname?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:37 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '68' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - iqUR658eMoTIiWZD4IiijxvuH1187cP4WmZ1rEzFTak= + - ADT0ms9dQnbDHbbduv4c09ChngZrYY7A/Pgms/qacMOruS4mPwZ1GJWq74I7G11W + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '71' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-hostname", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-hostname","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:39 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml b/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml index e7cccdb..dc74e46 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/hostname/uses_the_specified_hostname_when_provided.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838668,1.0]],"type":"counter","host":"my-imaginary-hostname.local","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321217,1.0]],"type":"counter","host":"my-imaginary-hostname.local","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:32 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:23 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:37 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838668,0.0]],"type":"counter","host":"my-imaginary-hostname.local","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321217,0.0]],"type":"counter","host":"my-imaginary-hostname.local","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:33 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:23 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:37 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838668,0.0]],"type":"gauge","host":"my-imaginary-hostname.local","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321217,0.0]],"type":"gauge","host":"my-imaginary-hostname.local","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:33 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:23 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:37 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838668,0.0]],"type":"gauge","host":"my-imaginary-hostname.local","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321217,0.0]],"type":"gauge","host":"my-imaginary-hostname.local","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:33 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:37 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838668,5.0]],"type":"gauge","host":"my-imaginary-hostname.local","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321217,5.0]],"type":"gauge","host":"my-imaginary-hostname.local","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:34 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:37 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838668,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321217,"msg_title":"Chef completed in 5 seconds on my-imaginary-hostname.local ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"my-imaginary-hostname.local","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on my-imaginary-hostname.local ","text":"Chef updated 0 resources out of 0 resources total.","host":"my-imaginary-hostname.local","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:24 GMT + - Mon, 06 Jan 2020 14:33:34 GMT + Content-Type: + - application/json + Content-Length: + - '354' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '352' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236652309264256,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024750304000162,"title":"Chef completed in 5 seconds on my-imaginary-hostname.local ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838668,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236652309264256"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT + out of 0 resources total.","date_happened":1578321217,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024750304000162"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:37 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/my-imaginary-hostname.local?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/my-imaginary-hostname.local?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:34 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '61' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - wwu/bgxccjlNazhLUNsdV85F8rKnw6/fYnlKNBhfzOg= + - ty7T8eIeXOfZhM7KDN5nGo8JS7ZSIWAqBNFeZshTg3LLDJJa7mPU5wqGt0nOPCpy + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '64' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "my-imaginary-hostname.local", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:28 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"my-imaginary-hostname.local","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:37 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/does_not_use_the_instance_id_when_config_specified_to_false.yml b/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/does_not_use_the_instance_id_when_config_specified_to_false.yml index 606a9ac..c12c225 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/does_not_use_the_instance_id_when_config_specified_to_false.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/does_not_use_the_instance_id_when_config_specified_to_false.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838669,1.0]],"type":"counter","host":"chef.handler.datadog.test-ec2","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321201,1.0]],"type":"counter","host":"chef.handler.datadog.test-ec2","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:17 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:21 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838669,0.0]],"type":"counter","host":"chef.handler.datadog.test-ec2","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321201,0.0]],"type":"counter","host":"chef.handler.datadog.test-ec2","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:17 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:21 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838669,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321201,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:17 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:24 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:21 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838669,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321201,0.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:18 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:21 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838669,5.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321201,5.0]],"type":"gauge","host":"chef.handler.datadog.test-ec2","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:18 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:21 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838669,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321201,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-ec2 ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test-ec2","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-ec2 ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-ec2","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:25 GMT + - Mon, 06 Jan 2020 14:33:18 GMT + Content-Type: + - application/json + Content-Length: + - '356' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '354' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236668415818934,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024486655155046,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-ec2 ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838669,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236668415818934"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT + out of 0 resources total.","date_happened":1578321201,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024486655155046"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:21 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-ec2?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-ec2?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:19 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '63' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - o+T6KJmtlm7/lHIbU4qEQWVkGtrRMvLvLMnhkr5jg08= + - pxuY3ZnSwE+rCP/MLubWk3EuAMlxxciIsQ2EBSRxZafCu9H4+UEVULDCm144bb3W + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '66' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-ec2", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:29 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-ec2","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:21 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml b/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml index 2bec4c3..f6ef350 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_config_is_specified.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838670,1.0]],"type":"counter","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321206,1.0]],"type":"counter","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:22 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838670,0.0]],"type":"counter","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321206,0.0]],"type":"counter","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:22 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838670,0.0]],"type":"gauge","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321206,0.0]],"type":"gauge","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:22 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838670,0.0]],"type":"gauge","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321206,0.0]],"type":"gauge","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:23 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838670,5.0]],"type":"gauge","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321206,5.0]],"type":"gauge","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:23 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838670,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321206,"msg_title":"Chef completed in 5 seconds on i-123456 ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"i-123456","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on i-123456 ","text":"Chef updated 0 resources out of 0 resources total.","host":"i-123456","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:25 GMT + - Mon, 06 Jan 2020 14:33:23 GMT + Content-Type: + - application/json + Content-Length: + - '335' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '333' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236677124917119,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024571821786671,"title":"Chef completed in 5 seconds on i-123456 ","text":"Chef updated 0 resources out of 0 resources - total.","date_happened":1453838670,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236677124917119"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + total.","date_happened":1578321206,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024571821786671"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:24 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '42' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - Qw6ay549f1REjHQtMvVJOj5Z1lY6iWSI3exDAg0o39Y= + - sg8vzlrAXfi82gDuSEBUxkn5dG85uDtr4RhaVLNn521TM8s6JdimiKDHvX2NhFjo + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '45' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "i-123456", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"i-123456","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml b/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml index 77ebb78..6f96d5c 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/reports_correct_hostname_on_an_ec2_node/uses_the_instance_id_when_no_config_specified.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838670,1.0]],"type":"counter","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321204,1.0]],"type":"counter","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:19 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:24 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838670,0.0]],"type":"counter","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321204,0.0]],"type":"counter","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:19 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:25 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:24 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838670,0.0]],"type":"gauge","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321204,0.0]],"type":"gauge","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:20 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:24 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838670,0.0]],"type":"gauge","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321204,0.0]],"type":"gauge","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:20 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:24 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838670,5.0]],"type":"gauge","host":"i-123456","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321204,5.0]],"type":"gauge","host":"i-123456","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:21 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:24 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838670,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321204,"msg_title":"Chef completed in 5 seconds on i-123456 ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"i-123456","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on i-123456 ","text":"Chef updated 0 resources out of 0 resources total.","host":"i-123456","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:26 GMT + - Mon, 06 Jan 2020 14:33:21 GMT + Content-Type: + - application/json + Content-Length: + - '335' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '333' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236685916283962,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024529341616622,"title":"Chef completed in 5 seconds on i-123456 ","text":"Chef updated 0 resources out of 0 resources - total.","date_happened":1453838670,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236685916283962"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT + total.","date_happened":1578321204,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024529341616622"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:24 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/i-123456?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:21 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:26 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '42' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - Lqo3/ximEWPWj/q8nw5y77qbM+7c3xo1aoVdmrbBiyU= + - B/LXPck0nGNX0RSV/Gw7cnZ0oe92FUOfg1ec7WcU0kSvw/UBT+IXTFTD87Snvz2v + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '45' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "i-123456", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:30 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"i-123456","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:24 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml b/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml index 5f29491..480d907 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/posts_an_event.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838674,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321222,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:37 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:42 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838674,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321222,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:38 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:42 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321222,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:38 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:42 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321222,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:38 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:42 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838674,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321222,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:39 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:42 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838674,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321222,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:29 GMT + - Mon, 06 Jan 2020 14:33:39 GMT + Content-Type: + - application/json + Content-Length: + - '352' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '350' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236744299842747,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024833519632867,"title":"Chef completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838674,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236744299842747"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + out of 0 resources total.","date_happened":1578321222,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024833519632867"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:42 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:39 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '59' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - 1TZ9yjqyTQEuQgFvlhDrXBTp0x7coU279EZsIv2sDHg= + - nRZqCODixwNZX0HLyT17WzYwenviVG0rmnZak57k5KsDWun3aWEsPedTsRpiFQxf + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:42 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml b/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml index b7d7517..83a2c06 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_events/sets_priority_correctly.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838673,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321224,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:40 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:44 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838673,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321224,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:40 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:44 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838673,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321224,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:40 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:44 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838673,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321224,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:41 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:44 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838673,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321224,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:41 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:44 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838673,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321224,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:29 GMT + - Mon, 06 Jan 2020 14:33:41 GMT + Content-Type: + - application/json + Content-Length: + - '352' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '350' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236735158043892,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024874812581551,"title":"Chef completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838673,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236735158043892"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + out of 0 resources total.","date_happened":1578321224,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024874812581551"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:44 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:42 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '59' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - Ea9uTuX7DSH7tTxx4/x8Cs66HtgW5sIpm2bNulg8W+0= + - A5a5htKhTUF1FdBQZRUZl4RVawKwk2RUtaZz3EDBmdXc0X6i0O7TBEBWn4bIBQ01 + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:44 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml b/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml index 96c77e3..57d1fc2 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/emits_metrics/reports_metrics.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838674,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321229,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:45 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:49 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838674,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321229,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:45 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:49 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321229,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:45 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:49 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321229,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:46 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:49 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838674,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321229,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:46 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:49 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838674,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321229,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:30 GMT + - Mon, 06 Jan 2020 14:33:46 GMT + Content-Type: + - application/json + Content-Length: + - '352' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '350' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236751983296521,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024958077196044,"title":"Chef completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838674,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236751983296521"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT + out of 0 resources total.","date_happened":1578321229,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024958077196044"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:49 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:47 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '59' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - 1TZ9yjqyTQEuQgFvlhDrXBTp0x7coU279EZsIv2sDHg= + - "+UwwYRc+A5vkEib2s1YY/+OMx26FxXkDPMnhrpaIz/kTVseyL62lC12FdLJrU3nv" + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:49 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml b/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml index b151ede..c261c65 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/reports_metrics_event_and_sets_tags/sets_tags/puts_the_tags_for_the_current_node.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838673,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321227,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:42 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:47 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838673,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321227,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:43 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:47 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838673,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321227,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:43 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:47 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838673,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321227,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:43 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:47 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838673,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321227,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:44 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:47 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838673,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321227,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:28 GMT + - Mon, 06 Jan 2020 14:33:44 GMT + Content-Type: + - application/json + Content-Length: + - '352' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '350' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236727437637511,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024915830130279,"title":"Chef completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838673,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236727437637511"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT + out of 0 resources total.","date_happened":1578321227,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=5269024915830130279"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:47 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?source=chef body: encoding: UTF-8 string: '{"tags":["env:testing"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:44 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '59' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - o+T6KJmtlm7/lHIbU4qEQWVkGtrRMvLvLMnhkr5jg08= + - 0Ldh7zbvTvxG6fwW0tw8N7mZPnI2XNOUoKCE8H0O1+b4UJVtdo0G52qWoFveZXDz + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test","tags":["env:testing"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:47 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/only_emits_the_run_status_metrics.yml b/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/only_emits_the_run_status_metrics.yml index 4b50099..4beda73 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/only_emits_the_run_status_metrics.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/only_emits_the_run_status_metrics.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838672,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321205,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:26 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:32 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:32 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838672,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321206,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,32 +63,36 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:26 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:32 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:32 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 string: '{"msg_text":"Chef was unable to complete a run, an error during compilation - may have occurred.","date_happened":1453838672,"msg_title":"Chef failed during + may have occurred.","date_happened":1578321206,"msg_title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}' @@ -102,30 +110,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:32 GMT + - Mon, 06 Jan 2020 14:33:26 GMT + Content-Type: + - application/json + Content-Length: + - '403' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '401' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236787786934568,"title":"Chef failed + string: '{"status":"ok","event":{"id":5269024619922531219,"title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef - was unable to complete a run, an error during compilation may have occurred.","date_happened":1453838672,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=381236787786934568"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:32 GMT + was unable to complete a run, an error during compilation may have occurred.","date_happened":1578321206,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024619922531219"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:26 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef body: encoding: UTF-8 string: '{"tags":["env:resources"]}' @@ -136,6 +148,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -143,31 +159,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:27 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:32 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '71' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - 4iA0gEW3U+JPEQU/L1uUqRuaUwdDN4h3ejNHIRKagxs= + - u2B27rQjtu8TuEjzrroc8ae3xeJMLmsxU6SiAszW1tH+EI3X0cOP819eGNRqlxzl + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '74' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:32 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:27 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml b/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml index 344764f..c18b788 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase/posts_an_event.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838671,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321204,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:24 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:32 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:24 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838671,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321204,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,32 +63,36 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:25 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:32 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:25 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 string: '{"msg_text":"Chef was unable to complete a run, an error during compilation - may have occurred.","date_happened":1453838672,"msg_title":"Chef failed during + may have occurred.","date_happened":1578321205,"msg_title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}' @@ -102,30 +110,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:32 GMT + - Mon, 06 Jan 2020 14:33:25 GMT + Content-Type: + - application/json + Content-Length: + - '403' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '401' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236783340100567,"title":"Chef failed + string: '{"status":"ok","event":{"id":5269024595980476383,"title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef - was unable to complete a run, an error during compilation may have occurred.","date_happened":1453838672,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=381236783340100567"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:32 GMT + was unable to complete a run, an error during compilation may have occurred.","date_happened":1578321205,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024595980476383"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:25 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef body: encoding: UTF-8 string: '{"tags":["env:resources"]}' @@ -136,6 +148,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -143,31 +159,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:25 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:32 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '71' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - Lqo3/ximEWPWj/q8nw5y77qbM+7c3xo1aoVdmrbBiyU= + - OxP+mFpjAbASiVhNf+t4MttAs95ZlMiGosIRnYJJGFoApNgv2oxtdzpnmNlMOki6 + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '74' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:32 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:25 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/only_emits_the_run_status_metrics.yml b/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/only_emits_the_run_status_metrics.yml index f9dd7a4..73a3fa6 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/only_emits_the_run_status_metrics.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/only_emits_the_run_status_metrics.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1485547327,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321212,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:27 GMT Content-Type: - text/json - Date: - - Fri, 27 Jan 2017 20:02:02 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 27 Jan 2017 20:02:07 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:32 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1485547327,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321212,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,32 +63,36 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:27 GMT Content-Type: - text/json - Date: - - Fri, 27 Jan 2017 20:02:02 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 27 Jan 2017 20:02:07 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:32 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 string: '{"msg_text":"Chef was unable to complete a run, an error during compilation - may have occurred.","date_happened":1485547327,"msg_title":"Chef failed during + may have occurred.","date_happened":1578321212,"msg_title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}' @@ -102,30 +110,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Fri, 27 Jan 2017 20:02:02 GMT + - Mon, 06 Jan 2020 14:33:28 GMT + Content-Type: + - application/json + Content-Length: + - '403' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '401' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":913219659465841444,"title":"Chef failed + string: '{"status":"ok","event":{"id":5269024643832661380,"title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef - was unable to complete a run, an error during compilation may have occurred.","date_happened":1485547327,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=913219659465841444"}}' - http_version: - recorded_at: Fri, 27 Jan 2017 20:02:07 GMT + was unable to complete a run, an error during compilation may have occurred.","date_happened":1578321212,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024643832661380"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:32 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef body: encoding: UTF-8 string: '{"tags":["env:resources"]}' @@ -136,6 +148,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -143,31 +159,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:28 GMT Content-Type: - application/json - Date: - - Fri, 27 Jan 2017 20:02:02 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '71' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - tfYTpqMVXM3M7Ic3NSslg9OvOysbx8Mrdhv4OAsMKCDdYga06HUB/8z0VnhYMv3C + - AVsav2jjRGvwjNvJeRUS7kJsgTlhh9y9smyL3UJVQTMAUoPyejdL0bVSnanIQLK4 + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '71' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}' - http_version: - recorded_at: Fri, 27 Jan 2017 20:02:07 GMT -recorded_with: VCR 3.0.3 + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:32 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/posts_an_event.yml b/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/posts_an_event.yml index bf8182e..f117eef 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/posts_an_event.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/resources/failure_during_compile_phase_with_an_elapsed_time_and_incomplete_resource_collection/posts_an_event.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1485547327,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321213,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:28 GMT Content-Type: - text/json - Date: - - Fri, 27 Jan 2017 20:02:02 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 27 Jan 2017 20:02:07 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:33 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1485547327,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321213,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,32 +63,36 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:29 GMT Content-Type: - text/json - Date: - - Fri, 27 Jan 2017 20:02:02 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 27 Jan 2017 20:02:07 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:33 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 string: '{"msg_text":"Chef was unable to complete a run, an error during compilation - may have occurred.","date_happened":1485547327,"msg_title":"Chef failed during + may have occurred.","date_happened":1578321213,"msg_title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","priority":"normal","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"error","event_type":"config_management.run","source_type_name":"chef","title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef was unable to complete a run, an error during compilation may have occurred.","host":"chef.handler.datadog.test-resources","device":null}' @@ -102,30 +110,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Fri, 27 Jan 2017 20:02:02 GMT + - Mon, 06 Jan 2020 14:33:29 GMT + Content-Type: + - application/json + Content-Length: + - '403' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '401' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":913219665218676295,"title":"Chef failed + string: '{"status":"ok","event":{"id":5269024667526606029,"title":"Chef failed during compile phase on chef.handler.datadog.test-resources ","text":"Chef - was unable to complete a run, an error during compilation may have occurred.","date_happened":1485547327,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=913219665218676295"}}' - http_version: - recorded_at: Fri, 27 Jan 2017 20:02:07 GMT + was unable to complete a run, an error during compilation may have occurred.","date_happened":1578321213,"handle":null,"priority":"normal","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024667526606029"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:33 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef body: encoding: UTF-8 string: '{"tags":["env:resources"]}' @@ -136,6 +148,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -143,31 +159,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:30 GMT Content-Type: - application/json - Date: - - Fri, 27 Jan 2017 20:02:02 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '71' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - gViavZoY8rjtSLcIomJIWXS+mOF/f74cR9lPqFPI7NQ= + - YKF8+1vTI0wiWlB3VWhiMVnZ1RLtV3h2yAW6/TGe9qIMWdYXxsNpy3J4QxfrJoDD + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '71' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}' - http_version: - recorded_at: Fri, 27 Jan 2017 20:02:07 GMT -recorded_with: VCR 3.0.3 + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:33 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_enabled/sets_the_policy_name_and_policy_group_tags.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_enabled/sets_the_policy_name_and_policy_group_tags.yml index a4f193f..250f83c 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_enabled/sets_the_policy_name_and_policy_group_tags.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_enabled/sets_the_policy_name_and_policy_group_tags.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838676,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321247,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:02 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:07 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838676,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321247,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:02 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:07 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838676,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321247,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:03 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:07 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838676,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321247,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:03 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:07 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838676,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321247,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,32 +192,36 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:04 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:07 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1458601273,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only","tag:datacenter:my-cloud"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321247,"msg_title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","policy_group:the_policy_group","policy_name:the_policy_name"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' headers: @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:31 GMT + - Mon, 06 Jan 2020 14:34:04 GMT + Content-Type: + - application/json + Content-Length: + - '437' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '422' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":461139917332183580,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025250776455594,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1458601273,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only","tag:datacenter:my-cloud"],"url":"https://app.datadoghq.com/event/event?id=461139917332183580"}}' - http_version: - recorded_at: Mon, 21 Mar 2016 23:01:13 GMT + out of 0 resources total.","date_happened":1578321247,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","policy_group:the_policy_group","policy_name:the_policy_name"],"url":"https://app.datadoghq.com/event/event?id=5269025250776455594"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:07 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander","policy_group:the_policy_group","policy_name:the_policy_name"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:04 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '144' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - EhhnoBinSJ/mFOFx8c30LkIq8VSKonD/kqf6I2QWUws= + - PKDIrz8Hcluof9oNzY3q1BouPTowe6nlZ4slm6KLsMEc/9DaK1hteKVCh6mza/IQ + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '137' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-tags", "tags":["env:hostile","role:highlander","policy_group:the_policy_group","policy_name:the_policy_name"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-tags","tags":["env:hostile","role:highlander","policy_name:the_policy_name","policy_group:the_policy_group"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:07 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_not_enabled/does_not_set_the_policy_name_and_policy_group_tags.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_not_enabled/does_not_set_the_policy_name_and_policy_group_tags.yml index c87660d..40041f2 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_not_enabled/does_not_set_the_policy_name_and_policy_group_tags.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_policy_tags_are_not_enabled/does_not_set_the_policy_name_and_policy_group_tags.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1486079857,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321232,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:47 GMT Content-Type: - text/json - Date: - - Thu, 02 Feb 2017 23:57:32 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' http_version: - recorded_at: Thu, 02 Feb 2017 23:57:37 GMT + recorded_at: Mon, 06 Jan 2020 14:33:52 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1486079857,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321232,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:48 GMT Content-Type: - text/json - Date: - - Thu, 02 Feb 2017 23:57:32 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' http_version: - recorded_at: Thu, 02 Feb 2017 23:57:37 GMT + recorded_at: Mon, 06 Jan 2020 14:33:52 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1486079857,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321232,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:48 GMT Content-Type: - text/json - Date: - - Thu, 02 Feb 2017 23:57:32 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' http_version: - recorded_at: Thu, 02 Feb 2017 23:57:37 GMT + recorded_at: Mon, 06 Jan 2020 14:33:52 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1486079857,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321232,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:48 GMT Content-Type: - text/json - Date: - - Thu, 02 Feb 2017 23:57:32 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' http_version: - recorded_at: Thu, 02 Feb 2017 23:57:37 GMT + recorded_at: Mon, 06 Jan 2020 14:33:52 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1486079857,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321232,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:49 GMT Content-Type: - text/json - Date: - - Thu, 02 Feb 2017 23:57:33 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' http_version: - recorded_at: Thu, 02 Feb 2017 23:57:37 GMT + recorded_at: Mon, 06 Jan 2020 14:33:52 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1486079857,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321232,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Thu, 02 Feb 2017 23:57:33 GMT + - Mon, 06 Jan 2020 14:33:49 GMT + Content-Type: + - application/json + Content-Length: + - '375' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '373' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":922154041878767484,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024999868364868,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1486079857,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=922154041878767484"}}' + out of 0 resources total.","date_happened":1578321232,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=5269024999868364868"}}' http_version: - recorded_at: Thu, 02 Feb 2017 23:57:37 GMT + recorded_at: Mon, 06 Jan 2020 14:33:52 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:49 GMT Content-Type: - application/json - Date: - - Thu, 02 Feb 2017 23:57:33 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '82' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - fTGHC5140Slzi8+VUckQeb7JtG5SB73QXNv+4EfnG/s= + - rK52fEhHKxisnKo2rembr3YValr4L+BG6/8tD9iNDc8Prg2mnV6DynBkS75++wh/ + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '82' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"host":"chef.handler.datadog.test-tags","tags":["env:hostile","role:highlander"]}' http_version: - recorded_at: Thu, 02 Feb 2017 23:57:37 GMT -recorded_with: VCR 3.0.3 + recorded_at: Mon, 06 Jan 2020 14:33:52 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_scope_prefix.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_scope_prefix.yml index 362b765..0b5d919 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_scope_prefix.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_scope_prefix.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1468585607,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321242,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:57 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:42 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:47 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:02 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1468585607,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321242,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:57 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:42 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:47 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:02 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1468585607,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321242,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:58 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:42 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:47 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:02 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1468585607,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321242,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:58 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:43 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:47 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:02 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1468585607,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321242,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:58 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:43 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:47 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:02 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1468585607,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321242,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Fri, 15 Jul 2016 12:26:43 GMT + - Mon, 06 Jan 2020 14:33:59 GMT + Content-Type: + - application/json + Content-Length: + - '375' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '373' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":628649244912460327,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025165696638327,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1468585607,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=628649244912460327"}}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:47 GMT + out of 0 resources total.","date_happened":1578321242,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=5269025165696638327"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:02 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,32 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:59 GMT Content-Type: - application/json - Date: - - Fri, 15 Jul 2016 12:26:44 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '82' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - ODPlWrOS4MEcZXXD/7SPngU2RDdboMc4yDiHiqJBZz0= + - kg+/Cls6zaJcT2blJLlU62BwgGePGdpqSwWrJ0xEIvzmSMWHXxGNsiyEzBPJ1a96 + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '86' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile", - "role:highlander"]}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:47 GMT -recorded_with: VCR 3.0.0 + string: '{"host":"chef.handler.datadog.test-tags","tags":["env:hostile","role:highlander"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:02 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_tag_prefix.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_tag_prefix.yml index 863b438..119a8ba 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_tag_prefix.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_empty_tag_prefix.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1458250870,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321234,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,70 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:50 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:05 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:10 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1458250870,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Thu, 17 Mar 2016 21:41:05 GMT Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '16' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:10 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:54 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1458250870,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321234,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:50 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:05 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:10 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:54 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1458250870,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321234,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:50 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:05 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:10 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:54 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1458250870,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321234,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:51 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:05 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:10 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:54 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1458250870,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321234,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -215,32 +192,36 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:51 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:05 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:10 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:54 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1458250870,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":null,"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321234,"msg_title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","the_one_and_only","datacenter:my-cloud"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' headers: @@ -257,33 +238,37 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Thu, 17 Mar 2016 21:41:05 GMT + - Mon, 06 Jan 2020 14:33:51 GMT + Content-Type: + - application/json + Content-Length: + - '416' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '344' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":455261105802551673,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025041618650910,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1458250870,"handle":null,"priority":"low","related_event_id":null,"tags":null,"url":"https://app.datadoghq.com/event/event?id=455261105802551673"}}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:10 GMT + out of 0 resources total.","date_happened":1578321234,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","the_one_and_only","datacenter:my-cloud"],"url":"https://app.datadoghq.com/event/event?id=5269025041618650910"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:54 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander"]}' + string: '{"tags":["env:hostile","role:highlander","the_one_and_only","datacenter:my-cloud"]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -291,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -298,32 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:52 GMT Content-Type: - application/json - Date: - - Thu, 17 Mar 2016 21:41:05 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '123' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - Bj/SqNU1vbZGxNGffIRtmaWe7MKGSPoKHC3+ZhLAjqk= + - hvGKayUGXeVy/DmHDcIjD3+gP6x9d+NwveU9CYPD06LgIrg7NUxobVuhZiOcmptK + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '86' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile", - "role:highlander"]}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:10 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-tags","tags":["datacenter:my-cloud","role:highlander","env:hostile","the_one_and_only"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:54 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_scope_prefix.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_scope_prefix.yml index bf2e115..882d577 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_scope_prefix.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_scope_prefix.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1468585604,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321244,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:00 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:40 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:44 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:04 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1468585604,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321244,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:00 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:40 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:44 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:04 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1468585604,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321244,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:00 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:40 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:44 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:04 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1468585604,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321244,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:01 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:40 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:44 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:04 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1468585604,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321244,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:01 GMT Content-Type: - text/json - Date: - - Fri, 15 Jul 2016 12:26:41 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:44 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:04 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1468585604,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321244,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["custom-prefix-env:hostile","custom-prefix-role:highlander"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Fri, 15 Jul 2016 12:26:41 GMT + - Mon, 06 Jan 2020 14:34:01 GMT + Content-Type: + - application/json + Content-Length: + - '403' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '401' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":628649205653986705,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025207727071005,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1468585604,"handle":null,"priority":"low","related_event_id":null,"tags":["custom-prefix-env:hostile","custom-prefix-role:highlander"],"url":"https://app.datadoghq.com/event/event?id=628649205653986705"}}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:44 GMT + out of 0 resources total.","date_happened":1578321244,"handle":null,"priority":"low","related_event_id":null,"tags":["custom-prefix-env:hostile","custom-prefix-role:highlander"],"url":"https://app.datadoghq.com/event/event?id=5269025207727071005"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:04 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 string: '{"tags":["custom-prefix-env:hostile","custom-prefix-role:highlander"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,32 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:02 GMT Content-Type: - application/json - Date: - - Fri, 15 Jul 2016 12:26:42 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '110' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - zQvcGkDLyR4m97VlDZoL6TkDDJcHi5I48BguYFvYR1g= + - gTOcsJ9zYSZ+PlZt1+bfNLO1aqkpyvjY9WxGFsu+bpm/9sPfqZYsVzfkGLl/vABV + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '114' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-tags", "tags": ["custom-prefix-env:hostile", - "custom-prefix-role:highlander"]}' - http_version: - recorded_at: Fri, 15 Jul 2016 12:26:44 GMT -recorded_with: VCR 3.0.0 + string: '{"host":"chef.handler.datadog.test-tags","tags":["custom-prefix-env:hostile","custom-prefix-role:highlander"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:04 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_tag_prefix.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_tag_prefix.yml index bf7c2d8..fcb7d75 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_tag_prefix.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/allows_for_user-specified_tag_prefix.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1458250868,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321237,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:52 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:04 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:08 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:57 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1458250868,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321237,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:53 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:04 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:08 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:57 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1458250868,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321237,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:53 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:04 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:08 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:57 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1458250868,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321237,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:53 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:04 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:08 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:57 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1458250868,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321237,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,32 +192,36 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:54 GMT Content-Type: - text/json - Date: - - Thu, 17 Mar 2016 21:41:04 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:08 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:57 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1458250868,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":null,"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321237,"msg_title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","custom-prefix-the_one_and_only","custom-prefix-datacenter:my-cloud"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' headers: @@ -218,33 +238,37 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Thu, 17 Mar 2016 21:41:04 GMT + - Mon, 06 Jan 2020 14:33:54 GMT + Content-Type: + - application/json + Content-Length: + - '444' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '344' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":455261092784026415,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025082915347135,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1458250868,"handle":null,"priority":"low","related_event_id":null,"tags":null,"url":"https://app.datadoghq.com/event/event?id=455261092784026415"}}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:08 GMT + out of 0 resources total.","date_happened":1578321237,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","custom-prefix-the_one_and_only","custom-prefix-datacenter:my-cloud"],"url":"https://app.datadoghq.com/event/event?id=5269025082915347135"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:57 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander"]}' + string: '{"tags":["env:hostile","role:highlander","custom-prefix-the_one_and_only","custom-prefix-datacenter:my-cloud"]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,32 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:54 GMT Content-Type: - application/json - Date: - - Thu, 17 Mar 2016 21:41:04 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '151' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - QYSb9ZUj91gVP/VyhgpNnm/M7M7fif9QER6YVwRajIA= + - J5PL0LnJukdy69mckjXi3cjye/YJX2hkoCBkqKQi+tYjrsXYELx6DfDD11fhyjYF + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '86' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile", - "role:highlander"]}' - http_version: - recorded_at: Thu, 17 Mar 2016 21:41:08 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-tags","tags":["env:hostile","custom-prefix-the_one_and_only","role:highlander","custom-prefix-datacenter:my-cloud"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:57 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml index 5527103..3452873 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_specified/sets_the_role_and_env_and_tags.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838676,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321239,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:55 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:59 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838676,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321239,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:55 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:59 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838676,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321239,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:55 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:59 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838676,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321239,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:56 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:59 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838676,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321239,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:56 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:59 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1458601273,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321239,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only","tag:datacenter:my-cloud"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:31 GMT + - Mon, 06 Jan 2020 14:33:56 GMT + Content-Type: + - application/json + Content-Length: + - '424' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '422' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":461139917332183580,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025124247407901,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1458601273,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only","tag:datacenter:my-cloud"],"url":"https://app.datadoghq.com/event/event?id=461139917332183580"}}' - http_version: - recorded_at: Mon, 21 Mar 2016 23:01:13 GMT + out of 0 resources total.","date_happened":1578321239,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only","tag:datacenter:my-cloud"],"url":"https://app.datadoghq.com/event/event?id=5269025124247407901"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:59 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only","tag:datacenter:my-cloud"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,32 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:57 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '131' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - EhhnoBinSJ/mFOFx8c30LkIq8VSKonD/kqf6I2QWUws= + - KKQq2SiaDLpychKSp47ffvU6SRxUV+VzBWr187ESkULBuGOI+kREfb/2NCy8DAWC + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '137' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-tags", "tags": ["tag:datacenter:my-cloud", - "env:hostile", "role:highlander", "tag:the_one_and_only"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:36 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-tags","tags":["tag:datacenter:my-cloud","env:hostile","role:highlander","tag:the_one_and_only"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:59 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_specified/does_not_include_the_tag_s_specified.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_specified/does_not_include_the_tag_s_specified.yml index fa31bd4..3d0ffcc 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_specified/does_not_include_the_tag_s_specified.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_specified/does_not_include_the_tag_s_specified.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1471280572,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321256,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:11 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:52 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:16 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1471280572,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321256,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:11 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:52 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:16 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1471280572,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321256,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:12 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:52 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:16 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1471280572,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321256,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:12 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:52 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:16 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1471280572,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321256,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:12 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:52 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:16 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1471280572,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321256,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:allowed_tag"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Mon, 15 Aug 2016 17:02:31 GMT + - Mon, 06 Jan 2020 14:34:13 GMT + Content-Type: + - application/json + Content-Length: + - '393' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '391' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":673862961379005400,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025399894466754,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1471280572,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:allowed_tag"],"url":"https://app.datadoghq.com/event/event?id=673862961379005400"}}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:52 GMT + out of 0 resources total.","date_happened":1578321256,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:allowed_tag"],"url":"https://app.datadoghq.com/event/event?id=5269025399894466754"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:16 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander","tag:allowed_tag"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:13 GMT Content-Type: - application/json - Date: - - Mon, 15 Aug 2016 17:02:31 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '100' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - u7dUbT/JdTcUwf46Xq6Rp9y7LQHfqCh/ybJrMEoYyOs= + - ErnxdXQi+pjNvJU00qnaaPgTN904IR+BI4NeCvSijs0uGcTaVMOpPOuObFW+gkC6 + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '100' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"host":"chef.handler.datadog.test-tags","tags":["tag:allowed_tag","env:hostile","role:highlander"]}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:52 GMT -recorded_with: VCR 3.0.3 + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:16 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_unspecified/should_include_all_of_the_tag_s_.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_unspecified/should_include_all_of_the_tag_s_.yml index 75200b5..f8fb8c2 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_unspecified/should_include_all_of_the_tag_s_.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_tag_blacklist_is_unspecified/should_include_all_of_the_tag_s_.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1471280570,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321249,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:05 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:50 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:09 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1471280570,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321249,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:05 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:50 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:09 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1471280570,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321249,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:05 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:27 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:50 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:09 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1471280570,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321249,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:06 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:50 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:09 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1471280570,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321249,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:06 GMT Content-Type: - text/json - Date: - - Mon, 15 Aug 2016 17:02:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:50 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:09 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1471280570,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321249,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:allowed_tag","tag:not_allowed_tag"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Mon, 15 Aug 2016 17:02:29 GMT + - Mon, 06 Jan 2020 14:34:07 GMT + Content-Type: + - application/json + Content-Length: + - '415' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '413' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":673862920794646009,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025296627962103,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1471280570,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:allowed_tag","tag:not_allowed_tag"],"url":"https://app.datadoghq.com/event/event?id=673862920794646009"}}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:50 GMT + out of 0 resources total.","date_happened":1578321249,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:allowed_tag","tag:not_allowed_tag"],"url":"https://app.datadoghq.com/event/event?id=5269025296627962103"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:09 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander","tag:allowed_tag","tag:not_allowed_tag"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:07 GMT Content-Type: - application/json - Date: - - Mon, 15 Aug 2016 17:02:29 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '122' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - X3wiS3TmbMDzsQbEqoXOaZBb7h7NerICnnB6m4rc/sw= + - UlUHD7I7ISIp2OTIKJ1HGCksOU1snpAx2HtkPJw2SYzWMPmqzICEuimWl9Uiyokg + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '122' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"host":"chef.handler.datadog.test-tags","tags":["tag:allowed_tag","env:hostile","role:highlander","tag:not_allowed_tag"]}' - http_version: - recorded_at: Mon, 15 Aug 2016 17:02:50 GMT -recorded_with: VCR 3.0.3 + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:09 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml index 3cafeac..2a9ff20 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags/when_unspecified/sets_role_env_and_nothing_else.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838675,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321252,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:08 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:35 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:12 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838675,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321252,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:08 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:35 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:12 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838675,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321252,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:09 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:35 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:12 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838675,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321252,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:09 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:35 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:12 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838675,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321252,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:34:10 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:35 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:12 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838675,"msg_title":"Chef + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321252,"msg_title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander"],"aggregation_key":"chef.handler.datadog.test-tags","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:31 GMT + - Mon, 06 Jan 2020 14:34:10 GMT + Content-Type: + - application/json + Content-Length: + - '375' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '373' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236770623842597,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269025356022278056,"title":"Chef completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838675,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=381236770623842597"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:35 GMT + out of 0 resources total.","date_happened":1578321252,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander"],"url":"https://app.datadoghq.com/event/event?id=5269025356022278056"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:12 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags?source=chef body: encoding: UTF-8 string: '{"tags":["env:hostile","role:highlander"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,32 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:34:11 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:31 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '82' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - uTibUUKQfObPuIZxjR4qd7DtXl7nOORJ69j/2Xrv/+E= + - ucJMu0SEwqvJ36fqkYRsP+glKObktTtdBf6X17lKXJ4+xOn7nFKnx11beu1ycofn + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '86' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile", - "role:highlander"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:35 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-tags","tags":["env:hostile","role:highlander"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:34:12 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_not_specified/does_not_retry_after_a_failed_submission.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_not_specified/does_not_retry_after_a_failed_submission.yml index da6ab98..41cc2c2 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_not_specified/does_not_retry_after_a_failed_submission.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_not_specified/does_not_retry_after_a_failed_submission.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838676,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321199,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,29 +20,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:14 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:19 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838676,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321199,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -57,29 +63,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:15 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:19 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1428248966,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321199,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -94,29 +106,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:15 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:19 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1428248966,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321199,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -131,29 +149,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:22 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:15 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:19 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1428248966,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321199,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -168,32 +192,38 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:23 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:16 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:19 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1428248966,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-tags-retries","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321199,"msg_title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags-retries ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-tags-retries","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags-retries ","text":"Chef + updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags-retries","device":null}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -208,71 +238,29 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:23 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; - Content-Length: - - '420' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok", "event": {"priority": "low", "date_happened": 1428248966, - "handle": null, "title": "Chef completed in 5 seconds on chef.handler.datadog.test-tags - ", "url": "https://app.datadoghq.com/event/event?id=2751230185062799345", - "text": "Chef updated 0 resources out of 0 resources total.", "tags": ["env:hostile", - "role:highlander", "tag:the_one_and_only"], "related_event_id": null, "id": - 2751230185062799345}}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags-retries?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 404 - message: Not Found - headers: - Cache-Control: - - no-cache + - Mon, 06 Jan 2020 14:33:16 GMT Content-Type: - application/json - Date: - - Sun, 05 Apr 2015 15:49:24 GMT - Pragma: - - no-cache - Server: - - gunicorn/19.1.0 - Strict-Transport-Security: - - max-age=15724800; - X-Dd-Debug: - - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8= - X-Frame-Options: - - SAMEORIGIN Content-Length: - - '44' + - '406' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"errors": ["No host matches that host_id"]}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -recorded_with: VCR 2.9.3 + string: '{"status":"ok","event":{"id":5269024450948964660,"title":"Chef completed + in 5 seconds on chef.handler.datadog.test-tags-retries ","text":"Chef updated + 0 resources out of 0 resources total.","date_happened":1578321199,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269024450948964660"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:19 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/retries_no_more_than_twice.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/retries_no_more_than_twice.yml index 7caf820..05c7c89 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/retries_no_more_than_twice.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/retries_no_more_than_twice.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838676,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321195,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,29 +20,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:10 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838676,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321195,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -57,29 +63,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:10 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1428248966,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321195,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -94,29 +106,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:11 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1428248966,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321195,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -131,29 +149,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:22 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:11 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1428248966,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321195,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -168,32 +192,38 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:23 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:12 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:15 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1428248966,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-tags-retries","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321195,"msg_title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags-retries ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-tags-retries","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags-retries ","text":"Chef + updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags-retries","device":null}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -208,161 +238,29 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:23 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; - Content-Length: - - '420' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok", "event": {"priority": "low", "date_happened": 1428248966, - "handle": null, "title": "Chef completed in 5 seconds on chef.handler.datadog.test-tags - ", "url": "https://app.datadoghq.com/event/event?id=2751230185062799345", - "text": "Chef updated 0 resources out of 0 resources total.", "tags": ["env:hostile", - "role:highlander", "tag:the_one_and_only"], "related_event_id": null, "id": - 2751230185062799345}}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags-retries?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 404 - message: Not Found - headers: - Cache-Control: - - no-cache + - Mon, 06 Jan 2020 14:33:12 GMT Content-Type: - application/json - Date: - - Sun, 05 Apr 2015 15:49:24 GMT - Pragma: - - no-cache - Server: - - gunicorn/19.1.0 - Strict-Transport-Security: - - max-age=15724800; - X-Dd-Debug: - - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8= - X-Frame-Options: - - SAMEORIGIN Content-Length: - - '44' + - '406' Connection: - keep-alive - body: - encoding: UTF-8 - string: '{"errors": ["No host matches that host_id"]}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags-retries?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 404 - message: Not Found - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Sun, 05 Apr 2015 15:49:24 GMT - Pragma: - - no-cache - Server: - - gunicorn/19.1.0 - Strict-Transport-Security: - - max-age=15724800; - X-Dd-Debug: - - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8= + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '44' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"errors": ["No host matches that host_id"]}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags-retries?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 404 - message: Not Found - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Sun, 05 Apr 2015 15:49:24 GMT - Pragma: - - no-cache - Server: - - gunicorn/19.1.0 + X-Content-Type-Options: + - nosniff Strict-Transport-Security: - max-age=15724800; - X-Dd-Debug: - - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8= - X-Frame-Options: - - SAMEORIGIN - Content-Length: - - '44' - Connection: - - keep-alive body: encoding: UTF-8 - string: '{"errors": ["No host matches that host_id"]}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -recorded_with: VCR 2.9.3 + string: '{"status":"ok","event":{"id":5269024378120001608,"title":"Chef completed + in 5 seconds on chef.handler.datadog.test-tags-retries ","text":"Chef updated + 0 resources out of 0 resources total.","date_happened":1578321195,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269024378120001608"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:15 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/stops_retrying_once_submission_is_successful.yml b/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/stops_retrying_once_submission_is_successful.yml index 29c8366..3f0fcd1 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/stops_retrying_once_submission_is_successful.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/tags_submission_retries/when_specified_as_2_retries/stops_retrying_once_submission_is_successful.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838676,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321197,1.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,29 +20,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:12 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:17 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838676,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321197,0.0]],"type":"counter","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -57,29 +63,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:13 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:17 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1428248966,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321197,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -94,29 +106,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:21 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:13 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:17 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1428248966,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321197,0.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -131,29 +149,35 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:22 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:13 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:17 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1428248966,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321197,5.0]],"type":"gauge","host":"chef.handler.datadog.test-tags-retries","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -168,32 +192,38 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:23 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; + - Mon, 06 Jan 2020 14:33:14 GMT + Content-Type: + - text/json Content-Length: - - '15' + - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok"}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT + string: '{"status": "ok"}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:17 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1428248966,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-tags-retries","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test-tags ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags","device":null}' + string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1578321197,"msg_title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags-retries ","priority":"low","parent":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"aggregation_key":"chef.handler.datadog.test-tags-retries","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef + completed in 5 seconds on chef.handler.datadog.test-tags-retries ","text":"Chef + updated 0 resources out of 0 resources total.","host":"chef.handler.datadog.test-tags-retries","device":null}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -208,117 +238,29 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/json; charset=UTF-8 Date: - - Sun, 05 Apr 2015 15:49:23 GMT - Server: - - dogdispatcher/6.1.23 - Strict-Transport-Security: - - max-age=15724800; - Content-Length: - - '420' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok", "event": {"priority": "low", "date_happened": 1428248966, - "handle": null, "title": "Chef completed in 5 seconds on chef.handler.datadog.test-tags - ", "url": "https://app.datadoghq.com/event/event?id=2751230185062799345", - "text": "Chef updated 0 resources out of 0 resources total.", "tags": ["env:hostile", - "role:highlander", "tag:the_one_and_only"], "related_event_id": null, "id": - 2751230185062799345}}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags-retries?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 404 - message: Not Found - headers: - Cache-Control: - - no-cache + - Mon, 06 Jan 2020 14:33:14 GMT Content-Type: - application/json - Date: - - Sun, 05 Apr 2015 15:49:24 GMT - Pragma: - - no-cache - Server: - - gunicorn/19.1.0 - Strict-Transport-Security: - - max-age=15724800; - X-Dd-Debug: - - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8= - X-Frame-Options: - - SAMEORIGIN Content-Length: - - '44' + - '406' Connection: - keep-alive - body: - encoding: UTF-8 - string: '{"errors": ["No host matches that host_id"]}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-tags-retries?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:hostile","role:highlander","tag:the_one_and_only"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 201 - message: Created - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Sun, 05 Apr 2015 15:49:24 GMT - Pragma: - - no-cache - Server: - - gunicorn/19.1.0 - Strict-Transport-Security: - - max-age=15724800; - X-Dd-Debug: - - mPU4gm+hKkKT8ia9ZdY5CzVKb87xvoCEvNtumo6b6Z8= + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '110' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-tags", "tags": ["env:hostile", - "role:highlander", "tag:the_one_and_only"]}' - http_version: - recorded_at: Sun, 05 Apr 2015 15:49:26 GMT -recorded_with: VCR 2.9.3 + string: '{"status":"ok","event":{"id":5269024414405768619,"title":"Chef completed + in 5 seconds on chef.handler.datadog.test-tags-retries ","text":"Chef updated + 0 resources out of 0 resources total.","date_happened":1578321197,"handle":null,"priority":"low","related_event_id":null,"tags":["env:hostile","role:highlander","tag:the_one_and_only"],"url":"https://app.datadoghq.com/event/event?id=5269024414405768619"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:17 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml b/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml index 861884b..2ad3fd2 100644 --- a/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml +++ b/spec/support/cassettes/Chef_Handler_Datadog/updated_resources/posts_an_event.yml @@ -5,7 +5,7 @@ http_interactions: uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838678,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.success","points":[[1578321218,1.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -20,31 +20,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:30 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:38 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:38 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838678,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.run.failure","points":[[1578321218,0.0]],"type":"counter","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,31 +63,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:30 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:38 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:38 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838678,2.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.resources.total","points":[[1578321218,2.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,31 +106,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:31 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:38 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:38 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838678,1.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.resources.updated","points":[[1578321218,1.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -137,31 +149,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:31 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:38 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:38 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/series?api_key= body: encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838678,8.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}' + string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1578321218,8.0]],"type":"gauge","host":"chef.handler.datadog.test-resources","device":null}]}' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -176,31 +192,35 @@ http_interactions: code: 202 message: Accepted headers: + Date: + - Mon, 06 Jan 2020 14:33:31 GMT Content-Type: - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff Content-Length: - '16' Connection: - keep-alive + Dd-Pool: + - propjoe + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:38 GMT + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:38 GMT - request: method: post uri: https://app.datadoghq.com/api/v1/events?api_key= body: encoding: UTF-8 - string: '{"msg_text":"\n$$$\n- [whiskers] (dynamically defined)\n\n$$$\n","date_happened":1453838678,"msg_title":"Chef + string: '{"msg_text":"\n$$$\n- [whiskers] (dynamically defined)\n\n$$$\n","date_happened":1578321218,"msg_title":"Chef completed in 8 seconds on chef.handler.datadog.test-resources ","priority":"low","parent":null,"tags":["env:resources"],"aggregation_key":"chef.handler.datadog.test-resources","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef completed in 8 seconds on chef.handler.datadog.test-resources ","text":"\n$$$\n- [whiskers] (dynamically defined)\n\n$$$\n","host":"chef.handler.datadog.test-resources","device":null}' @@ -218,30 +238,34 @@ http_interactions: code: 202 message: Accepted headers: - Content-Type: - - text/plain; charset=utf-8 Date: - - Tue, 26 Jan 2016 20:04:30 GMT + - Mon, 06 Jan 2020 14:33:32 GMT + Content-Type: + - application/json + Content-Length: + - '364' + Connection: + - keep-alive Dd-Pool: - propjoe - Strict-Transport-Security: - - max-age=15724800; + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report + X-Frame-Options: + - SAMEORIGIN X-Content-Type-Options: - nosniff - Content-Length: - - '362' - Connection: - - keep-alive + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236762571463232,"title":"Chef completed + string: '{"status":"ok","event":{"id":5269024709047942069,"title":"Chef completed in 8 seconds on chef.handler.datadog.test-resources ","text":"\n$$$\n- [whiskers] - (dynamically defined)\n\n$$$\n","date_happened":1453838678,"handle":null,"priority":"low","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=381236762571463232"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:38 GMT + (dynamically defined)\n\n$$$\n","date_happened":1578321218,"handle":null,"priority":"low","related_event_id":null,"tags":["env:resources"],"url":"https://app.datadoghq.com/event/event?id=5269024709047942069"}}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:38 GMT - request: method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?api_key=&application_key=&source=chef + uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test-resources?source=chef body: encoding: UTF-8 string: '{"tags":["env:resources"]}' @@ -252,6 +276,10 @@ http_interactions: - "*/*" User-Agent: - Ruby + Dd-Api-Key: + - "" + Dd-Application-Key: + - "" Content-Type: - application/json response: @@ -259,31 +287,33 @@ http_interactions: code: 201 message: Created headers: - Cache-Control: - - no-cache + Date: + - Mon, 06 Jan 2020 14:33:32 GMT Content-Type: - application/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - dogweb_sameorig + Content-Length: + - '71' + Connection: + - keep-alive Pragma: - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff + Cache-Control: + - no-cache X-Dd-Debug: - - QKcGho/VVHvOvAFq4WeaqBhqhL8eYL3K9CW+TToIP+o= + - ty7T8eIeXOfZhM7KDN5nGo8JS7ZSIWAqBNFeZshTg3LLDJJa7mPU5wqGt0nOPCpy + Dd-Pool: + - dogweb + Content-Security-Policy: + - frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report X-Frame-Options: - SAMEORIGIN - Content-Length: - - '74' - Connection: - - keep-alive + X-Content-Type-Options: + - nosniff + Strict-Transport-Security: + - max-age=15724800; body: encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test-resources", "tags": ["env:resources"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:38 GMT -recorded_with: VCR 3.0.1 + string: '{"host":"chef.handler.datadog.test-resources","tags":["env:resources"]}' + http_version: + recorded_at: Mon, 06 Jan 2020 14:33:38 GMT +recorded_with: VCR 5.0.0 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_events/posts_an_event.yml b/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_events/posts_an_event.yml deleted file mode 100644 index 0ab01ca..0000000 --- a/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_events/posts_an_event.yml +++ /dev/null @@ -1,575 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838674,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838674,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838674,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/events?api_key= - body: - encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838674,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/plain; charset=utf-8 - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '350' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236744299842747,"title":"Chef completed - in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838674,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236744299842747"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:testing"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 201 - message: Created - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - dogweb_sameorig - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - X-Dd-Debug: - - 1TZ9yjqyTQEuQgFvlhDrXBTp0x7coU279EZsIv2sDHg= - X-Frame-Options: - - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838674,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838674,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838674,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/events?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838674,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/plain; charset=utf-8 - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '350' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236744299842747,"title":"Chef completed - in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838674,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.example.com/event/event?id=381236744299842747"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: put - uri: https://app.example.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=api_key_example&application_key=application_key_example&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:testing"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 201 - message: Created - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - dogweb_sameorig - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - X-Dd-Debug: - - 1TZ9yjqyTQEuQgFvlhDrXBTp0x7coU279EZsIv2sDHg= - X-Frame-Options: - - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -recorded_with: VCR 3.0.1 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_metrics/reports_metrics.yml b/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_metrics/reports_metrics.yml deleted file mode 100644 index efeff8f..0000000 --- a/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/emits_metrics/reports_metrics.yml +++ /dev/null @@ -1,575 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838674,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838674,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838674,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/events?api_key= - body: - encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838674,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/plain; charset=utf-8 - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '350' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236751983296521,"title":"Chef completed - in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838674,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236751983296521"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:testing"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 201 - message: Created - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - dogweb_sameorig - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - X-Dd-Debug: - - 1TZ9yjqyTQEuQgFvlhDrXBTp0x7coU279EZsIv2sDHg= - X-Frame-Options: - - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838674,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838674,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:29 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838674,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838674,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: post - uri: https://app.example.com/api/v1/events?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838674,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/plain; charset=utf-8 - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '350' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236751983296521,"title":"Chef completed - in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838674,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.example.com/event/event?id=381236751983296521"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -- request: - method: put - uri: https://app.example.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=api_key_example&application_key=application_key_example&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:testing"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 201 - message: Created - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Tue, 26 Jan 2016 20:04:30 GMT - Dd-Pool: - - dogweb_sameorig - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - X-Dd-Debug: - - 1TZ9yjqyTQEuQgFvlhDrXBTp0x7coU279EZsIv2sDHg= - X-Frame-Options: - - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:34 GMT -recorded_with: VCR 3.0.1 diff --git a/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/sets_tags/puts_the_tags_for_the_current_node.yml b/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/sets_tags/puts_the_tags_for_the_current_node.yml deleted file mode 100644 index 8f246b9..0000000 --- a/spec/support/cassettes/Chef_Handler_Datadog/when_reporting_to_multiple_endpoints/sets_tags/puts_the_tags_for_the_current_node.yml +++ /dev/null @@ -1,575 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838673,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838673,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838673,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838673,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/series?api_key= - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838673,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.datadoghq.com/api/v1/events?api_key= - body: - encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838673,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/plain; charset=utf-8 - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '350' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236727437637511,"title":"Chef completed - in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838673,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.datadoghq.com/event/event?id=381236727437637511"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: put - uri: https://app.datadoghq.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=&application_key=&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:testing"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 201 - message: Created - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - dogweb_sameorig - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - X-Dd-Debug: - - o+T6KJmtlm7/lHIbU4qEQWVkGtrRMvLvLMnhkr5jg08= - X-Frame-Options: - - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.success","points":[[1453838673,1.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.run.failure","points":[[1453838673,0.0]],"type":"counter","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.total","points":[[1453838673,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.updated","points":[[1453838673,0.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.example.com/api/v1/series?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"series":[{"metric":"chef.resources.elapsed_time","points":[[1453838673,5.0]],"type":"gauge","host":"chef.handler.datadog.test","device":null}]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '16' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status": "ok"}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: post - uri: https://app.example.com/api/v1/events?api_key=api_key_example - body: - encoding: UTF-8 - string: '{"msg_text":"Chef updated 0 resources out of 0 resources total.","date_happened":1453838673,"msg_title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","priority":"low","parent":null,"tags":["env:testing"],"aggregation_key":"chef.handler.datadog.test","alert_type":"success","event_type":"config_management.run","source_type_name":"chef","title":"Chef - completed in 5 seconds on chef.handler.datadog.test ","text":"Chef updated - 0 resources out of 0 resources total.","host":"chef.handler.datadog.test","device":null}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 202 - message: Accepted - headers: - Content-Type: - - text/plain; charset=utf-8 - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - propjoe - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - Content-Length: - - '350' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"status":"ok","event":{"id":381236727437637511,"title":"Chef completed - in 5 seconds on chef.handler.datadog.test ","text":"Chef updated 0 resources - out of 0 resources total.","date_happened":1453838673,"handle":null,"priority":"low","related_event_id":null,"tags":["env:testing"],"url":"https://app.example.com/event/event?id=381236727437637511"}}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -- request: - method: put - uri: https://app.example.com/api/v1/tags/hosts/chef.handler.datadog.test?api_key=api_key_example&application_key=application_key_example&source=chef - body: - encoding: UTF-8 - string: '{"tags":["env:testing"]}' - headers: - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - Content-Type: - - application/json - response: - status: - code: 201 - message: Created - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Date: - - Tue, 26 Jan 2016 20:04:28 GMT - Dd-Pool: - - dogweb_sameorig - Pragma: - - no-cache - Strict-Transport-Security: - - max-age=15724800; - X-Content-Type-Options: - - nosniff - X-Dd-Debug: - - o+T6KJmtlm7/lHIbU4qEQWVkGtrRMvLvLMnhkr5jg08= - X-Frame-Options: - - SAMEORIGIN - Content-Length: - - '62' - Connection: - - keep-alive - body: - encoding: UTF-8 - string: '{"host": "chef.handler.datadog.test", "tags": ["env:testing"]}' - http_version: - recorded_at: Tue, 26 Jan 2016 20:04:33 GMT -recorded_with: VCR 3.0.1