最近安装Prometheus+grafana做服务器监控,引用grafana官网的模板,发现有两个图表没有数据
如图
经过一系列排错,包括检查取值公式,检查公式内引用变量,换exporter版本。。。
最后得到结论:那是因为mysqld_exporter启动参数少东西了
具体参数以及意义如下
启动参数 | MySQL版本 | 参数含义 |
---|---|---|
collect.auto_increment.columns | 5.1 + | 从information_schema收集auto_increment列和最大值。 |
collect.binlog_size | 5.1+ | 收集所有已注册的Binlog文件的当前大小 |
collect.engine_innodb_status | 5.1+ | 通过SHOW ENGINE INNODB STATUS收集数据 |
collect.engine_tokudb_status | 5.6+ | 通过SHOW ENGINE TOKUDB STATUS.收集数据 |
collect.global_status | 5.1+ | 通过SHOW GLOBAL STATUS 收集数据(默认开启) |
collect.global_variables | 5.1+ | 通过SHOW GLOBAL VARIABLES收集数据(默认开启) |
collect.info_schema.clientstats | 5.5+ | 如果被监控的MySQL使用userstat = 1运行,则此参数需要设置为1以收集客户端统计信息 |
collect.info_schema.innodb_metrics | 5.6+ | 从information_schema.innodb_metrics收集数据。 |
collect.info_schema.innodb_tablespaces | 5.7+ | 从information_schema.innodb_sys_tablespaces收集数据。 |
collect.info_schema.innodb_cmp | 5.5+ | 从information_schema.innodb_cmp收集InnoDB压缩表指标。 |
collect.info_schema.innodb_cmpmem | 5.5+ | 从information_schema.innodb_cmpmem收集InnoDB缓冲池。 |
collect.info_schema.processlist | 5.1+ | 从information_schema.processlist收集线程状态计数。 |
collect.info_schema.processlist.min_time | 5.1+ | 线程状态停留多长时间会被统计。(默认值:0) |
collect.info_schema.query_response_time | 5.5+ | 如果query_response_time_stats为ON,则收集查询响应时间。 |
collect.info_schema.replica_host | 5.6+ | 从information_schema.replica_host_status收集数据。 |
collect.info_schema.tables | 5.1+ | 从information_schema.tables中收集数据。 |
collect.info_schema.tables.databases | 5.1+ | 收集表统计信息的数据库列表,或*全部为’的数据库 |
collect.info_schema.tablestats | 5.1+ | 如果被监控的MySQL使用userstat = 1运行,则设置为true以收集表统计信息。 |
collect.info_schema.schemastats | 5.1+ | 如果被监控的MySQL使用userstat = 1运行,则设置为true以收集架构统计信息 |
collect.info_schema.userstats | 5.1+ | 如果被监控的MySQL使用userstat = 1运行,则设置为true以收集用户统计信息。 |
collect.perf_schema.eventsstatements | 5.6+ | 从performance_schema.events_statements_summary_by_digest收集数据。 |
collect.perf_schema.eventsstatements.digest_text_limit | 5.6+ | 规范化语句文本的最大长度。(默认值:120) |
collect.perf_schema.eventsstatements.limit | 5.6+ | 通过响应时间限制事件语句摘要的数量。(预设值:250) |
collect.perf_schema.eventsstatements.timelimit | 5.6+ | 限制“ last_seen”事件语句的年龄(以秒为单位)。(预设值:86400) |
collect.perf_schema.eventsstatementssum | 5.7+ | 从Performance_schema.events_statements_summary_by_digest汇总中收集指标。 |
collect.perf_schema.eventswaits | 5.5+ | 从Performance_schema.events_waits_summary_global_by_event_name收集指标。 |
collect.perf_schema.file_events | 5.6+ | 从Performance_schema.file_summary_by_event_name收集指标。 |
collect.perf_schema.file_instances | 5.5+ | 从performance_schema.file_summary_by_instance收集指标。 |
collect.perf_schema.indexiowaits | 5.6+ | 从performance_schema.table_io_waits_summary_by_index_usage收集指标。 |
collect.perf_schema.tableiowaits | 5.6+ | 从Performance_schema.table_io_waits_summary_by_table收集指标。 |
collect.perf_schema.tablelocks | 5.6+ | 从Performance_schema.table_lock_waits_summary_by_table收集指标。 |
collect.perf_schema.replication_group_members | 5.7+ | 从Performance_schema.replication_group_members收集指标。 |
collect.perf_schema.replication_group_member_stats | 5.7 + | 从Performance_schema.replication_group_member_stats收集指标。 |
collect.perf_schema.replication_applier_status_by_worker | 5.7+ | 从performance_schema.replication_applier_status_by_worker收集指标。 |
collect.slave_status | 5.1+ | 从SHOW SLAVE STATUS收集(默认情况下启用) |
collect.slave_hosts | 5.1+ | 从SHOW SLAVE HOSTS收集 |
collect.heartbeat | 5.1+ | 从心跳中收集。 |
collect.heartbeat.database | 5.1+ | 从中收集心跳数据的数据库。(默认值:心跳) |
collect.heartbeat.table | 5.1+ | 从何处收集心跳数据的表。(默认值:心跳) |