collector

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0, MIT, MPL-2.0 Imports: 81 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectTypeSystem        = "system"
	CollectTypeMonitor       = "monitor"
	CollectTypeLog           = "log"
	CollectTypeConfig        = "config"
	CollectTypeSchema        = "db_vars"
	CollectTypePerf          = "perf"
	CollectTypeAudit         = "audit_log"
	CollectTypeDebug         = "debug"
	CollectTypeComponentMeta = "component_meta"
	CollectTypeBind          = "sql_bind"
	CollectTypePlanReplayer  = "plan_replayer"

	CollectModeTiUP   = "tiup-cluster"  // collect from a tiup-cluster deployed cluster
	CollectModeK8s    = "tidb-operator" // collect from a tidb-operator deployed cluster
	CollectModeManual = "manual"        // collect from a manually deployed cluster
	DiagModeCmd       = "cmd"           // run diag collect at command line mode
	DiagModeServer    = "server"        // run diag collect at server mode

	AttrKeyPromEndpoint = "prometheus-endpoint"
	AttrKeyClusterID    = "cluster-id"
	AttrKeyPDEndpoint   = "pd-endpoint"
	AttrKeyTiDBHost     = "tidb-host"
	AttrKeyTiDBPort     = "tidb-port"
	AttrKeyTiDBStatus   = "tidb-status-port"
	AttrKeyTLSCAFile    = "tls-ca-file"
	AttrKeyTLSCertFile  = "tls-cert-file"
	AttrKeyTLSKeyFile   = "tls-privkey-file"
)

types of data to collect

View Source
const (
	FileNameClusterJSON       = "cluster.json"     // general cluster info
	FileNameTiUPClusterMeta   = "meta.yaml"        // tiup-cluster topology
	FileNameK8sClusterCRD     = "tidbcluster.json" // tidb-operator crd
	FileNameK8sClusterMonitor = "tidbmonitor.json" // tidb-operator crd
	DirNameSchema             = "db_vars"
	DirNameBind               = "sql_bind"
)
View Source
const CollectLockName = ".collect.lock"
View Source
const ProfileDirectoryName = "profiles"

ProfileDirectoryName is the sub-path name storing profile config files

Variables

This section is empty.

Functions

func LoadMetrics

func LoadMetrics(ctx context.Context, dataDir string, opt *RebuildOptions) error

LoadMetrics reads the dumped metric JSON files and reload them to an influxdb instance.

func RunLocal

func RunLocal(dumpDir string, opt *RebuildOptions) error

Types

type AlertCollectOptions

type AlertCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

AlertCollectOptions is the options collecting alerts

func (*AlertCollectOptions) Collect

func (c *AlertCollectOptions) Collect(m *Manager, topo *models.TiDBCluster) error

Collect implements the Collector interface

func (*AlertCollectOptions) Desc

func (c *AlertCollectOptions) Desc() string

Desc implements the Collector interface

func (*AlertCollectOptions) GetBaseOptions

func (c *AlertCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*AlertCollectOptions) Prepare

func (c *AlertCollectOptions) Prepare(m *Manager, topo *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*AlertCollectOptions) SetBaseOptions

func (c *AlertCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*AlertCollectOptions) SetDir

func (c *AlertCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*AlertCollectOptions) SetGlobalOperations

func (c *AlertCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type AuditLogCollectOptions

type AuditLogCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

AuditLogCollectOptions are options used collecting tiup cluster/dm audit log

func (*AuditLogCollectOptions) Collect

Collect implements the Collector interface

func (*AuditLogCollectOptions) Desc

func (c *AuditLogCollectOptions) Desc() string

Desc implements the Collector interface

func (*AuditLogCollectOptions) GetBaseOptions

func (c *AuditLogCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*AuditLogCollectOptions) Prepare

Prepare implements the Collector interface

func (*AuditLogCollectOptions) SetBaseOptions

func (c *AuditLogCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*AuditLogCollectOptions) SetDir

func (c *AuditLogCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*AuditLogCollectOptions) SetGlobalOperations

func (c *AuditLogCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type BaseOptions

type BaseOptions struct {
	Cluster          string                  // cluster name
	Namespace        string                  // k8s namespace of the cluster
	MonitorNamespace string                  // k8s namespace of the monitor
	Kubeconfig       string                  // path of kubeconfig
	User             string                  // username to login to the SSH server
	UsePassword      bool                    // use password instead of identity file for ssh connection
	SSH              *tui.SSHConnectionProps // SSH credentials
	ScrapeBegin      string                  // start timepoint when collecting metrics and logs
	ScrapeEnd        string                  // stop timepoint when collecting metrics and logs
}

BaseOptions contains the options for check command

func (BaseOptions) Close added in v1.4.0

func (c BaseOptions) Close()

type BindCollectOptions

type BindCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

BindCollectOptions are options used collecting component sql bind

func (*BindCollectOptions) Collect

func (c *BindCollectOptions) Collect(m *Manager, topo *models.TiDBCluster) error

Collect implements the Collector interface

func (*BindCollectOptions) Desc

func (c *BindCollectOptions) Desc() string

Desc implements the Collector interface

func (*BindCollectOptions) GetBaseOptions

func (c *BindCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*BindCollectOptions) Prepare

func (c *BindCollectOptions) Prepare(_ *Manager, _ *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*BindCollectOptions) SetBaseOptions

func (c *BindCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*BindCollectOptions) SetDir

func (c *BindCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*BindCollectOptions) SetGlobalOperations

func (c *BindCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations implements the Collector interface

type ClusterJSON

type ClusterJSON struct {
	DiagVersion string              `json:"diag_version"`
	ClusterName string              `json:"cluster_name"`
	ClusterID   string              `json:"cluster_id"`   // the id from pd
	ClusterType string              `json:"cluster_type"` // tidb-cluster or dm-cluster
	DeployType  string              `json:"deploy_type"`  // deployment type
	Session     string              `json:"session"`
	BeginTime   string              `json:"begin_time"`
	EndTime     string              `json:"end_time"`
	Collectors  []string            `json:"collectors"`
	RawRequest  interface{}         `json:"raw_request"`
	Topology    *models.TiDBCluster `json:"topology"` // abstract cluster topo
}

func GetClusterInfoFromFile

func GetClusterInfoFromFile(path string) (*ClusterJSON, error)

GetClusterInfoFromFile

type CollectOptions

type CollectOptions struct {
	RawRequest      interface{}       // raw collect command or request
	Mode            string            // the cluster is deployed with what type of tool
	DiagMode        string            // run diag collect at command line mode or server mode
	ProfileName     string            // the name of a pre-defined collecting profile
	Collectors      CollectTree       // struct to show which collector is enabled
	MetricsFilter   []string          // prefix of metrics to collect
	MetricsExclude  []string          //prefix of metrics to exclude
	MetricsLabel    map[string]string // label to filte metrics
	Dir             string            // target directory to store collected data
	Limit           int               // rate limit of SCP
	MetricsLimit    int               // query limit of one request
	PerfDuration    int               //seconds: profile time(s), default is 30s.
	CompressScp     bool              // compress of files during collecting
	CompressMetrics bool              // compress of files during collecting
	RawMonitor      bool              // collect raw data for metrics
	ExitOnError     bool              // break the process and exit when an error occur
	ExtendedAttrs   map[string]string // extended attributes used for manual collecting mode
	ExplainSQLPath  string            // File path for explain sql
	ExplainSqls     []string          // explain sqls
	CurrDB          string
	Header          []string
	UsePortForward  bool // use portforward when call api inside k8s cluster
}

CollectOptions contains the options defining which type of data to collect

type CollectProfile

type CollectProfile struct {
	Name          string   `toml:"name"` // name of the profile
	Version       string   `toml:"version"`
	Maintainers   []string `toml:"maintainers,omitempty"`
	Description   string   `toml:"description,omitempty"`
	Collectors    []string `toml:"collectors,omitempty"`
	Roles         []string `toml:"roles,omitempty"`
	MetricFilters []string `toml:"metric_filters,omitempty"`
}

CollectProfile is a pre-defined configuration of collecting jobs

type CollectStat

type CollectStat struct {
	Target     string
	Size       int64
	Attributes map[string]interface{}
}

CollectStat is estimated size stats of data to be collected

type CollectTree

type CollectTree struct {
	System         bool
	Monitor        collectMonitor
	Log            collectLog
	Config         collectConfig
	DB_Vars        bool
	Perf           bool
	Debug          bool
	Component_Meta bool
	SQL_Bind       bool
	Plan_Replayer  bool
}

func ParseCollectTree

func ParseCollectTree(include, exclude []string) (CollectTree, error)

func (CollectTree) List

func (t CollectTree) List() []string

type Collector

type Collector interface {
	Prepare(*Manager, *models.TiDBCluster) (map[string][]CollectStat, error)
	Collect(*Manager, *models.TiDBCluster) error
	GetBaseOptions() *BaseOptions
	SetBaseOptions(*BaseOptions)
	Desc() string // a brief self description
	Close()
}

Collector is the configuration defining an collecting job

type ComponentMetaCollectOptions

type ComponentMetaCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

ComponentMetaCollectOptions are options used collecting component metadata

func (*ComponentMetaCollectOptions) Collect

Collect implements the Collector interface

func (*ComponentMetaCollectOptions) Desc

Desc implements the Collector interface

func (*ComponentMetaCollectOptions) GetBaseOptions

func (c *ComponentMetaCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*ComponentMetaCollectOptions) Prepare

Prepare implements the Collector interface

func (*ComponentMetaCollectOptions) SetBaseOptions

func (c *ComponentMetaCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*ComponentMetaCollectOptions) SetDir

func (c *ComponentMetaCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*ComponentMetaCollectOptions) SetGlobalOperations

func (c *ComponentMetaCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type ConfigCollectOptions

type ConfigCollectOptions struct {
	*BaseOptions
	Collectors collectConfig
	// contains filtered or unexported fields
}

ConfigCollectOptions are options used collecting component config

func (*ConfigCollectOptions) Collect

func (c *ConfigCollectOptions) Collect(m *Manager, cls *models.TiDBCluster) error

Collect implements the Collector interface

func (*ConfigCollectOptions) Desc

func (c *ConfigCollectOptions) Desc() string

Desc implements the Collector interface

func (*ConfigCollectOptions) GetBaseOptions

func (c *ConfigCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*ConfigCollectOptions) Prepare

func (c *ConfigCollectOptions) Prepare(m *Manager, topo *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*ConfigCollectOptions) SetBaseOptions

func (c *ConfigCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*ConfigCollectOptions) SetDir

func (c *ConfigCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*ConfigCollectOptions) SetGlobalOperations

func (c *ConfigCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type DebugCollectOptions

type DebugCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

DebugCollectOptions are options used collecting debug info

func (*DebugCollectOptions) Collect

func (c *DebugCollectOptions) Collect(m *Manager, topo *models.TiDBCluster) error

Collect implements the Collector interface

func (*DebugCollectOptions) Desc

func (c *DebugCollectOptions) Desc() string

Desc implements the Collector interface

func (*DebugCollectOptions) GetBaseOptions

func (c *DebugCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*DebugCollectOptions) Prepare

func (c *DebugCollectOptions) Prepare(m *Manager, topo *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*DebugCollectOptions) SetBaseOptions

func (c *DebugCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*DebugCollectOptions) SetDir

func (c *DebugCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*DebugCollectOptions) SetGlobalOperations

func (c *DebugCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type LogCollectOptions

type LogCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

LogCollectOptions are options used collecting component logs

func (*LogCollectOptions) Collect

func (c *LogCollectOptions) Collect(m *Manager, cls *models.TiDBCluster) error

Collect implements the Collector interface

func (*LogCollectOptions) Desc

func (c *LogCollectOptions) Desc() string

Desc implements the Collector interface

func (*LogCollectOptions) GetBaseOptions

func (c *LogCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*LogCollectOptions) Prepare

func (c *LogCollectOptions) Prepare(m *Manager, cls *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*LogCollectOptions) SetBaseOptions

func (c *LogCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*LogCollectOptions) SetDir

func (c *LogCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*LogCollectOptions) SetGlobalOperations

func (c *LogCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type Manager

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

Manager to deploy a cluster.

func NewEmptyManager

func NewEmptyManager(sysName, tid string, logger *logprinter.Logger) *Manager

NewEmptyManager creates a Manager with specific session ID and without initialing specManager

func NewManager

func NewManager(
	sysName string,
	specManager *spec.SpecManager,
	logger *logprinter.Logger,
) *Manager

NewManager create a Manager.

func (*Manager) CollectClusterInfo

func (m *Manager) CollectClusterInfo(
	opt *BaseOptions,
	cOpt *CollectOptions,
	gOpt *operator.Options,
	kubeCli *kubernetes.Clientset,
	dynCli dynamic.Interface,
	skipConfirm bool,
) (string, error)

CollectClusterInfo collects information and metrics from a tidb cluster

type MetaCollectOptions

type MetaCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

MetaCollectOptions is the options collecting cluster meta

func (*MetaCollectOptions) Collect

func (c *MetaCollectOptions) Collect(m *Manager, topo *models.TiDBCluster) error

Collect implements the Collector interface

func (*MetaCollectOptions) Desc

func (c *MetaCollectOptions) Desc() string

Desc implements the Collector interface

func (*MetaCollectOptions) GetBaseOptions

func (c *MetaCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*MetaCollectOptions) Prepare

func (c *MetaCollectOptions) Prepare(_ *Manager, _ *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*MetaCollectOptions) SetBaseOptions

func (c *MetaCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*MetaCollectOptions) SetDir

func (c *MetaCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*MetaCollectOptions) SetGlobalOperations

func (c *MetaCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type MetricCollectOptions

type MetricCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

MetricCollectOptions is the options collecting metrics

func (*MetricCollectOptions) Close added in v1.4.0

func (c *MetricCollectOptions) Close()

Close implements the Collector interface

func (*MetricCollectOptions) Collect

func (c *MetricCollectOptions) Collect(m *Manager, topo *models.TiDBCluster) error

Collect implements the Collector interface

func (*MetricCollectOptions) Desc

func (c *MetricCollectOptions) Desc() string

Desc implements the Collector interface

func (*MetricCollectOptions) GetBaseOptions

func (c *MetricCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*MetricCollectOptions) NewForwardPorts added in v1.4.0

func (c *MetricCollectOptions) NewForwardPorts(podName string, port int) (chan struct{}, int, error)

func (*MetricCollectOptions) Prepare

func (c *MetricCollectOptions) Prepare(m *Manager, topo *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*MetricCollectOptions) SetBaseOptions

func (c *MetricCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*MetricCollectOptions) SetDir

func (c *MetricCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*MetricCollectOptions) SetGlobalOperations

func (c *MetricCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type PerfCollectOptions

type PerfCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

PerfCollectOptions are options used collecting pref info

func (*PerfCollectOptions) Collect

func (c *PerfCollectOptions) Collect(m *Manager, topo *models.TiDBCluster) error

Collect implements the Collector interface

func (*PerfCollectOptions) Desc

func (c *PerfCollectOptions) Desc() string

Desc implements the Collector interface

func (*PerfCollectOptions) GetBaseOptions

func (c *PerfCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*PerfCollectOptions) Prepare

func (c *PerfCollectOptions) Prepare(m *Manager, topo *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*PerfCollectOptions) SetBaseOptions

func (c *PerfCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*PerfCollectOptions) SetDir

func (c *PerfCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*PerfCollectOptions) SetGlobalOperations

func (c *PerfCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type PlanReplayerCollectorOptions

type PlanReplayerCollectorOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

PlanReplayerCollectorOptions collects sql explains and related statistics

func (*PlanReplayerCollectorOptions) Collect

Collect implements the Collector interface

func (*PlanReplayerCollectorOptions) Desc

Desc implements the Collector interface

func (*PlanReplayerCollectorOptions) GetBaseOptions

func (c *PlanReplayerCollectorOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*PlanReplayerCollectorOptions) Prepare

Prepare implements the Collector interface

func (*PlanReplayerCollectorOptions) SetBaseOptions

func (c *PlanReplayerCollectorOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*PlanReplayerCollectorOptions) SetDir

func (c *PlanReplayerCollectorOptions) SetDir(dir string)

SetDir sets the result directory path

func (*PlanReplayerCollectorOptions) SetGlobalOperations

func (c *PlanReplayerCollectorOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations implements the Collector interface

type RebuildOptions

type RebuildOptions struct {
	Local       bool // rebuild the system on localhost
	Host        string
	Port        int
	User        string
	Passwd      string
	DBName      string
	Cluster     string // cluster name
	Session     string // collector session ID
	File        string
	Chunk       int
	Concurrency int // max parallel jobs allowed
}

RebuildOptions are arguments needed for the rebuild job

func (*RebuildOptions) LoadMetrics

func (opt *RebuildOptions) LoadMetrics(client influx.Client) error

type SchemaCollectOptions

type SchemaCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

SchemaCollectOptions are options used collecting tidb scheme

func (*SchemaCollectOptions) Collect

func (c *SchemaCollectOptions) Collect(m *Manager, topo *models.TiDBCluster) error

Collect implements the Collector interface

func (*SchemaCollectOptions) Desc

func (c *SchemaCollectOptions) Desc() string

Desc implements the Collector interface

func (*SchemaCollectOptions) GetBaseOptions

func (c *SchemaCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*SchemaCollectOptions) Prepare

Prepare implements the Collector interface

func (*SchemaCollectOptions) SetBaseOptions

func (c *SchemaCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*SchemaCollectOptions) SetDir

func (c *SchemaCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*SchemaCollectOptions) SetGlobalOperations

func (c *SchemaCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type SchemaResponse

type SchemaResponse struct {
	View *ViewResponse `json:"view"`
}

type SystemCollectOptions

type SystemCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

SystemCollectOptions are options used collecting system information

func (*SystemCollectOptions) Collect

func (c *SystemCollectOptions) Collect(m *Manager, cls *models.TiDBCluster) error

Collect implements the Collector interface

func (*SystemCollectOptions) Desc

func (c *SystemCollectOptions) Desc() string

Desc implements the Collector interface

func (*SystemCollectOptions) GetBaseOptions

func (c *SystemCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*SystemCollectOptions) Prepare

Prepare implements the Collector interface

func (*SystemCollectOptions) SetBaseOptions

func (c *SystemCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*SystemCollectOptions) SetDir

func (c *SystemCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*SystemCollectOptions) SetGlobalOperations

func (c *SystemCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type TSDBCollectOptions

type TSDBCollectOptions struct {
	*BaseOptions
	// contains filtered or unexported fields
}

TSDBCollectOptions is the options collecting TSDB file of prometheus, only work for tiup-cluster deployed cluster

func (*TSDBCollectOptions) Collect

func (c *TSDBCollectOptions) Collect(m *Manager, cls *models.TiDBCluster) error

Collect implements the Collector interface

func (*TSDBCollectOptions) Desc

func (c *TSDBCollectOptions) Desc() string

Desc implements the Collector interface

func (*TSDBCollectOptions) GetBaseOptions

func (c *TSDBCollectOptions) GetBaseOptions() *BaseOptions

GetBaseOptions implements the Collector interface

func (*TSDBCollectOptions) Prepare

func (c *TSDBCollectOptions) Prepare(m *Manager, cls *models.TiDBCluster) (map[string][]CollectStat, error)

Prepare implements the Collector interface

func (*TSDBCollectOptions) SetBaseOptions

func (c *TSDBCollectOptions) SetBaseOptions(opt *BaseOptions)

SetBaseOptions implements the Collector interface

func (*TSDBCollectOptions) SetDir

func (c *TSDBCollectOptions) SetDir(dir string)

SetDir sets the result directory path

func (*TSDBCollectOptions) SetGlobalOperations

func (c *TSDBCollectOptions) SetGlobalOperations(opt *operator.Options)

SetGlobalOperations sets the global operation fileds

type ViewResponse

type ViewResponse struct {
	ViewSelect string `json:"view_select"`
}

Directories

Path Synopsis
log

Jump to

Keyboard shortcuts

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