Skip to content

Commit

Permalink
Merge branch 'master' into mobile-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvz authored Jun 16, 2021
2 parents d0d5b06 + 1c09eed commit 8a24fa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ var libbeatConfigOverrides = func() []cfgfile.ConditionalOverride {
return common.MustNewConfigFrom(map[string]interface{}{
"output": map[string]interface{}{
"elasticsearch": map[string]interface{}{
"worker": cloudMatrix[cap].worker,
"bulk_max_size": cloudMatrix[cap].bulkMaxSize,
"compression_level": 5, //default to medium compression on cloud
"worker": cloudMatrix[cap].worker,
"bulk_max_size": cloudMatrix[cap].bulkMaxSize,
},
},
"queue": map[string]interface{}{
Expand Down
4 changes: 4 additions & 0 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ func TestCloudEnv(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, int64(5), workers)

compression, err := cfg.Int("output.elasticsearch.compression_level", -1)
require.NoError(t, err)
assert.Equal(t, int64(5), compression)

// bad cloud environment value
os.Setenv(cloudEnv, "123")
settings = DefaultSettings()
Expand Down

0 comments on commit 8a24fa5

Please sign in to comment.