mysqld_exporter

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

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

func GetScrapers(c *Config) []collector.Scraper

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

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 (c *Config) CommonConfig() config.Common

func (*Config) Name added in v0.10.0

func (c *Config) Name() string

func (*Config) NewIntegration added in v0.10.0

func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler for Config.

Jump to

Keyboard shortcuts

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