From 5153fba835acfbed6a7fffedaa0cd2670cbf696f Mon Sep 17 00:00:00 2001 From: Mariana Date: Thu, 20 Feb 2020 20:31:12 +0100 Subject: [PATCH 1/6] Add vars --- CHANGELOG.next.asciidoc | 1 + x-pack/filebeat/module/azure/activitylogs/manifest.yml | 4 ++++ x-pack/filebeat/module/azure/auditlogs/manifest.yml | 3 +++ x-pack/filebeat/module/azure/signinlogs/manifest.yml | 3 +++ 4 files changed, 11 insertions(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 14cf2c66585..1fe11b90c0a 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -72,6 +72,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Prevent Elasticsearch from spewing log warnings about redundant wildcards when setting up ingest pipelines for the `elasticsearch` module. {issue}15840[15840] {pull}15900[15900] - Fix mapping error for cloudtrail additionalEventData field {pull}16088[16088] - Fix a connection error in httpjson input. {pull}16123[16123] +- Adding the var definitions in azure manifest files, fix for errors when executing command setup. {issue}16270[16270] *Heartbeat* diff --git a/x-pack/filebeat/module/azure/activitylogs/manifest.yml b/x-pack/filebeat/module/azure/activitylogs/manifest.yml index a051a0138ba..e3cbaab2811 100644 --- a/x-pack/filebeat/module/azure/activitylogs/manifest.yml +++ b/x-pack/filebeat/module/azure/activitylogs/manifest.yml @@ -7,6 +7,10 @@ var: default: "insights-operational-logs" - name: consumer_group default: "$Default" + - name: connection_string + - name: storage_account + - name: storage_account_key + ingest_pipeline: - ingest/pipeline.json diff --git a/x-pack/filebeat/module/azure/auditlogs/manifest.yml b/x-pack/filebeat/module/azure/auditlogs/manifest.yml index d1379f19f3e..d6cd469718b 100644 --- a/x-pack/filebeat/module/azure/auditlogs/manifest.yml +++ b/x-pack/filebeat/module/azure/auditlogs/manifest.yml @@ -7,6 +7,9 @@ var: default: "insights-logs-auditlogs" - name: consumer_group default: "$Default" + - name: connection_string + - name: storage_account + - name: storage_account_key ingest_pipeline: - ingest/pipeline.json diff --git a/x-pack/filebeat/module/azure/signinlogs/manifest.yml b/x-pack/filebeat/module/azure/signinlogs/manifest.yml index 75183ed9290..f68109af4a1 100644 --- a/x-pack/filebeat/module/azure/signinlogs/manifest.yml +++ b/x-pack/filebeat/module/azure/signinlogs/manifest.yml @@ -7,6 +7,9 @@ var: default: "insights-logs-signinlogs" - name: consumer_group default: "$Default" + - name: connection_string + - name: storage_account + - name: storage_account_key ingest_pipeline: - ingest/pipeline.json From b2e1b8956ad52a9feb577f9026c50f53f727ab39 Mon Sep 17 00:00:00 2001 From: Mariana Date: Thu, 20 Feb 2020 20:35:10 +0100 Subject: [PATCH 2/6] changelog --- CHANGELOG.next.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 1fe11b90c0a..c9f307edab9 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -72,7 +72,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Prevent Elasticsearch from spewing log warnings about redundant wildcards when setting up ingest pipelines for the `elasticsearch` module. {issue}15840[15840] {pull}15900[15900] - Fix mapping error for cloudtrail additionalEventData field {pull}16088[16088] - Fix a connection error in httpjson input. {pull}16123[16123] -- Adding the var definitions in azure manifest files, fix for errors when executing command setup. {issue}16270[16270] +- Adding the var definitions in azure manifest files, fix for errors when executing command setup. {issue}16270[16270] {pull}16468[16468] *Heartbeat* From 054b5a0ebf1284874e4c20f2e4dd87f73a3b0078 Mon Sep 17 00:00:00 2001 From: Mariana Date: Tue, 25 Feb 2020 09:54:52 +0100 Subject: [PATCH 3/6] temp --- filebeat/fileset/fileset_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/filebeat/fileset/fileset_test.go b/filebeat/fileset/fileset_test.go index e66eafe2b97..09f40b5f1c5 100644 --- a/filebeat/fileset/fileset_test.go +++ b/filebeat/fileset/fileset_test.go @@ -21,6 +21,7 @@ package fileset import ( "fmt" + "os" "path/filepath" "runtime" "testing" @@ -167,6 +168,30 @@ func TestResolveVariable(t *testing.T) { } } +func TestGetInputConfig(t *testing.T) { + modulesPath, err := filepath.Abs("../module") + assert.NoError(t, err) + f, err := os.Open(modulesPath) + if err != nil { + panic(err) + } + list, err := f.Readdir(-1) + f.Close() + for _, file := range list { + fs, err := New(modulesPath, "", &ModuleConfig{Module: file.Name()}, &FilesetConfig{}) + if err!= nil { + continue + } + cfg, err := fs.getInputConfig() + assert.NoError(t, err) + assert.True(t, cfg.HasField("paths")) + } + + if err != nil { + panic(err) + } +} + func TestGetInputConfigNginx(t *testing.T) { fs := getModuleForTesting(t, "nginx", "access") assert.NoError(t, fs.Read("5.2.0")) From 27d9e8a758e6b88cbf76adb2f9dbaa0e743e2b79 Mon Sep 17 00:00:00 2001 From: Mariana Date: Tue, 25 Feb 2020 13:32:44 +0100 Subject: [PATCH 4/6] line --- x-pack/filebeat/module/azure/activitylogs/manifest.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/filebeat/module/azure/activitylogs/manifest.yml b/x-pack/filebeat/module/azure/activitylogs/manifest.yml index e3cbaab2811..7375b6e42a4 100644 --- a/x-pack/filebeat/module/azure/activitylogs/manifest.yml +++ b/x-pack/filebeat/module/azure/activitylogs/manifest.yml @@ -11,7 +11,6 @@ var: - name: storage_account - name: storage_account_key - ingest_pipeline: - ingest/pipeline.json - ../azure-shared-pipeline.json From 052f54fd6f2577e901dcb8f5fc00402ef4629b47 Mon Sep 17 00:00:00 2001 From: Mariana Date: Tue, 25 Feb 2020 13:50:24 +0100 Subject: [PATCH 5/6] update --- filebeat/fileset/fileset_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filebeat/fileset/fileset_test.go b/filebeat/fileset/fileset_test.go index 09f40b5f1c5..59d43af2061 100644 --- a/filebeat/fileset/fileset_test.go +++ b/filebeat/fileset/fileset_test.go @@ -179,7 +179,7 @@ func TestGetInputConfig(t *testing.T) { f.Close() for _, file := range list { fs, err := New(modulesPath, "", &ModuleConfig{Module: file.Name()}, &FilesetConfig{}) - if err!= nil { + if err != nil { continue } cfg, err := fs.getInputConfig() From 79e3ce255ca3bdfca3cf0eb14674e5357fd9860e Mon Sep 17 00:00:00 2001 From: Mariana Date: Tue, 25 Feb 2020 13:52:57 +0100 Subject: [PATCH 6/6] take test out --- filebeat/fileset/fileset_test.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/filebeat/fileset/fileset_test.go b/filebeat/fileset/fileset_test.go index 59d43af2061..e66eafe2b97 100644 --- a/filebeat/fileset/fileset_test.go +++ b/filebeat/fileset/fileset_test.go @@ -21,7 +21,6 @@ package fileset import ( "fmt" - "os" "path/filepath" "runtime" "testing" @@ -168,30 +167,6 @@ func TestResolveVariable(t *testing.T) { } } -func TestGetInputConfig(t *testing.T) { - modulesPath, err := filepath.Abs("../module") - assert.NoError(t, err) - f, err := os.Open(modulesPath) - if err != nil { - panic(err) - } - list, err := f.Readdir(-1) - f.Close() - for _, file := range list { - fs, err := New(modulesPath, "", &ModuleConfig{Module: file.Name()}, &FilesetConfig{}) - if err != nil { - continue - } - cfg, err := fs.getInputConfig() - assert.NoError(t, err) - assert.True(t, cfg.HasField("paths")) - } - - if err != nil { - panic(err) - } -} - func TestGetInputConfigNginx(t *testing.T) { fs := getModuleForTesting(t, "nginx", "access") assert.NoError(t, fs.Read("5.2.0"))