You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long: "This command starts the Elastic Agent in otel mode.",
31
+
RunE: func(cmd*cobra.Command, _ []string) error {
32
+
cfgFiles, err:=getConfigFiles(cmd)
33
+
iferr!=nil {
34
+
returnerr
35
+
}
36
+
returnrunCollector(cmd.Context(), cfgFiles)
37
+
},
38
+
PreRun: func(c*cobra.Command, args []string) {
39
+
// hide inherited flags not to bloat help with flags not related to otel
40
+
hideInheritedFlags(c)
41
+
},
42
+
SilenceUsage: true,
43
+
SilenceErrors: true,
44
+
}
45
+
46
+
cmd.SetHelpFunc(func(c*cobra.Command, s []string) {
47
+
hideInheritedFlags(c)
48
+
c.Parent().HelpFunc()(c, s)
49
+
})
50
+
51
+
cmd.Flags().StringArray(configFlagName, []string{}, "Locations to the config file(s), note that only a"+
52
+
" single location can be set per flag entry e.g. `--config=file:/path/to/first --config=file:path/to/second`.")
53
+
54
+
cmd.Flags().StringArray(setFlagName, []string{}, "Set arbitrary component config property. The component has to be defined in the config file and the flag"+
55
+
" has a higher precedence. Array config properties are overridden and maps are joined. Example --set=processors.batch.timeout=2s")
0 commit comments