usage: mysqld_exporter [<flags>]
Flags:
-h, --[no-]help Show context-sensitive help (also try --help-long and --help-man).
--exporter.lock_wait_timeout=2
Set a lock_wait_timeout (in seconds) on the connection to avoid
long metadata locking.
--[no-]exporter.log_slow_filter
Add a log_slow_filter to avoid slow query logging of scrapes. NOTE:
Not supported by Oracle MySQL.
--[no-]collector.failures.error
Log collector failures as errors (Debug by default)
--collect.heartbeat.database="heartbeat"
Database from where to collect heartbeat data
--collect.heartbeat.table="heartbeat"
Table from where to collect heartbeat data
--[no-]collect.heartbeat.utc
Use UTC for timestamps of the current server (`pt-heartbeat` is
called with `--utc`)
--collect.info_schema.processlist.min_time.prometheus=0
Minimum time a thread must be in each state to be counted
--[no-]collect.info_schema.processlist.processes_by_user
Enable collecting the number of processes by user
--[no-]collect.info_schema.processlist.processes_by_host
Enable collecting the number of processes by host
--collect.info_schema.tables.databases="*"
The list of databases to collect table stats for, or '*' for all
--exporter.max-open-conns=3
Maximum number of open connections to the database.
https://golang.org/pkg/database/sql/#DB.SetMaxOpenConns
--exporter.max-idle-conns=3
Maximum number of connections in the idle connection pool.
https://golang.org/pkg/database/sql/#DB.SetMaxIdleConns
--exporter.conn-max-lifetime=1m
Maximum amount of time a connection may be reused.
https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime
--[no-]collect.mysql.user.privileges
Enable collecting user privileges from mysql.user
--collect.custom_query.lr.directory=COLLECT.CUSTOM_QUERY.LR.DIRECTORY
Path to custom queries with low resolution directory.
--collect.custom_query.mr.directory=COLLECT.CUSTOM_QUERY.MR.DIRECTORY
Path to custom queries with medium resolution directory.
--collect.custom_query.hr.directory=COLLECT.CUSTOM_QUERY.HR.DIRECTORY
Path to custom queries with high resolution directory.
--collect.info_schema.processlist.min_time=0
Minimum time a thread must be in each state to be counted
--collect.perf_schema.eventsstatements.limit=250
Limit the number of events statements digests by response time
--collect.perf_schema.eventsstatements.timelimit=86400
Limit how old the 'last_seen' events statements can be, in seconds
--collect.perf_schema.eventsstatements.digest_text_limit=120
Maximum length of the normalized statement text
--collect.perf_schema.file_instances.filter=".*"
RegEx file_name filter for
performance_schema.file_summary_by_instance
--collect.perf_schema.file_instances.remove_prefix="/var/lib/mysql/"
Remove path prefix in performance_schema.file_summary_by_instance
--collect.perf_schema.memory_events.remove_prefix="memory/"
Remove instrument prefix in
performance_schema.memory_summary_global_by_event_name
--web.telemetry-path="/metrics"
Path under which to expose metrics.
--timeout-offset=0.25 Offset to subtract from timeout in seconds.
--config.my-cnf="/tmp/.my.cnf"
Path to .my.cnf file to read MySQL credentials from.
--mysqld.address="localhost:3306"
Address to use for connecting to MySQL
--mysqld.username=MYSQLD.USERNAME
Username to use for connecting to MySQL
--[no-]tls.insecure-skip-verify
Ignore certificate and server verification when using a tls
connection.
--[no-]collect.all Collect all metrics.
--[no-]web.systemd-socket Use systemd socket activation listeners instead of port listeners
(Linux only).
--web.listen-address=:9104 ...
Addresses on which to expose metrics and web interface. Repeatable
for multiple addresses. Examples: `:9100` or `[::1]:9100` for http,
`vsock://:9100` for vsock
--web.config.file="" Path to configuration file that can
enable TLS or authentication. See:
https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md
--[no-]collect.perf_schema.replication_applier_status_by_worker
Collect metrics from
performance_schema.replication_applier_status_by_worker
--[no-]collect.sys.user_summary
Collect per user metrics from sys.x$user_summary. See
https://dev.mysql.com/doc/refman/5.7/en/sys-user-summary.html for
details
--[no-]collect.info_schema.userstats
If running with userstat=1, set to true to collect user statistics
--[no-]collect.info_schema.clientstats
If running with userstat=1, set to true to collect client
statistics
--[no-]collect.info_schema.tablestats
If running with userstat=1, set to true to collect table statistics
--[no-]collect.info_schema.schemastats
If running with userstat=1, set to true to collect schema
statistics
--[no-]collect.info_schema.innodb_cmp
Please set next variables SET GLOBAL innodb_file_per_table=1;SET
GLOBAL innodb_file_format=Barracuda;
--[no-]collect.info_schema.innodb_cmp.prometheus
Collect metrics from information_schema.innodb_cmp
--[no-]collect.custom_query.hr
Collect the metrics from custom queries for hr resolution.
--[no-]collect.custom_query.mr
Collect the metrics from custom queries for mr resolution.
--[no-]collect.global_status
Collect from SHOW GLOBAL STATUS
--[no-]collect.global_status.prometheus
Collect from SHOW GLOBAL STATUS
--[no-]collect.global_variables
Collect from SHOW GLOBAL VARIABLES
--[no-]collect.plugins Collect from SHOW PLUGINS
--[no-]collect.slave_status
Collect from SHOW SLAVE STATUS
--[no-]collect.info_schema.processlist
Collect current thread state counts from the
information_schema.processlist
--[no-]collect.info_schema.processlist.prometheus
Collect current thread state counts from the
information_schema.processlist
--[no-]collect.mysql.user Collect data from mysql.user
--[no-]collect.info_schema.tables
Collect metrics from information_schema.tables
--[no-]collect.info_schema.innodb_tablespaces
Collect metrics from information_schema.innodb_sys_tablespaces
--[no-]collect.info_schema.innodb_metrics
Collect metrics from information_schema.innodb_metrics
--[no-]collect.auto_increment.columns
Collect auto_increment columns and max values from
information_schema
--[no-]collect.binlog_size
Collect the current size of all registered binlog files
--[no-]collect.perf_schema.tableiowaits
Collect metrics from
performance_schema.table_io_waits_summary_by_table
--[no-]collect.perf_schema.indexiowaits
Collect metrics from
performance_schema.table_io_waits_summary_by_index_usage
--[no-]collect.perf_schema.tablelocks
Collect metrics from
performance_schema.table_lock_waits_summary_by_table
--[no-]collect.info_schema.innodb_cmpmem
Collect metrics from information_schema.innodb_cmpmem
--[no-]collect.info_schema.innodb_cmpmem.prometheus
Collect metrics from information_schema.innodb_cmpmem
--[no-]collect.info_schema.query_response_time
Collect query response time distribution if
query_response_time_stats is ON.
--[no-]collect.engine_tokudb_status
Collect from SHOW ENGINE TOKUDB STATUS
--[no-]collect.engine_innodb_status
Collect from SHOW ENGINE INNODB STATUS
--[no-]collect.heartbeat Collect from heartbeat
--[no-]collect.slave_hosts
Scrape information from 'SHOW SLAVE HOSTS'
--[no-]collect.info_schema.replica_host
Collect metrics from information_schema.replica_host_status
--[no-]collect.perf_schema.eventsstatements
Collect metrics from
performance_schema.events_statements_summary_by_digest
--[no-]collect.perf_schema.eventsstatementssum
Collect metrics of grand sums from
performance_schema.events_statements_summary_by_digest
--[no-]collect.perf_schema.eventswaits
Collect metrics from
performance_schema.events_waits_summary_global_by_event_name
--[no-]collect.perf_schema.file_events
Collect metrics from performance_schema.file_summary_by_event_name
--[no-]collect.perf_schema.file_instances
Collect metrics from performance_schema.file_summary_by_instance
--[no-]collect.perf_schema.memory_events
Collect metrics from
performance_schema.memory_summary_global_by_event_name
--[no-]collect.perf_schema.replication_group_members
Collect metrics from performance_schema.replication_group_members
--[no-]collect.perf_schema.replication_group_member_stats
Collect metrics from
performance_schema.replication_group_member_stats
--[no-]collect.custom_query.lr
Collect the metrics from custom queries for lr resolution.
--[no-]collect.standard.go
Collect exporter Go process metrics
--[no-]collect.standard.process
Collect exporter process metrics
--log.level=info Only log messages with the given severity or above. One of: [debug,
info, warn, error]
--log.format=logfmt Output format of log messages. One of: [logfmt, json]
--[no-]version Show application version.
Options (28)
| Option | Description | Source |
|---|---|---|
-h | Show context-sensitive help (also try --help-long and --help-man). | help |
--exporter.lock_wait_timeout 2 | Set a lock_wait_timeout (in seconds) on the connection to avoid long metadata locking. | help |
--collect.heartbeat.database "heartbeat" | Database from where to collect heartbeat data | help |
--collect.heartbeat.table "heartbeat" | Table from where to collect heartbeat data | help |
--collect.info_schema.processlist.min_time.prometheus 0 | Minimum time a thread must be in each state to be counted | help |
--collect.info_schema.tables.databases "*" | The list of databases to collect table stats for, or '*' for all | help |
--exporter.max-open-conns 3 | Maximum number of open connections to the database. | help |
--exporter.max-idle-conns 3 | Maximum number of connections in the idle connection pool. | help |
--exporter.conn-max-lifetime 1m | Maximum amount of time a connection may be reused. | help |
--collect.custom_query.lr.directory COLLECT.CUSTOM_QUERY.LR.DIRECTORY | Path to custom queries with low resolution directory. | help |
--collect.custom_query.mr.directory COLLECT.CUSTOM_QUERY.MR.DIRECTORY | Path to custom queries with medium resolution directory. | help |
--collect.custom_query.hr.directory COLLECT.CUSTOM_QUERY.HR.DIRECTORY | Path to custom queries with high resolution directory. | help |
--collect.info_schema.processlist.min_time 0 | Minimum time a thread must be in each state to be counted | help |
--collect.perf_schema.eventsstatements.limit 250 | Limit the number of events statements digests by response time | help |
--collect.perf_schema.eventsstatements.timelimit 86400 | Limit how old the 'last_seen' events statements can be, in seconds | help |
--collect.perf_schema.eventsstatements.digest_text_limit 120 | Maximum length of the normalized statement text | help |
--collect.perf_schema.file_instances.filter ".*" | RegEx file_name filter for performance_schema.file_summary_by_instance | help |
--collect.perf_schema.file_instances.remove_prefix "/var/lib/mysql/" | Remove path prefix in performance_schema.file_summary_by_instance | help |
--collect.perf_schema.memory_events.remove_prefix "memory/" | Remove instrument prefix in performance_schema.memory_summary_global_by_event_name | help |
--web.telemetry-path "/metrics" | Path under which to expose metrics. | help |
--timeout-offset 0.25 | Offset to subtract from timeout in seconds. | help |
--config.my-cnf "/tmp/.my.cnf" | Path to .my.cnf file to read MySQL credentials from. | help |
--mysqld.address "localhost:3306" | Address to use for connecting to MySQL | help |
--mysqld.username MYSQLD.USERNAME | Username to use for connecting to MySQL | help |
--web.listen-address :9104 | Addresses on which to expose metrics and web interface. | help |
--web.config.file "" | Path to configuration file that can enable TLS or authentication. | help |
--log.level info | Only log messages with the given severity or above. | help |
--log.format logfmt | Output format of log messages. | help |