Documentation ¶
Index ¶
- Constants
- Variables
- type Exporter
- type ScrapeAutoIncrementColumns
- type ScrapeBinlogSize
- type ScrapeClientStat
- type ScrapeEngineInnodbStatus
- type ScrapeEngineTokudbStatus
- type ScrapeGlobalStatus
- type ScrapeGlobalVariables
- type ScrapeHeartbeat
- type ScrapeInfoSchemaInnodbTablespaces
- type ScrapeInnodbCmp
- type ScrapeInnodbCmpMem
- type ScrapeInnodbMetrics
- type ScrapePerfEventsStatements
- type ScrapePerfEventsStatementsSum
- type ScrapePerfEventsWaits
- type ScrapePerfFileEvents
- type ScrapePerfFileInstances
- type ScrapePerfIndexIOWaits
- type ScrapePerfMemoryEvents
- type ScrapePerfReplicationApplierStatsByWorker
- func (ScrapePerfReplicationApplierStatsByWorker) Help() string
- func (ScrapePerfReplicationApplierStatsByWorker) Name() string
- func (ScrapePerfReplicationApplierStatsByWorker) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, ...) error
- func (ScrapePerfReplicationApplierStatsByWorker) Version() float64
- type ScrapePerfReplicationGroupMemberStats
- func (ScrapePerfReplicationGroupMemberStats) Help() string
- func (ScrapePerfReplicationGroupMemberStats) Name() string
- func (ScrapePerfReplicationGroupMemberStats) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, ...) error
- func (ScrapePerfReplicationGroupMemberStats) Version() float64
- type ScrapePerfReplicationGroupMembers
- type ScrapePerfTableIOWaits
- type ScrapePerfTableLockWaits
- type ScrapeProcesslist
- type ScrapeQueryResponseTime
- type ScrapeReplicaHost
- type ScrapeSchemaStat
- type ScrapeSlaveHosts
- type ScrapeSlaveStatus
- type ScrapeSysUserSummary
- type ScrapeTableSchema
- type ScrapeTableStat
- type ScrapeUser
- type ScrapeUserStat
- type Scraper
Constants ¶
const ( FlavorMySQL = "mysql" FlavorMariaDB = "mariadb" )
Variables ¶
var ( HeartbeatStoredDesc = prometheus.NewDesc( prometheus.BuildFQName(namespace, heartbeat, "stored_timestamp_seconds"), "Timestamp stored in the heartbeat table.", []string{"server_id"}, nil, ) HeartbeatNowDesc = prometheus.NewDesc( prometheus.BuildFQName(namespace, heartbeat, "now_timestamp_seconds"), "Timestamp of the current server.", []string{"server_id"}, nil, ) )
Metric descriptors.
var ( SlaveHostsInfo = prometheus.NewDesc( prometheus.BuildFQName(namespace, heartbeat, "mysql_slave_hosts_info"), "Information about running slaves", []string{"server_id", "slave_host", "port", "master_id", "slave_uuid"}, nil, ) )
Metric descriptors.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶ added in v0.11.0
type Exporter struct {
// contains filtered or unexported fields
}
Exporter collects MySQL metrics. It implements prometheus.Collector.
func (*Exporter) Collect ¶ added in v0.11.0
func (e *Exporter) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*Exporter) Describe ¶ added in v0.11.0
func (e *Exporter) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector.
type ScrapeAutoIncrementColumns ¶
type ScrapeAutoIncrementColumns struct{}
ScrapeAutoIncrementColumns collects auto_increment column information.
func (ScrapeAutoIncrementColumns) Help ¶ added in v0.11.0
func (ScrapeAutoIncrementColumns) Help() string
Help describes the role of the Scraper.
func (ScrapeAutoIncrementColumns) Name ¶ added in v0.11.0
func (ScrapeAutoIncrementColumns) Name() string
Name of the Scraper. Should be unique.
func (ScrapeAutoIncrementColumns) Scrape ¶ added in v0.11.0
func (ScrapeAutoIncrementColumns) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeAutoIncrementColumns) Version ¶ added in v0.12.0
func (ScrapeAutoIncrementColumns) Version() float64
Version of MySQL from which scraper is available.
type ScrapeBinlogSize ¶
type ScrapeBinlogSize struct{}
ScrapeBinlogSize collects from `SHOW BINARY LOGS`.
func (ScrapeBinlogSize) Help ¶ added in v0.11.0
func (ScrapeBinlogSize) Help() string
Help describes the role of the Scraper.
func (ScrapeBinlogSize) Name ¶ added in v0.11.0
func (ScrapeBinlogSize) Name() string
Name of the Scraper. Should be unique.
func (ScrapeBinlogSize) Scrape ¶ added in v0.11.0
func (ScrapeBinlogSize) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeBinlogSize) Version ¶ added in v0.12.0
func (ScrapeBinlogSize) Version() float64
Version of MySQL from which scraper is available.
type ScrapeClientStat ¶
type ScrapeClientStat struct{}
ScrapeClientStat collects from `information_schema.client_statistics`.
func (ScrapeClientStat) Help ¶ added in v0.11.0
func (ScrapeClientStat) Help() string
Help describes the role of the Scraper.
func (ScrapeClientStat) Name ¶ added in v0.11.0
func (ScrapeClientStat) Name() string
Name of the Scraper. Should be unique.
func (ScrapeClientStat) Scrape ¶ added in v0.11.0
func (ScrapeClientStat) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeClientStat) Version ¶ added in v0.12.0
func (ScrapeClientStat) Version() float64
Version of MySQL from which scraper is available.
type ScrapeEngineInnodbStatus ¶
type ScrapeEngineInnodbStatus struct{}
ScrapeEngineInnodbStatus scrapes from `SHOW ENGINE INNODB STATUS`.
func (ScrapeEngineInnodbStatus) Help ¶ added in v0.11.0
func (ScrapeEngineInnodbStatus) Help() string
Help describes the role of the Scraper.
func (ScrapeEngineInnodbStatus) Name ¶ added in v0.11.0
func (ScrapeEngineInnodbStatus) Name() string
Name of the Scraper. Should be unique.
func (ScrapeEngineInnodbStatus) Scrape ¶ added in v0.11.0
func (ScrapeEngineInnodbStatus) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeEngineInnodbStatus) Version ¶ added in v0.12.0
func (ScrapeEngineInnodbStatus) Version() float64
Version of MySQL from which scraper is available.
type ScrapeEngineTokudbStatus ¶
type ScrapeEngineTokudbStatus struct{}
ScrapeEngineTokudbStatus scrapes from `SHOW ENGINE TOKUDB STATUS`.
func (ScrapeEngineTokudbStatus) Help ¶ added in v0.11.0
func (ScrapeEngineTokudbStatus) Help() string
Help describes the role of the Scraper.
func (ScrapeEngineTokudbStatus) Name ¶ added in v0.11.0
func (ScrapeEngineTokudbStatus) Name() string
Name of the Scraper. Should be unique.
func (ScrapeEngineTokudbStatus) Scrape ¶ added in v0.11.0
func (ScrapeEngineTokudbStatus) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeEngineTokudbStatus) Version ¶ added in v0.12.0
func (ScrapeEngineTokudbStatus) Version() float64
Version of MySQL from which scraper is available.
type ScrapeGlobalStatus ¶
type ScrapeGlobalStatus struct{}
ScrapeGlobalStatus collects from `SHOW GLOBAL STATUS`.
func (ScrapeGlobalStatus) Help ¶ added in v0.11.0
func (ScrapeGlobalStatus) Help() string
Help describes the role of the Scraper.
func (ScrapeGlobalStatus) Name ¶ added in v0.11.0
func (ScrapeGlobalStatus) Name() string
Name of the Scraper. Should be unique.
func (ScrapeGlobalStatus) Scrape ¶ added in v0.11.0
func (ScrapeGlobalStatus) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeGlobalStatus) Version ¶ added in v0.12.0
func (ScrapeGlobalStatus) Version() float64
Version of MySQL from which scraper is available.
type ScrapeGlobalVariables ¶
type ScrapeGlobalVariables struct{}
ScrapeGlobalVariables collects from `SHOW GLOBAL VARIABLES`.
func (ScrapeGlobalVariables) Help ¶ added in v0.11.0
func (ScrapeGlobalVariables) Help() string
Help describes the role of the Scraper.
func (ScrapeGlobalVariables) Name ¶ added in v0.11.0
func (ScrapeGlobalVariables) Name() string
Name of the Scraper. Should be unique.
func (ScrapeGlobalVariables) Scrape ¶ added in v0.11.0
func (ScrapeGlobalVariables) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeGlobalVariables) Version ¶ added in v0.12.0
func (ScrapeGlobalVariables) Version() float64
Version of MySQL from which scraper is available.
type ScrapeHeartbeat ¶ added in v0.10.0
type ScrapeHeartbeat struct{}
ScrapeHeartbeat scrapes from the heartbeat table. This is mainly targeting pt-heartbeat, but will work with any heartbeat implementation that writes to a table with two columns: CREATE TABLE heartbeat (
ts varchar(26) NOT NULL, server_id int unsigned NOT NULL PRIMARY KEY,
);
func (ScrapeHeartbeat) Help ¶ added in v0.11.0
func (ScrapeHeartbeat) Help() string
Help describes the role of the Scraper.
func (ScrapeHeartbeat) Name ¶ added in v0.11.0
func (ScrapeHeartbeat) Name() string
Name of the Scraper. Should be unique.
func (ScrapeHeartbeat) Scrape ¶ added in v0.11.0
func (ScrapeHeartbeat) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeHeartbeat) Version ¶ added in v0.12.0
func (ScrapeHeartbeat) Version() float64
Version of MySQL from which scraper is available.
type ScrapeInfoSchemaInnodbTablespaces ¶
type ScrapeInfoSchemaInnodbTablespaces struct{}
ScrapeInfoSchemaInnodbTablespaces collects from `information_schema.innodb_sys_tablespaces`.
func (ScrapeInfoSchemaInnodbTablespaces) Help ¶ added in v0.11.0
func (ScrapeInfoSchemaInnodbTablespaces) Help() string
Help describes the role of the Scraper.
func (ScrapeInfoSchemaInnodbTablespaces) Name ¶ added in v0.11.0
func (ScrapeInfoSchemaInnodbTablespaces) Name() string
Name of the Scraper. Should be unique.
func (ScrapeInfoSchemaInnodbTablespaces) Scrape ¶ added in v0.11.0
func (ScrapeInfoSchemaInnodbTablespaces) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeInfoSchemaInnodbTablespaces) Version ¶ added in v0.12.0
func (ScrapeInfoSchemaInnodbTablespaces) Version() float64
Version of MySQL from which scraper is available.
type ScrapeInnodbCmp ¶ added in v0.11.0
type ScrapeInnodbCmp struct{}
ScrapeInnodbCmp collects from `information_schema.innodb_cmp`.
func (ScrapeInnodbCmp) Help ¶ added in v0.11.0
func (ScrapeInnodbCmp) Help() string
Help describes the role of the Scraper.
func (ScrapeInnodbCmp) Name ¶ added in v0.11.0
func (ScrapeInnodbCmp) Name() string
Name of the Scraper. Should be unique.
func (ScrapeInnodbCmp) Scrape ¶ added in v0.11.0
func (ScrapeInnodbCmp) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeInnodbCmp) Version ¶ added in v0.12.0
func (ScrapeInnodbCmp) Version() float64
Version of MySQL from which scraper is available.
type ScrapeInnodbCmpMem ¶ added in v0.11.0
type ScrapeInnodbCmpMem struct{}
ScrapeInnodbCmp collects from `information_schema.innodb_cmp`.
func (ScrapeInnodbCmpMem) Help ¶ added in v0.11.0
func (ScrapeInnodbCmpMem) Help() string
Help describes the role of the Scraper.
func (ScrapeInnodbCmpMem) Name ¶ added in v0.11.0
func (ScrapeInnodbCmpMem) Name() string
Name of the Scraper. Should be unique.
func (ScrapeInnodbCmpMem) Scrape ¶ added in v0.11.0
func (ScrapeInnodbCmpMem) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeInnodbCmpMem) Version ¶ added in v0.12.0
func (ScrapeInnodbCmpMem) Version() float64
Version of MySQL from which scraper is available.
type ScrapeInnodbMetrics ¶
type ScrapeInnodbMetrics struct{}
ScrapeInnodbMetrics collects from `information_schema.innodb_metrics`.
func (ScrapeInnodbMetrics) Help ¶ added in v0.11.0
func (ScrapeInnodbMetrics) Help() string
Help describes the role of the Scraper.
func (ScrapeInnodbMetrics) Name ¶ added in v0.11.0
func (ScrapeInnodbMetrics) Name() string
Name of the Scraper. Should be unique.
func (ScrapeInnodbMetrics) Scrape ¶ added in v0.11.0
func (ScrapeInnodbMetrics) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeInnodbMetrics) Version ¶ added in v0.12.0
func (ScrapeInnodbMetrics) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfEventsStatements ¶
type ScrapePerfEventsStatements struct{}
ScrapePerfEventsStatements collects from `performance_schema.events_statements_summary_by_digest`.
func (ScrapePerfEventsStatements) Help ¶ added in v0.11.0
func (ScrapePerfEventsStatements) Help() string
Help describes the role of the Scraper.
func (ScrapePerfEventsStatements) Name ¶ added in v0.11.0
func (ScrapePerfEventsStatements) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfEventsStatements) Scrape ¶ added in v0.11.0
func (ScrapePerfEventsStatements) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfEventsStatements) Version ¶ added in v0.12.0
func (ScrapePerfEventsStatements) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfEventsStatementsSum ¶ added in v0.12.0
type ScrapePerfEventsStatementsSum struct{}
ScrapePerfEventsStatementsSum collects from `performance_schema.events_statements_summary_by_digest`.
func (ScrapePerfEventsStatementsSum) Help ¶ added in v0.12.0
func (ScrapePerfEventsStatementsSum) Help() string
Help describes the role of the Scraper.
func (ScrapePerfEventsStatementsSum) Name ¶ added in v0.12.0
func (ScrapePerfEventsStatementsSum) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfEventsStatementsSum) Scrape ¶ added in v0.12.0
func (ScrapePerfEventsStatementsSum) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfEventsStatementsSum) Version ¶ added in v0.12.0
func (ScrapePerfEventsStatementsSum) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfEventsWaits ¶
type ScrapePerfEventsWaits struct{}
ScrapePerfEventsWaits collects from `performance_schema.events_waits_summary_global_by_event_name`.
func (ScrapePerfEventsWaits) Help ¶ added in v0.11.0
func (ScrapePerfEventsWaits) Help() string
Help describes the role of the Scraper.
func (ScrapePerfEventsWaits) Name ¶ added in v0.11.0
func (ScrapePerfEventsWaits) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfEventsWaits) Scrape ¶ added in v0.11.0
func (ScrapePerfEventsWaits) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfEventsWaits) Version ¶ added in v0.12.0
func (ScrapePerfEventsWaits) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfFileEvents ¶
type ScrapePerfFileEvents struct{}
ScrapePerfFileEvents collects from `performance_schema.file_summary_by_event_name`.
func (ScrapePerfFileEvents) Help ¶ added in v0.11.0
func (ScrapePerfFileEvents) Help() string
Help describes the role of the Scraper.
func (ScrapePerfFileEvents) Name ¶ added in v0.11.0
func (ScrapePerfFileEvents) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfFileEvents) Scrape ¶ added in v0.11.0
func (ScrapePerfFileEvents) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfFileEvents) Version ¶ added in v0.12.0
func (ScrapePerfFileEvents) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfFileInstances ¶ added in v0.10.0
type ScrapePerfFileInstances struct{}
ScrapePerfFileInstances collects from `performance_schema.file_summary_by_instance`.
func (ScrapePerfFileInstances) Help ¶ added in v0.11.0
func (ScrapePerfFileInstances) Help() string
Help describes the role of the Scraper.
func (ScrapePerfFileInstances) Name ¶ added in v0.11.0
func (ScrapePerfFileInstances) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfFileInstances) Scrape ¶ added in v0.11.0
func (ScrapePerfFileInstances) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfFileInstances) Version ¶ added in v0.12.0
func (ScrapePerfFileInstances) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfIndexIOWaits ¶
type ScrapePerfIndexIOWaits struct{}
ScrapePerfIndexIOWaits collects for `performance_schema.table_io_waits_summary_by_index_usage`.
func (ScrapePerfIndexIOWaits) Help ¶ added in v0.11.0
func (ScrapePerfIndexIOWaits) Help() string
Help describes the role of the Scraper.
func (ScrapePerfIndexIOWaits) Name ¶ added in v0.11.0
func (ScrapePerfIndexIOWaits) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfIndexIOWaits) Scrape ¶ added in v0.11.0
func (ScrapePerfIndexIOWaits) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfIndexIOWaits) Version ¶ added in v0.12.0
func (ScrapePerfIndexIOWaits) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfMemoryEvents ¶ added in v0.13.0
type ScrapePerfMemoryEvents struct{}
ScrapePerfMemoryEvents collects from `performance_schema.memory_summary_global_by_event_name`.
func (ScrapePerfMemoryEvents) Help ¶ added in v0.13.0
func (ScrapePerfMemoryEvents) Help() string
Help describes the role of the Scraper.
func (ScrapePerfMemoryEvents) Name ¶ added in v0.13.0
func (ScrapePerfMemoryEvents) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfMemoryEvents) Scrape ¶ added in v0.13.0
func (ScrapePerfMemoryEvents) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfMemoryEvents) Version ¶ added in v0.13.0
func (ScrapePerfMemoryEvents) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfReplicationApplierStatsByWorker ¶ added in v0.12.0
type ScrapePerfReplicationApplierStatsByWorker struct{}
ScrapePerfReplicationApplierStatsByWorker collects from `performance_schema.replication_applier_status_by_worker`.
func (ScrapePerfReplicationApplierStatsByWorker) Help ¶ added in v0.12.0
func (ScrapePerfReplicationApplierStatsByWorker) Help() string
Help describes the role of the Scraper.
func (ScrapePerfReplicationApplierStatsByWorker) Name ¶ added in v0.12.0
func (ScrapePerfReplicationApplierStatsByWorker) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfReplicationApplierStatsByWorker) Scrape ¶ added in v0.12.0
func (ScrapePerfReplicationApplierStatsByWorker) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfReplicationApplierStatsByWorker) Version ¶ added in v0.12.0
func (ScrapePerfReplicationApplierStatsByWorker) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfReplicationGroupMemberStats ¶ added in v0.11.0
type ScrapePerfReplicationGroupMemberStats struct{}
ScrapePerfReplicationGroupMemberStats collects from `performance_schema.replication_group_member_stats`.
func (ScrapePerfReplicationGroupMemberStats) Help ¶ added in v0.11.0
func (ScrapePerfReplicationGroupMemberStats) Help() string
Help describes the role of the Scraper.
func (ScrapePerfReplicationGroupMemberStats) Name ¶ added in v0.11.0
func (ScrapePerfReplicationGroupMemberStats) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfReplicationGroupMemberStats) Scrape ¶ added in v0.11.0
func (ScrapePerfReplicationGroupMemberStats) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfReplicationGroupMemberStats) Version ¶ added in v0.12.0
func (ScrapePerfReplicationGroupMemberStats) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfReplicationGroupMembers ¶ added in v0.13.0
type ScrapePerfReplicationGroupMembers struct{}
ScrapeReplicationGroupMembers collects from `performance_schema.replication_group_members`.
func (ScrapePerfReplicationGroupMembers) Help ¶ added in v0.13.0
func (ScrapePerfReplicationGroupMembers) Help() string
Help describes the role of the Scraper.
func (ScrapePerfReplicationGroupMembers) Name ¶ added in v0.13.0
func (ScrapePerfReplicationGroupMembers) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfReplicationGroupMembers) Scrape ¶ added in v0.13.0
func (ScrapePerfReplicationGroupMembers) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfReplicationGroupMembers) Version ¶ added in v0.13.0
func (ScrapePerfReplicationGroupMembers) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfTableIOWaits ¶
type ScrapePerfTableIOWaits struct{}
ScrapePerfTableIOWaits collects from `performance_schema.table_io_waits_summary_by_table`.
func (ScrapePerfTableIOWaits) Help ¶ added in v0.11.0
func (ScrapePerfTableIOWaits) Help() string
Help describes the role of the Scraper.
func (ScrapePerfTableIOWaits) Name ¶ added in v0.11.0
func (ScrapePerfTableIOWaits) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfTableIOWaits) Scrape ¶ added in v0.11.0
func (ScrapePerfTableIOWaits) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfTableIOWaits) Version ¶ added in v0.12.0
func (ScrapePerfTableIOWaits) Version() float64
Version of MySQL from which scraper is available.
type ScrapePerfTableLockWaits ¶
type ScrapePerfTableLockWaits struct{}
ScrapePerfTableLockWaits collects from `performance_schema.table_lock_waits_summary_by_table`.
func (ScrapePerfTableLockWaits) Help ¶ added in v0.11.0
func (ScrapePerfTableLockWaits) Help() string
Help describes the role of the Scraper.
func (ScrapePerfTableLockWaits) Name ¶ added in v0.11.0
func (ScrapePerfTableLockWaits) Name() string
Name of the Scraper. Should be unique.
func (ScrapePerfTableLockWaits) Scrape ¶ added in v0.11.0
func (ScrapePerfTableLockWaits) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapePerfTableLockWaits) Version ¶ added in v0.12.0
func (ScrapePerfTableLockWaits) Version() float64
Version of MySQL from which scraper is available.
type ScrapeProcesslist ¶
type ScrapeProcesslist struct{}
ScrapeProcesslist collects from `information_schema.processlist`.
func (ScrapeProcesslist) Help ¶ added in v0.11.0
func (ScrapeProcesslist) Help() string
Help describes the role of the Scraper.
func (ScrapeProcesslist) Name ¶ added in v0.11.0
func (ScrapeProcesslist) Name() string
Name of the Scraper. Should be unique.
func (ScrapeProcesslist) Scrape ¶ added in v0.11.0
func (ScrapeProcesslist) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeProcesslist) Version ¶ added in v0.12.0
func (ScrapeProcesslist) Version() float64
Version of MySQL from which scraper is available.
type ScrapeQueryResponseTime ¶
type ScrapeQueryResponseTime struct{}
ScrapeQueryResponseTime collects from `information_schema.query_response_time`.
func (ScrapeQueryResponseTime) Help ¶ added in v0.11.0
func (ScrapeQueryResponseTime) Help() string
Help describes the role of the Scraper.
func (ScrapeQueryResponseTime) Name ¶ added in v0.11.0
func (ScrapeQueryResponseTime) Name() string
Name of the Scraper. Should be unique.
func (ScrapeQueryResponseTime) Scrape ¶ added in v0.11.0
func (ScrapeQueryResponseTime) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeQueryResponseTime) Version ¶ added in v0.12.0
func (ScrapeQueryResponseTime) Version() float64
Version of MySQL from which scraper is available.
type ScrapeReplicaHost ¶ added in v0.13.0
type ScrapeReplicaHost struct{}
ScrapeReplicaHost collects from `information_schema.replica_host_status`.
func (ScrapeReplicaHost) Help ¶ added in v0.13.0
func (ScrapeReplicaHost) Help() string
Help describes the role of the Scraper.
func (ScrapeReplicaHost) Name ¶ added in v0.13.0
func (ScrapeReplicaHost) Name() string
Name of the Scraper. Should be unique.
func (ScrapeReplicaHost) Scrape ¶ added in v0.13.0
func (ScrapeReplicaHost) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeReplicaHost) Version ¶ added in v0.13.0
func (ScrapeReplicaHost) Version() float64
Version of MySQL from which scraper is available.
type ScrapeSchemaStat ¶ added in v0.12.0
type ScrapeSchemaStat struct{}
ScrapeSchemaStat collects from `information_schema.table_statistics` grouped by schema.
func (ScrapeSchemaStat) Help ¶ added in v0.12.0
func (ScrapeSchemaStat) Help() string
Help describes the role of the Scraper.
func (ScrapeSchemaStat) Name ¶ added in v0.12.0
func (ScrapeSchemaStat) Name() string
Name of the Scraper. Should be unique.
func (ScrapeSchemaStat) Scrape ¶ added in v0.12.0
func (ScrapeSchemaStat) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeSchemaStat) Version ¶ added in v0.12.0
func (ScrapeSchemaStat) Version() float64
Version of MySQL from which scraper is available.
type ScrapeSlaveHosts ¶ added in v0.11.0
type ScrapeSlaveHosts struct{}
ScrapeSlaveHosts scrapes metrics about the replicating slaves.
func (ScrapeSlaveHosts) Help ¶ added in v0.11.0
func (ScrapeSlaveHosts) Help() string
Help describes the role of the Scraper.
func (ScrapeSlaveHosts) Name ¶ added in v0.11.0
func (ScrapeSlaveHosts) Name() string
Name of the Scraper. Should be unique.
func (ScrapeSlaveHosts) Scrape ¶ added in v0.11.0
func (ScrapeSlaveHosts) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeSlaveHosts) Version ¶ added in v0.12.0
func (ScrapeSlaveHosts) Version() float64
Version of MySQL from which scraper is available.
type ScrapeSlaveStatus ¶
type ScrapeSlaveStatus struct{}
ScrapeSlaveStatus collects from `SHOW SLAVE STATUS`.
func (ScrapeSlaveStatus) Help ¶ added in v0.11.0
func (ScrapeSlaveStatus) Help() string
Help describes the role of the Scraper.
func (ScrapeSlaveStatus) Name ¶ added in v0.11.0
func (ScrapeSlaveStatus) Name() string
Name of the Scraper. Should be unique.
func (ScrapeSlaveStatus) Scrape ¶ added in v0.11.0
func (ScrapeSlaveStatus) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeSlaveStatus) Version ¶ added in v0.12.0
func (ScrapeSlaveStatus) Version() float64
Version of MySQL from which scraper is available.
type ScrapeSysUserSummary ¶ added in v0.15.0
type ScrapeSysUserSummary struct{}
func (ScrapeSysUserSummary) Help ¶ added in v0.15.0
func (ScrapeSysUserSummary) Help() string
Help describes the role of the Scraper.
func (ScrapeSysUserSummary) Name ¶ added in v0.15.0
func (ScrapeSysUserSummary) Name() string
Name of the Scraper. Should be unique.
func (ScrapeSysUserSummary) Scrape ¶ added in v0.15.0
func (ScrapeSysUserSummary) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape the information from sys.user_summary, creating a metric for each value of each row, labeled with the user
func (ScrapeSysUserSummary) Version ¶ added in v0.15.0
func (ScrapeSysUserSummary) Version() float64
Version of MySQL from which scraper is available.
type ScrapeTableSchema ¶
type ScrapeTableSchema struct{}
ScrapeTableSchema collects from `information_schema.tables`.
func (ScrapeTableSchema) Help ¶ added in v0.11.0
func (ScrapeTableSchema) Help() string
Help describes the role of the Scraper.
func (ScrapeTableSchema) Name ¶ added in v0.11.0
func (ScrapeTableSchema) Name() string
Name of the Scraper. Should be unique.
func (ScrapeTableSchema) Scrape ¶ added in v0.11.0
func (ScrapeTableSchema) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeTableSchema) Version ¶ added in v0.12.0
func (ScrapeTableSchema) Version() float64
Version of MySQL from which scraper is available.
type ScrapeTableStat ¶
type ScrapeTableStat struct{}
ScrapeTableStat collects from `information_schema.table_statistics`.
func (ScrapeTableStat) Help ¶ added in v0.11.0
func (ScrapeTableStat) Help() string
Help describes the role of the Scraper.
func (ScrapeTableStat) Name ¶ added in v0.11.0
func (ScrapeTableStat) Name() string
Name of the Scraper. Should be unique.
func (ScrapeTableStat) Scrape ¶ added in v0.11.0
func (ScrapeTableStat) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeTableStat) Version ¶ added in v0.12.0
func (ScrapeTableStat) Version() float64
Version of MySQL from which scraper is available.
type ScrapeUser ¶ added in v0.12.0
type ScrapeUser struct{}
ScrapeUser collects from `information_schema.processlist`.
func (ScrapeUser) Help ¶ added in v0.12.0
func (ScrapeUser) Help() string
Help describes the role of the Scraper.
func (ScrapeUser) Name ¶ added in v0.12.0
func (ScrapeUser) Name() string
Name of the Scraper. Should be unique.
func (ScrapeUser) Scrape ¶ added in v0.12.0
func (ScrapeUser) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeUser) Version ¶ added in v0.12.0
func (ScrapeUser) Version() float64
Version of MySQL from which scraper is available.
type ScrapeUserStat ¶
type ScrapeUserStat struct{}
ScrapeUserStat collects from `information_schema.user_statistics`.
func (ScrapeUserStat) Help ¶ added in v0.11.0
func (ScrapeUserStat) Help() string
Help describes the role of the Scraper.
func (ScrapeUserStat) Name ¶ added in v0.11.0
func (ScrapeUserStat) Name() string
Name of the Scraper. Should be unique.
func (ScrapeUserStat) Scrape ¶ added in v0.11.0
func (ScrapeUserStat) Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error
Scrape collects data from database connection and sends it over channel as prometheus metric.
func (ScrapeUserStat) Version ¶ added in v0.12.0
func (ScrapeUserStat) Version() float64
Version of MySQL from which scraper is available.
type Scraper ¶ added in v0.11.0
type Scraper interface { // Name of the Scraper. Should be unique. Name() string // Help describes the role of the Scraper. // Example: "Collect from SHOW ENGINE INNODB STATUS" Help() string // Version of MySQL from which scraper is available. Version() float64 // Scrape collects data from database connection and sends it over channel as prometheus metric. Scrape(ctx context.Context, instance *instance, ch chan<- prometheus.Metric, logger *slog.Logger) error }
Scraper is minimal interface that let's you add new prometheus metrics to mysqld_exporter.
Source Files ¶
- binlog.go
- collector.go
- engine_innodb.go
- engine_tokudb.go
- exporter.go
- global_status.go
- global_variables.go
- heartbeat.go
- info_schema.go
- info_schema_auto_increment.go
- info_schema_clientstats.go
- info_schema_innodb_cmp.go
- info_schema_innodb_cmpmem.go
- info_schema_innodb_metrics.go
- info_schema_innodb_sys_tablespaces.go
- info_schema_processlist.go
- info_schema_query_response_time.go
- info_schema_replica_host.go
- info_schema_schemastats.go
- info_schema_tables.go
- info_schema_tablestats.go
- info_schema_userstats.go
- instance.go
- mysql_user.go
- perf_schema.go
- perf_schema_events_statements.go
- perf_schema_events_statements_sum.go
- perf_schema_events_waits.go
- perf_schema_file_events.go
- perf_schema_file_instances.go
- perf_schema_index_io_waits.go
- perf_schema_memory_events.go
- perf_schema_replication_applier_status_by_worker.go
- perf_schema_replication_group_member_stats.go
- perf_schema_replication_group_members.go
- perf_schema_table_io_waits.go
- perf_schema_table_lock_waits.go
- scraper.go
- slave_hosts.go
- slave_status.go
- sys.go
- sys_user_summary.go