Skip to content

Commit

Permalink
Add light modules of oss as source in docs collector (#14483)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrsMark authored Nov 13, 2019
1 parent 4802e20 commit db234f5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions metricbeat/scripts/msetlists/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "", " ")
Expand Down

0 comments on commit db234f5

Please sign in to comment.