mysql

package
v0.36.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	LockWaitTimeout: 2,
	InfoSchemaProcessList: InfoSchemaProcessList{
		ProcessesByUser: true,
		ProcessesByHost: true,
	},
	InfoSchemaTables: InfoSchemaTables{
		Databases: "*",
	},
	PerfSchemaEventsStatements: PerfSchemaEventsStatements{
		Limit:     250,
		TimeLimit: 86400,
		TextLimit: 120,
	},
	PerfSchemaFileInstances: PerfSchemaFileInstances{
		Filter:       ".*",
		RemovePrefix: "/var/lib/mysql",
	},
	Heartbeat: Heartbeat{
		Database: "heartbeat",
		Table:    "heartbeat",
	},
}

DefaultArguments holds the default settings for the mysqld_exporter integration.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	// DataSourceName to use to connect to MySQL.
	DataSourceName rivertypes.Secret `river:"data_source_name,attr,optional"`

	// Collectors to mark as enabled in addition to the default.
	EnableCollectors []string `river:"enable_collectors,attr,optional"`
	// Collectors to explicitly mark as disabled.
	DisableCollectors []string `river:"disable_collectors,attr,optional"`

	// Overrides the default set of enabled collectors with the given list.
	SetCollectors []string `river:"set_collectors,attr,optional"`

	// Collector-wide options
	LockWaitTimeout int  `river:"lock_wait_timeout,attr,optional"`
	LogSlowFilter   bool `river:"log_slow_filter,attr,optional"`

	// Collector-specific config options
	InfoSchemaProcessList      InfoSchemaProcessList      `river:"info_schema.processlist,block,optional"`
	InfoSchemaTables           InfoSchemaTables           `river:"info_schema.tables,block,optional"`
	PerfSchemaEventsStatements PerfSchemaEventsStatements `river:"perf_schema.eventsstatements,block,optional"`
	PerfSchemaFileInstances    PerfSchemaFileInstances    `river:"perf_schema.file_instances,block,optional"`
	Heartbeat                  Heartbeat                  `river:"heartbeat,block,optional"`
	MySQLUser                  MySQLUser                  `river:"mysql.user,block,optional"`
}

Arguments controls the mysql component.

func (*Arguments) Convert

func (a *Arguments) Convert() *mysqld_exporter.Config

func (*Arguments) SetToDefault added in v0.35.0

func (a *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

func (*Arguments) Validate added in v0.34.0

func (a *Arguments) Validate() error

Validate implements river.Validator.

type Heartbeat

type Heartbeat struct {
	Database string `river:"database,attr,optional"`
	Table    string `river:"table,attr,optional"`
	UTC      bool   `river:"utc,attr,optional"`
}

Heartbeat controls the heartbeat collector

type InfoSchemaProcessList

type InfoSchemaProcessList struct {
	MinTime         int  `river:"min_time,attr,optional"`
	ProcessesByUser bool `river:"processes_by_user,attr,optional"`
	ProcessesByHost bool `river:"processes_by_host,attr,optional"`
}

InfoSchemaProcessList configures the info_schema.processlist collector

type InfoSchemaTables

type InfoSchemaTables struct {
	Databases string `river:"databases,attr,optional"`
}

InfoSchemaTables configures the info_schema.tables collector

type MySQLUser

type MySQLUser struct {
	Privileges bool `river:"privileges,attr,optional"`
}

MySQLUser controls the mysql.user collector

type PerfSchemaEventsStatements

type PerfSchemaEventsStatements struct {
	Limit     int `river:"limit,attr,optional"`
	TimeLimit int `river:"time_limit,attr,optional"`
	TextLimit int `river:"text_limit,attr,optional"`
}

PerfSchemaEventsStatements configures the perf_schema.eventsstatements collector

type PerfSchemaFileInstances

type PerfSchemaFileInstances struct {
	Filter       string `river:"filter,attr,optional"`
	RemovePrefix string `river:"remove_prefix,attr,optional"`
}

PerfSchemaFileInstances configures the perf_schema.file_instances collector

Jump to

Keyboard shortcuts

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