Documentation ¶
Overview ¶
Package mysqld_exporter embeds https://github.com/prometheus/mysqld_exporter
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ LockWaitTimeout: 2, InfoSchemaProcessListProcessesByUser: true, InfoSchemaProcessListProcessesByHost: true, InfoSchemaTablesDatabases: "*", PerfSchemaEventsStatementsLimit: 250, PerfSchemaEventsStatementsTimeLimit: 86400, PerfSchemaEventsStatementsTextLimit: 120, PerfSchemaFileInstancesFilter: ".*", PerfSchemaFileInstancesRemovePrefix: "/var/lib/mysql", HeartbeatDatabase: "heartbeat", HeartbeatTable: "heartbeat", }
Functions ¶
func GetScrapers ¶
GetScrapers returns the set of *enabled* scrapers from the config. Configurable scrapers will have their configuration filled out matching the Config's settings.
func New ¶
func New(log log.Logger, c *Config) (integrations.Integration, error)
New creates a new mysqld_exporter integration. The integration scrapes metrics from a mysqld process.
Types ¶
type Config ¶
type Config struct { Common config.Common `yaml:",inline"` // DataSourceName to use to connect to MySQL. DataSourceName string `yaml:"data_source_name"` // Collectors to mark as enabled in addition to the default. EnableCollectors []string `yaml:"enable_collectors"` // Collectors to explicitly mark as disabled. DisableCollectors []string `yaml:"disable_collectors"` // Overrides the default set of enabled collectors with the given list. SetCollectors []string `yaml:"set_collectors"` // Collector-wide options LockWaitTimeout int `yaml:"lock_wait_timeout"` LogSlowFilter bool `yaml:"log_slow_filter"` // Collector-specific config options InfoSchemaProcessListMinTime int `yaml:"info_schema_processlist_min_time"` InfoSchemaProcessListProcessesByUser bool `yaml:"info_schema_processlist_processes_by_user"` InfoSchemaProcessListProcessesByHost bool `yaml:"info_schema_processlist_processes_by_host"` InfoSchemaTablesDatabases string `yaml:"info_schema_tables_databases"` PerfSchemaEventsStatementsLimit int `yaml:"perf_schema_eventsstatements_limit"` PerfSchemaEventsStatementsTimeLimit int `yaml:"perf_schema_eventsstatements_time_limit"` PerfSchemaEventsStatementsTextLimit int `yaml:"perf_schema_eventsstatements_digtext_text_limit"` PerfSchemaFileInstancesFilter string `yaml:"perf_schema_file_instances_filter"` PerfSchemaFileInstancesRemovePrefix string `yaml:"perf_schema_file_instances_remove_prefix"` HeartbeatDatabase string `yaml:"heartbeat_database"` HeartbeatTable string `yaml:"heartbeat_table"` HeartbeatUTC bool `yaml:"heartbeat_utc"` MySQLUserPrivileges bool `yaml:"mysql_user_privileges"` }
Config controls the mysqld_exporter integration.
func (*Config) CommonConfig ¶
func (*Config) NewIntegration ¶ added in v0.10.0
func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config.
Click to show internal directories.
Click to hide internal directories.