conf

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

package conf provides configuration for the local-collect command

Index

Constants

View Source
const (
	// KeyVerbose provides output verbosity when the local-collect command is running,
	// this does not affect the log files which are always debug
	KeyVerbose                     = "verbose"
	KeyDisableRESTAPI              = "disable-rest-api"
	KeyCollectAccelerationLog      = "collect-acceleration-log"
	KeyCollectAccessLog            = "collect-access-log"
	KeyCollectAuditLog             = "collect-audit-log"
	KeyCollectJVMFlags             = "collect-jvm-flags"
	KeyDremioLogDir                = "dremio-log-dir"
	KeyNumberThreads               = "number-threads"
	KeyDremioPid                   = "dremio-pid"
	KeyDremioPidDetection          = "dremio-pid-detection"
	KeyDremioUsername              = "dremio-username"
	KeyDremioPatToken              = "dremio-pat-token" // #nosec G101
	KeyDremioConfDir               = "dremio-conf-dir"
	KeyDremioRocksdbDir            = "dremio-rocksdb-dir"
	KeyCollectDremioConfiguration  = "collect-dremio-configuration"
	KeyCaptureHeapDump             = "capture-heap-dump"
	KeyNumberJobProfiles           = "number-job-profiles"
	KeyDremioEndpoint              = "dremio-endpoint"
	KeyTarballOutDir               = "tarball-out-dir"
	KeyTmpOutputDir                = "tmp-output-dir"
	KeyCollectOSConfig             = "collect-os-config"
	KeyCollectDiskUsage            = "collect-disk-usage"
	KeyDremioLogsNumDays           = "dremio-logs-num-days"
	KeyDremioQueriesJSONNumDays    = "dremio-queries-json-num-days"
	KeyDremioGCFilePattern         = "dremio-gc-file-pattern"
	KeyCollectQueriesJSON          = "collect-queries-json"
	KeyCollectServerLogs           = "collect-server-logs"
	KeyCollectMetaRefreshLog       = "collect-meta-refresh-log"
	KeyCollectReflectionLog        = "collect-reflection-log"
	KeyCollectGCLogs               = "collect-gc-logs"
	KeyCollectJFR                  = "collect-jfr"
	KeyCollectJStack               = "collect-jstack"
	KeyCollectTtop                 = "collect-ttop"
	KeyCollectSystemTablesExport   = "collect-system-tables-export"
	KeySystemTablesRowLimit        = "system-tables-row-limit"
	KeyCollectWLM                  = "collect-wlm"
	KeyCollectKVStoreReport        = "collect-kvstore-report"
	KeyDremioJStackTimeSeconds     = "dremio-jstack-time-seconds"
	KeyDremioJFRTimeSeconds        = "dremio-jfr-time-seconds"
	KeyDremioJStackFreqSeconds     = "dremio-jstack-freq-seconds"
	KeyDremioTtopFreqSeconds       = "dremio-ttop-freq-seconds"
	KeyDremioTtopTimeSeconds       = "dremio-ttop-time-seconds"
	KeyDremioGCLogsDir             = "dremio-gclogs-dir"
	KeyNodeName                    = "node-name"
	KeyAcceptCollectionConsent     = "accept-collection-consent"
	KeyIsDremioCloud               = "is-dremio-cloud"
	KeyDremioCloudProjectID        = "dremio-cloud-project-id"
	KeyAllowInsecureSSL            = "allow-insecure-ssl"
	KeyJobProfilesNumHighQueryCost = "job-profiles-num-high-query-cost"
	KeyJobProfilesNumSlowExec      = "job-profiles-num-slow-exec"
	KeyJobProfilesNumRecentErrors  = "job-profiles-num-recent-errors"
	KeyJobProfilesNumSlowPlanning  = "job-profiles-num-slow-planning"
	KeyRestHTTPTimeout             = "rest-http-timeout"
	KeyDisableFreeSpaceCheck       = "disable-free-space-check"
)

Variables

This section is empty.

Functions

func CalculateJobProfileSettingsWithViperConfig

func CalculateJobProfileSettingsWithViperConfig(c *CollectConf) (numberJobProfilesToCollect, jobProfilesNumHighQueryCost, jobProfilesNumSlowExec, jobProfilesNumRecentErrors, jobProfilesNumSlowPlanning int)

CalculateJobProfileSettingsWithViperConfig sets the job profile according to the number of job profiles and any overrides specified in the category values. This is a bit complicated so read the tests to make sense of all the behavior

func DetectRocksDB added in v0.8.0

func DetectRocksDB(dremioHome string, dremioConfDir string) string

func GetBool added in v0.7.0

func GetBool(confData map[string]interface{}, key string) bool

func GetInt added in v0.7.0

func GetInt(confData map[string]interface{}, key string) int

func GetString added in v0.7.0

func GetString(confData map[string]interface{}, key string) string

func LogConfData added in v0.8.0

func LogConfData(confData map[string]string)

func ParseConfig

func ParseConfig(ddcYamlLoc string, overrides map[string]string) (map[string]interface{}, error)

func SanitiseURL added in v0.7.3

func SanitiseURL(url string) string

We just strip suffix at the moment. More checks can be added here

func SetViperDefaults

func SetViperDefaults(confData map[string]interface{}, hostName string, defaultCaptureSeconds int)

SetViperDefaults wires up default values for viper when the ddc.yaml or the cli flags do not set the value

func SystemTableList added in v0.7.0

func SystemTableList() []string

func ValidateAPICredentials added in v0.9.1

func ValidateAPICredentials(c *CollectConf) error

Types

type CollectConf

type CollectConf struct {
	// contains filtered or unexported fields
}

func ReadConf

func ReadConf(overrides map[string]string, ddcYamlLoc string) (*CollectConf, error)

func (*CollectConf) AcceptCollectionConsent

func (c *CollectConf) AcceptCollectionConsent() bool

func (*CollectConf) CaptureHeapDump

func (c *CollectConf) CaptureHeapDump() bool

func (*CollectConf) ClusterStatsOutDir added in v0.8.0

func (c *CollectConf) ClusterStatsOutDir() string

func (*CollectConf) CollectAccelerationLogs

func (c *CollectConf) CollectAccelerationLogs() bool

func (*CollectConf) CollectAccessLogs

func (c *CollectConf) CollectAccessLogs() bool

func (*CollectConf) CollectAuditLogs added in v0.6.0

func (c *CollectConf) CollectAuditLogs() bool

func (*CollectConf) CollectDiskUsage

func (c *CollectConf) CollectDiskUsage() bool

func (*CollectConf) CollectDremioConfiguration

func (c *CollectConf) CollectDremioConfiguration() bool

func (*CollectConf) CollectGCLogs

func (c *CollectConf) CollectGCLogs() bool

func (*CollectConf) CollectJFR

func (c *CollectConf) CollectJFR() bool

func (*CollectConf) CollectJStack

func (c *CollectConf) CollectJStack() bool

func (*CollectConf) CollectJVMFlags added in v0.6.0

func (c *CollectConf) CollectJVMFlags() bool

func (*CollectConf) CollectKVStoreReport

func (c *CollectConf) CollectKVStoreReport() bool

func (*CollectConf) CollectMetaRefreshLogs

func (c *CollectConf) CollectMetaRefreshLogs() bool

func (*CollectConf) CollectOSConfig added in v0.6.0

func (c *CollectConf) CollectOSConfig() bool

func (*CollectConf) CollectQueriesJSON

func (c *CollectConf) CollectQueriesJSON() bool

func (*CollectConf) CollectReflectionLogs

func (c *CollectConf) CollectReflectionLogs() bool

func (*CollectConf) CollectServerLogs

func (c *CollectConf) CollectServerLogs() bool

func (*CollectConf) CollectSystemTablesExport

func (c *CollectConf) CollectSystemTablesExport() bool

func (*CollectConf) CollectTtop added in v0.5.0

func (c *CollectConf) CollectTtop() bool

func (*CollectConf) CollectWLM

func (c *CollectConf) CollectWLM() bool

func (*CollectConf) ConfigurationOutDir

func (c *CollectConf) ConfigurationOutDir() string

per node out directories

func (CollectConf) DisableFreeSpaceCheck added in v1.0.0

func (c CollectConf) DisableFreeSpaceCheck() bool

func (CollectConf) DisableRESTAPI added in v0.6.0

func (c CollectConf) DisableRESTAPI() bool

func (*CollectConf) DremioCloudAppEndpoint added in v0.5.0

func (c *CollectConf) DremioCloudAppEndpoint() string

func (*CollectConf) DremioCloudProjectID added in v0.5.0

func (c *CollectConf) DremioCloudProjectID() string

func (*CollectConf) DremioConfDir

func (c *CollectConf) DremioConfDir() string

func (*CollectConf) DremioEndpoint

func (c *CollectConf) DremioEndpoint() string

func (*CollectConf) DremioGCFilePattern

func (c *CollectConf) DremioGCFilePattern() string

func (*CollectConf) DremioJFRTimeSeconds

func (c *CollectConf) DremioJFRTimeSeconds() int

func (*CollectConf) DremioJStackFreqSeconds

func (c *CollectConf) DremioJStackFreqSeconds() int

func (*CollectConf) DremioJStackTimeSeconds

func (c *CollectConf) DremioJStackTimeSeconds() int

func (*CollectConf) DremioLogDir

func (c *CollectConf) DremioLogDir() string

func (*CollectConf) DremioLogsNumDays

func (c *CollectConf) DremioLogsNumDays() int

func (*CollectConf) DremioPATToken

func (c *CollectConf) DremioPATToken() string

func (*CollectConf) DremioPID

func (c *CollectConf) DremioPID() int

func (*CollectConf) DremioPIDDetection added in v0.6.0

func (c *CollectConf) DremioPIDDetection() bool

func (*CollectConf) DremioQueriesJSONNumDays

func (c *CollectConf) DremioQueriesJSONNumDays() int

func (*CollectConf) DremioRocksDBDir added in v0.6.0

func (c *CollectConf) DremioRocksDBDir() string

func (*CollectConf) DremioTtopFreqSeconds added in v0.5.0

func (c *CollectConf) DremioTtopFreqSeconds() int

func (*CollectConf) DremioTtopTimeSeconds added in v0.5.0

func (c *CollectConf) DremioTtopTimeSeconds() int

func (*CollectConf) GcLogsDir

func (c *CollectConf) GcLogsDir() string

func (*CollectConf) HeapDumpsOutDir

func (c *CollectConf) HeapDumpsOutDir() string

func (*CollectConf) IsDremioCloud added in v0.5.0

func (c *CollectConf) IsDremioCloud() bool

func (*CollectConf) JFROutDir

func (c *CollectConf) JFROutDir() string

works on all nodes but includes node name in file name

func (*CollectConf) JobProfilesNumHighQueryCost

func (c *CollectConf) JobProfilesNumHighQueryCost() int

func (*CollectConf) JobProfilesNumRecentErrors

func (c *CollectConf) JobProfilesNumRecentErrors() int

func (*CollectConf) JobProfilesNumSlowExec

func (c *CollectConf) JobProfilesNumSlowExec() int

func (*CollectConf) JobProfilesNumSlowPlanning

func (c *CollectConf) JobProfilesNumSlowPlanning() int

func (*CollectConf) JobProfilesOutDir

func (c *CollectConf) JobProfilesOutDir() string

func (*CollectConf) KVstoreOutDir

func (c *CollectConf) KVstoreOutDir() string

func (*CollectConf) KubernetesOutDir

func (c *CollectConf) KubernetesOutDir() string

func (*CollectConf) LogsOutDir

func (c *CollectConf) LogsOutDir() string

func (*CollectConf) NodeInfoOutDir

func (c *CollectConf) NodeInfoOutDir() string

func (*CollectConf) NodeName

func (c *CollectConf) NodeName() string

func (*CollectConf) NumberJobProfilesToCollect

func (c *CollectConf) NumberJobProfilesToCollect() int

func (*CollectConf) NumberThreads

func (c *CollectConf) NumberThreads() int

func (*CollectConf) OutputDir

func (c *CollectConf) OutputDir() string

func (*CollectConf) QueriesOutDir

func (c *CollectConf) QueriesOutDir() string

func (*CollectConf) RestHTTPTimeout added in v0.4.0

func (c *CollectConf) RestHTTPTimeout() int

func (*CollectConf) SystemTablesOutDir

func (c *CollectConf) SystemTablesOutDir() string

func (*CollectConf) SystemTablesRowLimit added in v0.5.0

func (c *CollectConf) SystemTablesRowLimit() int

func (*CollectConf) Systemtables

func (c *CollectConf) Systemtables() []string

func (*CollectConf) SystemtablesDremioCloud added in v0.5.0

func (c *CollectConf) SystemtablesDremioCloud() []string

func (*CollectConf) TarballOutDir added in v0.6.0

func (c *CollectConf) TarballOutDir() string

func (*CollectConf) ThreadDumpsOutDir

func (c *CollectConf) ThreadDumpsOutDir() string

func (*CollectConf) TtopOutDir added in v0.5.0

func (c *CollectConf) TtopOutDir() string

func (*CollectConf) WLMOutDir

func (c *CollectConf) WLMOutDir() string

type DremioConfig added in v0.8.0

type DremioConfig struct {
	Home    string
	LogDir  string
	ConfDir string
}

DremioConfig represents the configuration details for Dremio.

func GetConfiguredDremioValuesFromPID added in v0.8.0

func GetConfiguredDremioValuesFromPID(dremioPID int) (DremioConfig, error)

func ParsePSForConfig added in v0.8.0

func ParsePSForConfig(ps string) (DremioConfig, error)

Directories

Path Synopsis
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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL