Ability to get real retry state of buffered output #1387

Merged
merged 3 commits into from Dec 25, 2016

Projects

None yet

2 participants

@CSharpRU
Contributor

Related to #1379

Will have JSON like this:

{
	// other monitor_agent keys
	"retry": {
		"start":"2016-12-23 01:36:14 +0700",
		"steps":1,
		"next_time":"2016-12-23 01:37:16 +0700"
	}
}
@CSharpRU CSharpRU Ability to get real retry state of buffered output
e9d23c3
@@ -35,6 +35,7 @@ class MonitorAgentInput < Input
config_param :tag, :string, default: nil
config_param :emit_interval, :time, default: 60
config_param :include_config, :bool, default: true
+ config_param :include_retry, :bool, default: true
@CSharpRU
CSharpRU Dec 22, 2016 Contributor

It might be not necessary

@CSharpRU CSharpRU Whoops, forgot to fix the tests
8cf8597
test/plugin/test_in_monitor_agent.rb
@@ -302,7 +302,8 @@ def get(uri, header = {})
"plugin_category" => "output",
"plugin_id" => "null",
"retry_count" => 0,
- "type" => "null"
+ "type" => "null",
+ "retry" => {}
@CSharpRU
CSharpRU Dec 23, 2016 Contributor

Need to add test cases for failed flush

@repeatedly
Member

Feature looks good.
But yes, need output failure case.

@CSharpRU
Contributor

Okay, I'll add it.

@CSharpRU CSharpRU /api/plugins.json retry object should be filled if flush was failed
Added with_retry /api/plugins.json tests
f65b24f
@CSharpRU
Contributor

Test case has been added.

@repeatedly repeatedly merged commit 948e26b into fluent:master Dec 25, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@repeatedly
Member

Good. Thank you!

@CSharpRU CSharpRU deleted the CSharpRU:get-real-retry-info-from-buffered-output branch Dec 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment