Documentation
¶
Index ¶
- Constants
- func DefaultCollectorConfig() map[string]bool
- type AuthConfig
- type AuthConfigHandler
- type Config
- type EmptyConfig
- type HeartbeatConfig
- type InfoSchemaProcesslistConfig
- type InfoSchemaTablesConfig
- type MySqlConfig
- type MySqlConfigHandler
- type MysqlUserConfig
- type PerfSchemaEventsStatementsConfig
- type PerfSchemaFileInstancesConfig
- type PerfSchemaMemoryEventsConfig
Constants ¶
View Source
const ( DefaultExporterLockWaitTimeoutSeconds = 2 DefaultEnableExporterLockTimeout = true DefaultSlowLogFilter = false DefaultExporterQueryTimeout = 0 DefaultExporterMaxOpenConns = 2 DefaultHeartbeatDatabase = "heartbeat" DefaultHeartbeatTable = "heartbeat" DefaultHeartbeatUTC = false DefaultInfoSchemaProcesslistMinTime = 0 DefaultInfoSchemaProcesslistProcessesByUser = true DefaultInfoSchemaProcesslistProcessesByHost = true DefaultInfoSchemaTablesDatabases = "*" DefaultPerfSchemaEventsStatementsLimit = 250 DefaultPerfSchemaEventsStatementsTimeLimit = 86400 DefaultPerfSchemaEventsStatementsDigestTextLimit = 120 DefaultPerfSchemaFileInstancesFilter = ".*" DefaultPerfSchemaFileInstancesRemovePrefix = "/var/lib/mysql/" DefaultPerfSchemaMemoryEventsRemovePrefix = "memory/" DefaultMysqlUserPrivileges = false )
Variables ¶
This section is empty.
Functions ¶
func DefaultCollectorConfig ¶ added in v0.21.0
Types ¶
type AuthConfig ¶ added in v0.21.0
type AuthConfig struct {
Sections map[string]MySqlConfig
}
type AuthConfigHandler ¶ added in v0.21.0
type AuthConfigHandler struct {
sync.RWMutex
TlsInsecureSkipVerify bool
Config *AuthConfig
// contains filtered or unexported fields
}
func NewAuthConfigHandler ¶ added in v0.21.0
func NewAuthConfigHandler(registerer prometheus.Registerer) (*AuthConfigHandler, error)
func (*AuthConfigHandler) GetConfig ¶ added in v0.21.0
func (ch *AuthConfigHandler) GetConfig() *AuthConfig
func (*AuthConfigHandler) ReloadConfig ¶ added in v0.21.0
type Config ¶
type Config struct {
DataSourceName string
Collectors map[string]bool
EnableExporterLockWaitTimeout bool
ExporterLockWaitTimeoutSeconds int
SlowLogFilter bool
ExporterQueryTimeout time.Duration
ExporterMaxOpenConns int
Heartbeat HeartbeatConfig
InfoSchemaProcesslist InfoSchemaProcesslistConfig
InfoSchemaTables InfoSchemaTablesConfig
PerfSchemaEventsStatements PerfSchemaEventsStatementsConfig
PerfSchemaFileInstances PerfSchemaFileInstancesConfig
PerfSchemaMemoryEvents PerfSchemaMemoryEventsConfig
MysqlUser MysqlUserConfig
}
func NewConfigWithDefaults ¶ added in v0.21.0
func NewConfigWithDefaults() Config
type EmptyConfig ¶ added in v0.21.0
type EmptyConfig struct{}
type HeartbeatConfig ¶ added in v0.21.0
type InfoSchemaProcesslistConfig ¶ added in v0.21.0
type InfoSchemaTablesConfig ¶ added in v0.21.0
type InfoSchemaTablesConfig struct {
Databases string
}
type MySqlConfig ¶
type MySqlConfig struct {
User string `ini:"user"`
Password string `ini:"password"`
Host string `ini:"host"`
Port int `ini:"port"`
Socket string `ini:"socket"`
EnableCleartextPlugin bool `ini:"enable-cleartext-plugin"`
SslCa string `ini:"ssl-ca"`
SslCert string `ini:"ssl-cert"`
SslKey string `ini:"ssl-key"`
TlsInsecureSkipVerify bool `ini:"ssl-skip-verfication"` //nolint:misspell
Tls string `ini:"tls"`
TlsMinVersion string `ini:"tls-min-version"`
TlsMaxVersion string `ini:"tls-max-version"`
TlsServerName string `ini:"tls-server-name"`
}
func (MySqlConfig) CustomizeTLS ¶
func (m MySqlConfig) CustomizeTLS(configSectionName string) error
type MySqlConfigHandler ¶
type MySqlConfigHandler = AuthConfigHandler
type MysqlUserConfig ¶ added in v0.21.0
type MysqlUserConfig struct {
Privileges bool
}
type PerfSchemaEventsStatementsConfig ¶ added in v0.21.0
type PerfSchemaFileInstancesConfig ¶ added in v0.21.0
type PerfSchemaMemoryEventsConfig ¶ added in v0.21.0
type PerfSchemaMemoryEventsConfig struct {
RemovePrefix string
}
Click to show internal directories.
Click to hide internal directories.