Documentation ¶
Overview ¶
cmd package contains all the command line flag and initialization logic for commands
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LocalCollectCmd = &cobra.Command{ Use: "local-collect", Short: "retrieves all the dremio logs and diagnostics for the local node and saves the results in a compatible format for Dremio support", Long: `Retrieves all the dremio logs and diagnostics for the local node and saves the results in a compatible format for Dremio support. This subcommand needs to be run with enough permissions to read the /proc filesystem, the dremio logs and configuration files`, Run: func(cobraCmd *cobra.Command, args []string) { overrides := make(map[string]string) cobraCmd.Flags().Visit(func(flag *pflag.Flag) { if flag.Name == conf.KeyDremioPatToken { if flag.Value.String() == "" { pat, err := masking.PromptForPAT() if err != nil { fmt.Printf("unable to get PAT due to: %v\n", err) os.Exit(1) } overrides[flag.Name] = pat } else { overrides[flag.Name] = flag.Value.String() } simplelog.Debugf("overriding yaml with cli flag %v and value 'REDACTED'", flag.Name) } else { simplelog.Debugf("overriding yaml with cli flag %v and value %q", flag.Name, flag.Value.String()) overrides[flag.Name] = flag.Value.String() } }) if patStdIn { var inputReader io.Reader = cobraCmd.InOrStdin() b, err := io.ReadAll(inputReader) if err != nil { fmt.Printf("\nCRITICAL ERROR: %v\n", err) os.Exit(1) } pat := strings.TrimSpace(string(b[:])) if pat != "" { overrides[conf.KeyDremioPatToken] = pat } } msg, err := Execute(args, overrides) if err != nil { fmt.Printf("\nCRITICAL ERROR: %v\n", err) os.Exit(1) } fmt.Println(msg) }, }
Functions ¶
func RunTtopCollect ¶
func RunTtopCollect(c *conf.CollectConf, hook shutdown.CancelHook) error
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
apicollect provides all the methods that collect via the API, this is a substantial part of the activities of DDC so it gets it's own package
|
apicollect provides all the methods that collect via the API, this is a substantial part of the activities of DDC so it gets it's own package |
package conf provides configuration for the local-collect command
|
package conf provides configuration for the local-collect command |
autodetect
package autodetect looks at the system configuration and file names and tries to guess at the correct configuration
|
package autodetect looks at the system configuration and file names and tries to guess at the correct configuration |
ddcio include helper code for io operations common to ddc
|
ddcio include helper code for io operations common to ddc |
package jvmcollect handles parsing of the jvm information
|
package jvmcollect handles parsing of the jvm information |
package logcollect contains the logic for log collection in the local-collect sub command
|
package logcollect contains the logic for log collection in the local-collect sub command |
package nodeinfocollect has all the methods for collecting the information for nodeinfo
|
package nodeinfocollect has all the methods for collecting the information for nodeinfo |
queriesjson package contains the logic for collecting queries.json information
|
queriesjson package contains the logic for collecting queries.json information |
threading package provides support for simple concurrency and threading
|
threading package provides support for simple concurrency and threading |
Click to show internal directories.
Click to hide internal directories.