From db234f5a52e350b74be5a7bce20e59fe5619c1a2 Mon Sep 17 00:00:00 2001 From: Chris Mark Date: Wed, 13 Nov 2019 17:11:42 +0200 Subject: [PATCH] Add light modules of oss as source in docs collector (#14483) --- metricbeat/scripts/msetlists/cmd/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/metricbeat/scripts/msetlists/cmd/main.go b/metricbeat/scripts/msetlists/cmd/main.go index 91bc2a3dd71a..d964f79b0d2b 100644 --- a/metricbeat/scripts/msetlists/cmd/main.go +++ b/metricbeat/scripts/msetlists/cmd/main.go @@ -22,11 +22,20 @@ import ( "fmt" "os" + "github.com/elastic/beats/libbeat/paths" _ "github.com/elastic/beats/metricbeat/include" + "github.com/elastic/beats/metricbeat/mb" "github.com/elastic/beats/metricbeat/scripts/msetlists" ) func main() { + // Disable permission checks so it reads light modules in any case + os.Setenv("BEAT_STRICT_PERMS", "false") + + path := paths.Resolve(paths.Home, "../metricbeat/module") + lm := mb.NewLightModulesSource(path) + mb.Registry.SetSecondarySource(lm) + msList := msetlists.DefaultMetricsets() raw, err := json.MarshalIndent(msList, "", " ")