influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.59k stars 5.56k forks source link

MySQL - Slave status is not provided #3822

Closed nsteinmetz closed 6 years ago

nsteinmetz commented 6 years ago

Bug report

Relevant telegraf.conf:

[[inputs.mysql]]
servers = ["<user>:<password>@unix(/var/run/mysqld/mysqld.sock)/"]

System info:

*************************** 1. row ***************************
               Slave_IO_State: Queueing master event to the relay log
                  Master_Host: 192.168.0.4
                  Master_User: replication_user
                  Master_Port: 3306
                Connect_Retry: 10
              Master_Log_File: mysql-bin.000098
          Read_Master_Log_Pos: 17147137
               Relay_Log_File: mysql-relay-bin.000004
                Relay_Log_Pos: 97656596
        Relay_Master_Log_File: mysql-bin.000097
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB:
          Replicate_Ignore_DB:
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 0
                   Last_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 97656308
              Relay_Log_Space: 122006690
              Until_Condition: None
               Until_Log_File:
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File:
           Master_SSL_CA_Path:
              Master_SSL_Cert:
            Master_SSL_Cipher:
               Master_SSL_Key:
        Seconds_Behind_Master: 3639
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 0
               Last_SQL_Error:
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 1
               Master_SSL_Crl:
           Master_SSL_Crlpath:
                   Using_Gtid: Current_Pos
                  Gtid_IO_Pos: 0-1-25599184
      Replicate_Do_Domain_Ids:
  Replicate_Ignore_Domain_Ids:
                Parallel_Mode: conservative

Steps to reproduce:

Apply setup Wait for data to be fetched

slave_ expected columns are not present.

> select * from mysql where host='codb2d9' limit 1;
name: mysql
time                aborted_clients aborted_connects access_denied_errors busy_time bytes_received bytes_sent commands_admin_commands commands_alter_db commands_alter_db_upgrade commands_alter_event commands_alter_function commands_alter_procedure commands_alter_server commands_alter_table commands_alter_tablespace commands_analyze commands_assign_to_keycache commands_begin commands_binlog commands_call_procedure commands_change_db commands_change_master commands_check commands_checksum commands_commit commands_compound_sql commands_create_db commands_create_event commands_create_function commands_create_index commands_create_procedure commands_create_role commands_create_server commands_create_table commands_create_temporary_table commands_create_trigger commands_create_udf commands_create_user commands_create_view commands_dealloc_sql commands_delete commands_delete_multi commands_do commands_drop_db commands_drop_event commands_drop_function commands_drop_index commands_drop_procedure commands_drop_role commands_drop_server commands_drop_table commands_drop_temporary_table commands_drop_trigger commands_drop_user commands_drop_view commands_empty_query commands_execute_sql commands_flush commands_get_diagnostics commands_grant commands_grant_role commands_ha_close commands_ha_open commands_ha_read commands_help commands_insert commands_insert_select commands_install_plugin commands_kill commands_load commands_lock_tables commands_optimize commands_preload_keys commands_prepare_sql commands_purge commands_purge_before_date commands_release_savepoint commands_rename_table commands_rename_user commands_repair commands_replace commands_replace_select commands_reset commands_resignal commands_revoke commands_revoke_all commands_revoke_role commands_rollback commands_rollback_to_savepoint commands_savepoint commands_select commands_set_option commands_show_authors commands_show_binlog_events commands_show_binlogs commands_show_charsets commands_show_client_statistics commands_show_collations commands_show_contributors commands_show_create_db commands_show_create_event commands_show_create_func commands_show_create_proc commands_show_create_table commands_show_create_trigger commands_show_databases commands_show_engine_logs commands_show_engine_mutex commands_show_engine_status commands_show_errors commands_show_events commands_show_explain commands_show_fields commands_show_function_status commands_show_generic commands_show_grants commands_show_index_statistics commands_show_keys commands_show_master_status commands_show_open_tables commands_show_plugins commands_show_privileges commands_show_procedure_status commands_show_processlist commands_show_profile commands_show_profiles commands_show_relaylog_events commands_show_slave_hosts commands_show_slave_status commands_show_status commands_show_storage_engines commands_show_table_statistics commands_show_table_status commands_show_tables commands_show_triggers commands_show_user_statistics commands_show_variables commands_show_warnings commands_shutdown commands_signal commands_start_all_slaves commands_start_slave commands_stmt_close commands_stmt_execute commands_stmt_fetch commands_stmt_prepare commands_stmt_reprepare commands_stmt_reset commands_stmt_send_long_data commands_stop_all_slaves commands_stop_slave commands_truncate commands_uninstall_plugin commands_unlock_tables commands_update commands_update_multi commands_xa_commit commands_xa_end commands_xa_prepare commands_xa_recover commands_xa_rollback commands_xa_start connection_errors_accept connection_errors_internal connection_errors_max_connections connection_errors_peer_address connection_errors_select connection_errors_tcpwrap connections created_tmp_disk_tables created_tmp_files created_tmp_tables delayed_errors delayed_insert_threads delayed_writes empty_queries executed_events executed_triggers feature_delay_key_write feature_dynamic_columns feature_fulltext feature_gis feature_locale feature_subquery feature_timezone feature_trigger feature_xml flush_commands handler_commit handler_delete handler_discover handler_external_lock handler_icp_attempts handler_icp_match handler_mrr_init handler_mrr_key_refills handler_mrr_rowid_refills handler_prepare handler_read_first handler_read_key handler_read_last handler_read_next handler_read_prev handler_read_retry handler_read_rnd handler_read_rnd_deleted handler_read_rnd_next handler_rollback handler_savepoint handler_savepoint_rollback handler_tmp_update handler_tmp_write handler_update handler_write host    innodb_available_undo_logs innodb_background_log_sync innodb_buffer_pool_bytes_data innodb_buffer_pool_bytes_dirty innodb_buffer_pool_dump_status innodb_buffer_pool_load_status innodb_buffer_pool_pages_data innodb_buffer_pool_pages_dirty innodb_buffer_pool_pages_flushed innodb_buffer_pool_pages_free innodb_buffer_pool_pages_lru_flushed innodb_buffer_pool_pages_made_not_young innodb_buffer_pool_pages_made_young innodb_buffer_pool_pages_misc innodb_buffer_pool_pages_old innodb_buffer_pool_pages_total innodb_buffer_pool_read_ahead innodb_buffer_pool_read_ahead_evicted innodb_buffer_pool_read_ahead_rnd innodb_buffer_pool_read_requests innodb_buffer_pool_reads innodb_buffer_pool_wait_free innodb_buffer_pool_write_requests innodb_checkpoint_age innodb_checkpoint_max_age innodb_data_fsyncs innodb_data_pending_fsyncs innodb_data_pending_reads innodb_data_pending_writes innodb_data_read innodb_data_reads innodb_data_writes innodb_data_written innodb_dblwr_pages_written innodb_dblwr_writes innodb_deadlocks innodb_defragment_compression_failures innodb_defragment_count innodb_defragment_failures innodb_encryption_key_rotation_list_length innodb_encryption_num_key_requests innodb_encryption_rotation_estimated_iops innodb_encryption_rotation_pages_flushed innodb_encryption_rotation_pages_modified innodb_encryption_rotation_pages_read_from_cache innodb_encryption_rotation_pages_read_from_disk innodb_have_atomic_builtins innodb_have_bzip2 innodb_have_lz4 innodb_have_lzma innodb_have_lzo innodb_have_snappy innodb_history_list_length innodb_ibuf_discarded_delete_marks innodb_ibuf_discarded_deletes innodb_ibuf_discarded_inserts innodb_ibuf_free_list innodb_ibuf_merged_delete_marks innodb_ibuf_merged_deletes innodb_ibuf_merged_inserts innodb_ibuf_merges innodb_ibuf_segment_size innodb_ibuf_size innodb_log_waits innodb_log_write_requests innodb_log_writes innodb_lsn_current innodb_lsn_flushed innodb_lsn_last_checkpoint innodb_master_thread_active_loops innodb_master_thread_idle_loops innodb_max_trx_id innodb_mem_adaptive_hash innodb_mem_dictionary innodb_mem_total innodb_mutex_os_waits innodb_mutex_spin_rounds innodb_mutex_spin_waits innodb_num_index_pages_written innodb_num_non_index_pages_written innodb_num_page_compressed_trim_op innodb_num_page_compressed_trim_op_saved innodb_num_pages_decrypted innodb_num_pages_encrypted innodb_num_pages_page_compressed innodb_num_pages_page_compression_error innodb_num_pages_page_decompressed innodb_oldest_view_low_limit_trx_id innodb_onlineddl_pct_progress innodb_onlineddl_rowlog_pct_used innodb_onlineddl_rowlog_rows innodb_os_log_fsyncs innodb_os_log_pending_fsyncs innodb_os_log_pending_writes innodb_os_log_written innodb_page_compression_saved innodb_page_compression_trim_sect1024 innodb_page_compression_trim_sect16384 innodb_page_compression_trim_sect2048 innodb_page_compression_trim_sect32768 innodb_page_compression_trim_sect4096 innodb_page_compression_trim_sect512 innodb_page_compression_trim_sect8192 innodb_page_size innodb_pages0_read innodb_pages_created innodb_pages_read innodb_pages_written innodb_purge_trx_id innodb_purge_undo_no innodb_read_views_memory innodb_row_lock_current_waits innodb_row_lock_time innodb_row_lock_time_avg innodb_row_lock_time_max innodb_row_lock_waits innodb_rows_deleted innodb_rows_inserted innodb_rows_read innodb_rows_updated innodb_s_lock_os_waits innodb_s_lock_spin_rounds innodb_s_lock_spin_waits innodb_scrub_background_page_reorganizations innodb_scrub_background_page_split_failures_missing_index innodb_scrub_background_page_split_failures_out_of_filespace innodb_scrub_background_page_split_failures_underflow innodb_scrub_background_page_split_failures_unknown innodb_scrub_background_page_splits innodb_secondary_index_triggered_cluster_reads innodb_secondary_index_triggered_cluster_reads_avoided innodb_system_rows_deleted innodb_system_rows_inserted innodb_system_rows_read innodb_system_rows_updated innodb_truncated_status_writes innodb_x_lock_os_waits innodb_x_lock_spin_rounds innodb_x_lock_spin_waits key_blocks_not_flushed key_blocks_unused key_blocks_used key_blocks_warm key_read_requests key_reads key_write_requests key_writes last_query_cost master_gtid_wait_count master_gtid_wait_time master_gtid_wait_timeouts max_statement_time_exceeded max_used_connections memory_used not_flushed_delayed_rows open_files open_streams open_table_definitions open_tables opened_files opened_plugin_libraries opened_table_definitions opened_tables opened_views performance_schema_accounts_lost performance_schema_cond_classes_lost performance_schema_cond_instances_lost performance_schema_digest_lost performance_schema_file_classes_lost performance_schema_file_handles_lost performance_schema_file_instances_lost performance_schema_hosts_lost performance_schema_locker_lost performance_schema_mutex_classes_lost performance_schema_mutex_instances_lost performance_schema_rwlock_classes_lost performance_schema_rwlock_instances_lost performance_schema_session_connect_attrs_lost performance_schema_socket_classes_lost performance_schema_socket_instances_lost performance_schema_stage_classes_lost performance_schema_statement_classes_lost performance_schema_table_handles_lost performance_schema_table_instances_lost performance_schema_thread_classes_lost performance_schema_thread_instances_lost performance_schema_users_lost prepared_stmt_count qcache_free_blocks qcache_free_memory qcache_hits qcache_inserts qcache_lowmem_prunes qcache_not_cached qcache_queries_in_cache qcache_total_blocks queries questions rows_read rows_sent rows_tmp_read rpl_status select_full_join select_full_range_join select_range select_range_check select_scan server                      slave_connections slave_heartbeat_period slave_open_temp_tables slave_received_heartbeats slave_retried_transactions slave_running slave_skipped_errors slow_launch_threads slow_queries sort_merge_passes sort_priority_queue_sorts sort_range sort_rows sort_scan subquery_cache_hit subquery_cache_miss syncs table_locks_immediate table_locks_waited tc_log_max_pages_used tc_log_page_size tc_log_page_waits threadpool_idle_threads threadpool_threads threads_cached threads_connected threads_created threads_running uptime uptime_since_flush_status wsrep_cluster_conf_id wsrep_cluster_size wsrep_cluster_state_uuid wsrep_cluster_status wsrep_connected wsrep_local_bf_aborts wsrep_local_index   wsrep_provider_name wsrep_provider_vendor wsrep_provider_version wsrep_ready wsrep_thread_count
----                --------------- ---------------- -------------------- --------- -------------- ---------- ----------------------- ----------------- ------------------------- -------------------- ----------------------- ------------------------ --------------------- -------------------- ------------------------- ---------------- --------------------------- -------------- --------------- ----------------------- ------------------ ---------------------- -------------- ----------------- --------------- --------------------- ------------------ --------------------- ------------------------ --------------------- ------------------------- -------------------- ---------------------- --------------------- ------------------------------- ----------------------- ------------------- -------------------- -------------------- -------------------- --------------- --------------------- ----------- ---------------- ------------------- ---------------------- ------------------- ----------------------- ------------------ -------------------- ------------------- ----------------------------- --------------------- ------------------ ------------------ -------------------- -------------------- -------------- ------------------------ -------------- ------------------- ----------------- ---------------- ---------------- ------------- --------------- ---------------------- ----------------------- ------------- ------------- -------------------- ----------------- --------------------- -------------------- -------------- -------------------------- -------------------------- --------------------- -------------------- --------------- ---------------- ----------------------- -------------- ----------------- --------------- ------------------- -------------------- ----------------- ------------------------------ ------------------ --------------- ------------------- --------------------- --------------------------- --------------------- ---------------------- ------------------------------- ------------------------ -------------------------- ----------------------- -------------------------- ------------------------- ------------------------- -------------------------- ---------------------------- ----------------------- ------------------------- -------------------------- --------------------------- -------------------- -------------------- --------------------- -------------------- ----------------------------- --------------------- -------------------- ------------------------------ ------------------ --------------------------- ------------------------- --------------------- ------------------------ ------------------------------ ------------------------- --------------------- ---------------------- ----------------------------- ------------------------- -------------------------- -------------------- ----------------------------- ------------------------------ -------------------------- -------------------- ---------------------- ----------------------------- ----------------------- ---------------------- ----------------- --------------- ------------------------- -------------------- ------------------- --------------------- ------------------- --------------------- ----------------------- ------------------- ---------------------------- ------------------------ ------------------- ----------------- ------------------------- ---------------------- --------------- --------------------- ------------------ --------------- ------------------- ------------------- -------------------- ----------------- ------------------------ -------------------------- --------------------------------- ------------------------------ ------------------------ ------------------------- ----------- ----------------------- ----------------- ------------------ -------------- ---------------------- -------------- ------------- --------------- ----------------- ----------------------- ----------------------- ---------------- ----------- -------------- ---------------- ---------------- --------------- ----------- -------------- -------------- -------------- ---------------- --------------------- -------------------- ----------------- ---------------- ----------------------- ------------------------- --------------- ------------------ ---------------- ----------------- ----------------- ----------------- ------------------ ---------------- ------------------------ --------------------- ---------------- ----------------- -------------------------- ------------------ ----------------- -------------- ------------- ----    -------------------------- -------------------------- ----------------------------- ------------------------------ ------------------------------ ------------------------------ ----------------------------- ------------------------------ -------------------------------- ----------------------------- ------------------------------------ --------------------------------------- ----------------------------------- ----------------------------- ---------------------------- ------------------------------ ----------------------------- ------------------------------------- --------------------------------- -------------------------------- ------------------------ ---------------------------- --------------------------------- --------------------- ------------------------- ------------------ -------------------------- ------------------------- -------------------------- ---------------- ----------------- ------------------ ------------------- -------------------------- ------------------- ---------------- -------------------------------------- ----------------------- -------------------------- ------------------------------------------ ---------------------------------- ----------------------------------------- ---------------------------------------- ----------------------------------------- ------------------------------------------------ ----------------------------------------------- --------------------------- ----------------- --------------- ---------------- --------------- ------------------ -------------------------- ---------------------------------- ----------------------------- ----------------------------- --------------------- ------------------------------- -------------------------- -------------------------- ------------------ ------------------------ ---------------- ---------------- ------------------------- ----------------- ------------------ ------------------ -------------------------- --------------------------------- ------------------------------- ----------------- ------------------------ --------------------- ---------------- --------------------- ------------------------ ----------------------- ------------------------------ ---------------------------------- ---------------------------------- ---------------------------------------- -------------------------- -------------------------- -------------------------------- --------------------------------------- ---------------------------------- ----------------------------------- ----------------------------- -------------------------------- ---------------------------- -------------------- ---------------------------- ---------------------------- --------------------- ----------------------------- ------------------------------------- -------------------------------------- ------------------------------------- -------------------------------------- ------------------------------------- ------------------------------------ ------------------------------------- ---------------- ------------------ -------------------- ----------------- -------------------- ------------------- -------------------- ------------------------ ----------------------------- -------------------- ------------------------ ------------------------ --------------------- ------------------- -------------------- ---------------- ------------------- ---------------------- ------------------------- ------------------------ -------------------------------------------- --------------------------------------------------------- ------------------------------------------------------------ ----------------------------------------------------- --------------------------------------------------- ----------------------------------- ---------------------------------------------- ------------------------------------------------------ -------------------------- --------------------------- ----------------------- -------------------------- ------------------------------ ---------------------- ------------------------- ------------------------ ---------------------- ----------------- --------------- --------------- ----------------- --------- ------------------ ---------- --------------- ---------------------- --------------------- ------------------------- --------------------------- -------------------- ----------- ------------------------ ---------- ------------ ---------------------- ----------- ------------ ----------------------- ------------------------ ------------- ------------ -------------------------------- ------------------------------------ -------------------------------------- ------------------------------ ------------------------------------ ------------------------------------ -------------------------------------- ----------------------------- ------------------------------ ------------------------------------- --------------------------------------- -------------------------------------- ---------------------------------------- --------------------------------------------- -------------------------------------- ---------------------------------------- ------------------------------------- ----------------------------------------- ------------------------------------- --------------------------------------- -------------------------------------- ---------------------------------------- ----------------------------- ------------------- ------------------ ------------------ ----------- -------------- -------------------- ----------------- ----------------------- ------------------- ------- --------- --------- --------- ------------- ---------- ---------------- ---------------------- ------------ ------------------ ----------- ------                      ----------------- ---------------------- ---------------------- ------------------------- -------------------------- ------------- -------------------- ------------------- ------------ ----------------- ------------------------- ---------- --------- --------- ------------------ ------------------- ----- --------------------- ------------------ --------------------- ---------------- ----------------- ----------------------- ------------------ -------------- ----------------- --------------- --------------- ------ ------------------------- --------------------- ------------------ ------------------------ -------------------- --------------- --------------------- -----------------   ------------------- --------------------- ---------------------- ----------- ------------------
1516701600000000000 0               0                0                    0         139            195        0                       0                 0                         0                    0                       0                        0                     0                    0                         0                0                           0              0               0                       0                  0                      0              0                 0               0                     0                  0                     0                        0                     0                         0                    0                      0                     0                               0                       0                   0                    0                    0                    0               0                     0           0                0                   0                      0                   0                       0                  0                    0                   0                             0                     0                  0                  0                    0                    0              0                        0              0                   0                 0                0                0             0               0                      0                       0             0             0                    0                 0                     0                    0              0                          0                          0                     0                    0               0                0                       0              0                 0               0                   0                    0                 0                              0                  1               0                   0                     0                           0                     0                                                      0                        0                          0                       0                          0                         0                         0                          0                            0                       0                         0                          0                           0                    0                    0                     0                    0                             0                     0                                                   0                  0                           0                         0                     0                        0                              0                         0                     0                      0                             0                         0                          1                    0                                                            0                          0                    0                                                    0                       0                      0                 0               0                         0                    0                   0                     0                   0                     0                       0                   0                            0                        0                   0                 0                         0                      0               0                     0                  0               0                   0                   0                    0                 0                        0                          0                                 0                              0                        0                         3           0                       6                 1                  0              0                      0              0             0               0                 0                       0                       0                0           0              0                0                0               0           1              0              0              0                0                     0                    0                 0                0                       0                         0               1                  0                0                 0                 0                 0                  0                0                        1                     0                0                 0                          0                  0                 0              0             codb2d9 128                        6                          2572288                       0                              0                              0                              157                           0                              1                                8034                          0                                    0                                       0                                   0                             0                            8191                           0                             0                                     0                                 420                              158                      0                            1                                 0                     80826164                  5                  0                          0                         0                          2658816          172               5                  34304               1                          1                   0                0                                      0                       0                          0                                          0                                  0                                         0                                        0                                         0                                                0                                               0                           0                 0               0                0               0                  0                          0                                  0                             0                             0                     0                               0                          0                          0                  2                        1                0                0                         1                 1616975            1616975            1616975                    1                                 5                               8964              2217568                  629551                140574720        1                     30                       1                       0                              5                                  0                                  0                                        0                          0                          0                                0                                       0                                  0                                   0                             0                                0                            3                    0                            0                            512                   0                             0                                     0                                      0                                     0                                      0                                     0                                    0                                     16384            4                  0                    157               1                    0                   0                    88                       0                             0                    0                        0                        0                     0                   0                    0                0                   2                      60                        2                        0                                            0                                                         0                                                            0                                                     0                                                   0                                   0                                              0                                                      0                          0                           0                       0                          0                              0                      0                         0                        0                      13389             0               0               0                 0         0                  0          0               0                      0                     0                         0                           1                    171551200   0                        7          0            7                      2           42           0                       6                        6             0            0                                0                                    0                                      0                              0                                    0                                    0                                      0                             0                              0                                     0                                       0                                      0                                        0                                             0                                      0                                        0                                     0                                         0                                     0                                       0                                      0                                        0                             0                   1                  16759656           0           0              0                    1                 0                       1                   2       2         0         1         0             0          0                0                      0            0                  1           /var/run/mysqld/mysqld.sock 0                 0                      0                      0                         0                          0             0                    0                   0            0                 0                         0          0         0         0                  0                   2     7                     0                  0                     4096             0                 0                       0                  0              1                 1               1               7      7                         9223372036854775807   0                  0                        0                    0               0                     9223372036854775807 0                   0                     0                      0           0

> select last(*) from mysql where host='codb2d9' limit 1;
name: mysql
time last_aborted_clients last_aborted_connects last_access_denied_errors last_busy_time last_bytes_received last_bytes_sent last_commands_admin_commands last_commands_alter_db last_commands_alter_db_upgrade last_commands_alter_event last_commands_alter_function last_commands_alter_procedure last_commands_alter_server last_commands_alter_table last_commands_alter_tablespace last_commands_analyze last_commands_assign_to_keycache last_commands_begin last_commands_binlog last_commands_call_procedure last_commands_change_db last_commands_change_master last_commands_check last_commands_checksum last_commands_commit last_commands_compound_sql last_commands_create_db last_commands_create_event last_commands_create_function last_commands_create_index last_commands_create_procedure last_commands_create_role last_commands_create_server last_commands_create_table last_commands_create_temporary_table last_commands_create_trigger last_commands_create_udf last_commands_create_user last_commands_create_view last_commands_dealloc_sql last_commands_delete last_commands_delete_multi last_commands_do last_commands_drop_db last_commands_drop_event last_commands_drop_function last_commands_drop_index last_commands_drop_procedure last_commands_drop_role last_commands_drop_server last_commands_drop_table last_commands_drop_temporary_table last_commands_drop_trigger last_commands_drop_user last_commands_drop_view last_commands_empty_query last_commands_execute_sql last_commands_flush last_commands_get_diagnostics last_commands_grant last_commands_grant_role last_commands_ha_close last_commands_ha_open last_commands_ha_read last_commands_help last_commands_insert last_commands_insert_select last_commands_install_plugin last_commands_kill last_commands_load last_commands_lock_tables last_commands_optimize last_commands_preload_keys last_commands_prepare_sql last_commands_purge last_commands_purge_before_date last_commands_release_savepoint last_commands_rename_table last_commands_rename_user last_commands_repair last_commands_replace last_commands_replace_select last_commands_reset last_commands_resignal last_commands_revoke last_commands_revoke_all last_commands_revoke_role last_commands_rollback last_commands_rollback_to_savepoint last_commands_savepoint last_commands_select last_commands_set_option last_commands_show_authors last_commands_show_binlog_events last_commands_show_binlogs last_commands_show_charsets last_commands_show_client_statistics last_commands_show_collations last_commands_show_contributors last_commands_show_create_db last_commands_show_create_event last_commands_show_create_func last_commands_show_create_proc last_commands_show_create_table last_commands_show_create_trigger last_commands_show_databases last_commands_show_engine_logs last_commands_show_engine_mutex last_commands_show_engine_status last_commands_show_errors last_commands_show_events last_commands_show_explain last_commands_show_fields last_commands_show_function_status last_commands_show_generic last_commands_show_grants last_commands_show_index_statistics last_commands_show_keys last_commands_show_master_status last_commands_show_open_tables last_commands_show_plugins last_commands_show_privileges last_commands_show_procedure_status last_commands_show_processlist last_commands_show_profile last_commands_show_profiles last_commands_show_relaylog_events last_commands_show_slave_hosts last_commands_show_slave_status last_commands_show_status last_commands_show_storage_engines last_commands_show_table_statistics last_commands_show_table_status last_commands_show_tables last_commands_show_triggers last_commands_show_user_statistics last_commands_show_variables last_commands_show_warnings last_commands_shutdown last_commands_signal last_commands_start_all_slaves last_commands_start_slave last_commands_stmt_close last_commands_stmt_execute last_commands_stmt_fetch last_commands_stmt_prepare last_commands_stmt_reprepare last_commands_stmt_reset last_commands_stmt_send_long_data last_commands_stop_all_slaves last_commands_stop_slave last_commands_truncate last_commands_uninstall_plugin last_commands_unlock_tables last_commands_update last_commands_update_multi last_commands_xa_commit last_commands_xa_end last_commands_xa_prepare last_commands_xa_recover last_commands_xa_rollback last_commands_xa_start last_connection_errors_accept last_connection_errors_internal last_connection_errors_max_connections last_connection_errors_peer_address last_connection_errors_select last_connection_errors_tcpwrap last_connections last_created_tmp_disk_tables last_created_tmp_files last_created_tmp_tables last_delayed_errors last_delayed_insert_threads last_delayed_writes last_empty_queries last_executed_events last_executed_triggers last_feature_delay_key_write last_feature_dynamic_columns last_feature_fulltext last_feature_gis last_feature_locale last_feature_subquery last_feature_timezone last_feature_trigger last_feature_xml last_flush_commands last_handler_commit last_handler_delete last_handler_discover last_handler_external_lock last_handler_icp_attempts last_handler_icp_match last_handler_mrr_init last_handler_mrr_key_refills last_handler_mrr_rowid_refills last_handler_prepare last_handler_read_first last_handler_read_key last_handler_read_last last_handler_read_next last_handler_read_prev last_handler_read_retry last_handler_read_rnd last_handler_read_rnd_deleted last_handler_read_rnd_next last_handler_rollback last_handler_savepoint last_handler_savepoint_rollback last_handler_tmp_update last_handler_tmp_write last_handler_update last_handler_write last_innodb_available_undo_logs last_innodb_background_log_sync last_innodb_buffer_pool_bytes_data last_innodb_buffer_pool_bytes_dirty last_innodb_buffer_pool_dump_status last_innodb_buffer_pool_load_status last_innodb_buffer_pool_pages_data last_innodb_buffer_pool_pages_dirty last_innodb_buffer_pool_pages_flushed last_innodb_buffer_pool_pages_free last_innodb_buffer_pool_pages_lru_flushed last_innodb_buffer_pool_pages_made_not_young last_innodb_buffer_pool_pages_made_young last_innodb_buffer_pool_pages_misc last_innodb_buffer_pool_pages_old last_innodb_buffer_pool_pages_total last_innodb_buffer_pool_read_ahead last_innodb_buffer_pool_read_ahead_evicted last_innodb_buffer_pool_read_ahead_rnd last_innodb_buffer_pool_read_requests last_innodb_buffer_pool_reads last_innodb_buffer_pool_wait_free last_innodb_buffer_pool_write_requests last_innodb_checkpoint_age last_innodb_checkpoint_max_age last_innodb_data_fsyncs last_innodb_data_pending_fsyncs last_innodb_data_pending_reads last_innodb_data_pending_writes last_innodb_data_read last_innodb_data_reads last_innodb_data_writes last_innodb_data_written last_innodb_dblwr_pages_written last_innodb_dblwr_writes last_innodb_deadlocks last_innodb_defragment_compression_failures last_innodb_defragment_count last_innodb_defragment_failures last_innodb_encryption_key_rotation_list_length last_innodb_encryption_num_key_requests last_innodb_encryption_rotation_estimated_iops last_innodb_encryption_rotation_pages_flushed last_innodb_encryption_rotation_pages_modified last_innodb_encryption_rotation_pages_read_from_cache last_innodb_encryption_rotation_pages_read_from_disk last_innodb_have_atomic_builtins last_innodb_have_bzip2 last_innodb_have_lz4 last_innodb_have_lzma last_innodb_have_lzo last_innodb_have_snappy last_innodb_history_list_length last_innodb_ibuf_discarded_delete_marks last_innodb_ibuf_discarded_deletes last_innodb_ibuf_discarded_inserts last_innodb_ibuf_free_list last_innodb_ibuf_merged_delete_marks last_innodb_ibuf_merged_deletes last_innodb_ibuf_merged_inserts last_innodb_ibuf_merges last_innodb_ibuf_segment_size last_innodb_ibuf_size last_innodb_log_waits last_innodb_log_write_requests last_innodb_log_writes last_innodb_lsn_current last_innodb_lsn_flushed last_innodb_lsn_last_checkpoint last_innodb_master_thread_active_loops last_innodb_master_thread_idle_loops last_innodb_max_trx_id last_innodb_mem_adaptive_hash last_innodb_mem_dictionary last_innodb_mem_total last_innodb_mutex_os_waits last_innodb_mutex_spin_rounds last_innodb_mutex_spin_waits last_innodb_num_index_pages_written last_innodb_num_non_index_pages_written last_innodb_num_page_compressed_trim_op last_innodb_num_page_compressed_trim_op_saved last_innodb_num_pages_decrypted last_innodb_num_pages_encrypted last_innodb_num_pages_page_compressed last_innodb_num_pages_page_compression_error last_innodb_num_pages_page_decompressed last_innodb_oldest_view_low_limit_trx_id last_innodb_onlineddl_pct_progress last_innodb_onlineddl_rowlog_pct_used last_innodb_onlineddl_rowlog_rows last_innodb_os_log_fsyncs last_innodb_os_log_pending_fsyncs last_innodb_os_log_pending_writes last_innodb_os_log_written last_innodb_page_compression_saved last_innodb_page_compression_trim_sect1024 last_innodb_page_compression_trim_sect16384 last_innodb_page_compression_trim_sect2048 last_innodb_page_compression_trim_sect32768 last_innodb_page_compression_trim_sect4096 last_innodb_page_compression_trim_sect512 last_innodb_page_compression_trim_sect8192 last_innodb_page_size last_innodb_pages0_read last_innodb_pages_created last_innodb_pages_read last_innodb_pages_written last_innodb_purge_trx_id last_innodb_purge_undo_no last_innodb_read_views_memory last_innodb_row_lock_current_waits last_innodb_row_lock_time last_innodb_row_lock_time_avg last_innodb_row_lock_time_max last_innodb_row_lock_waits last_innodb_rows_deleted last_innodb_rows_inserted last_innodb_rows_read last_innodb_rows_updated last_innodb_s_lock_os_waits last_innodb_s_lock_spin_rounds last_innodb_s_lock_spin_waits last_innodb_scrub_background_page_reorganizations last_innodb_scrub_background_page_split_failures_missing_index last_innodb_scrub_background_page_split_failures_out_of_filespace last_innodb_scrub_background_page_split_failures_underflow last_innodb_scrub_background_page_split_failures_unknown last_innodb_scrub_background_page_splits last_innodb_secondary_index_triggered_cluster_reads last_innodb_secondary_index_triggered_cluster_reads_avoided last_innodb_system_rows_deleted last_innodb_system_rows_inserted last_innodb_system_rows_read last_innodb_system_rows_updated last_innodb_truncated_status_writes last_innodb_x_lock_os_waits last_innodb_x_lock_spin_rounds last_innodb_x_lock_spin_waits last_key_blocks_not_flushed last_key_blocks_unused last_key_blocks_used last_key_blocks_warm last_key_read_requests last_key_reads last_key_write_requests last_key_writes last_last_query_cost last_master_gtid_wait_count last_master_gtid_wait_time last_master_gtid_wait_timeouts last_max_statement_time_exceeded last_max_used_connections last_memory_used last_not_flushed_delayed_rows last_open_files last_open_streams last_open_table_definitions last_open_tables last_opened_files last_opened_plugin_libraries last_opened_table_definitions last_opened_tables last_opened_views last_performance_schema_accounts_lost last_performance_schema_cond_classes_lost last_performance_schema_cond_instances_lost last_performance_schema_digest_lost last_performance_schema_file_classes_lost last_performance_schema_file_handles_lost last_performance_schema_file_instances_lost last_performance_schema_hosts_lost last_performance_schema_locker_lost last_performance_schema_mutex_classes_lost last_performance_schema_mutex_instances_lost last_performance_schema_rwlock_classes_lost last_performance_schema_rwlock_instances_lost last_performance_schema_session_connect_attrs_lost last_performance_schema_socket_classes_lost last_performance_schema_socket_instances_lost last_performance_schema_stage_classes_lost last_performance_schema_statement_classes_lost last_performance_schema_table_handles_lost last_performance_schema_table_instances_lost last_performance_schema_thread_classes_lost last_performance_schema_thread_instances_lost last_performance_schema_users_lost last_prepared_stmt_count last_qcache_free_blocks last_qcache_free_memory last_qcache_hits last_qcache_inserts last_qcache_lowmem_prunes last_qcache_not_cached last_qcache_queries_in_cache last_qcache_total_blocks last_queries last_questions last_rows_read last_rows_sent last_rows_tmp_read last_rpl_status last_select_full_join last_select_full_range_join last_select_range last_select_range_check last_select_scan last_slave_connections last_slave_heartbeat_period last_slave_open_temp_tables last_slave_received_heartbeats last_slave_retried_transactions last_slave_running last_slave_skipped_errors last_slow_launch_threads last_slow_queries last_sort_merge_passes last_sort_priority_queue_sorts last_sort_range last_sort_rows last_sort_scan last_subquery_cache_hit last_subquery_cache_miss last_syncs last_table_locks_immediate last_table_locks_waited last_tc_log_max_pages_used last_tc_log_page_size last_tc_log_page_waits last_threadpool_idle_threads last_threadpool_threads last_threads_cached last_threads_connected last_threads_created last_threads_running last_uptime last_uptime_since_flush_status last_wsrep_cluster_conf_id last_wsrep_cluster_size last_wsrep_cluster_state_uuid last_wsrep_cluster_status last_wsrep_connected last_wsrep_local_bf_aborts last_wsrep_local_index last_wsrep_provider_name last_wsrep_provider_vendor last_wsrep_provider_version last_wsrep_ready last_wsrep_thread_count
---- -------------------- --------------------- ------------------------- -------------- ------------------- --------------- ---------------------------- ---------------------- ------------------------------ ------------------------- ---------------------------- ----------------------------- -------------------------- ------------------------- ------------------------------ --------------------- -------------------------------- ------------------- -------------------- ---------------------------- ----------------------- --------------------------- ------------------- ---------------------- -------------------- -------------------------- ----------------------- -------------------------- ----------------------------- -------------------------- ------------------------------ ------------------------- --------------------------- -------------------------- ------------------------------------ ---------------------------- ------------------------ ------------------------- ------------------------- ------------------------- -------------------- -------------------------- ---------------- --------------------- ------------------------ --------------------------- ------------------------ ---------------------------- ----------------------- ------------------------- ------------------------ ---------------------------------- -------------------------- ----------------------- ----------------------- ------------------------- ------------------------- ------------------- ----------------------------- ------------------- ------------------------ ---------------------- --------------------- --------------------- ------------------ -------------------- --------------------------- ---------------------------- ------------------ ------------------ ------------------------- ---------------------- -------------------------- ------------------------- ------------------- ------------------------------- ------------------------------- -------------------------- ------------------------- -------------------- --------------------- ---------------------------- ------------------- ---------------------- -------------------- ------------------------ ------------------------- ---------------------- ----------------------------------- ----------------------- -------------------- ------------------------ -------------------------- -------------------------------- -------------------------- --------------------------- ------------------------------------ ----------------------------- ------------------------------- ---------------------------- ------------------------------- ------------------------------ ------------------------------ ------------------------------- --------------------------------- ---------------------------- ------------------------------ ------------------------------- -------------------------------- ------------------------- ------------------------- -------------------------- ------------------------- ---------------------------------- -------------------------- ------------------------- ----------------------------------- ----------------------- -------------------------------- ------------------------------ -------------------------- ----------------------------- ----------------------------------- ------------------------------ -------------------------- --------------------------- ---------------------------------- ------------------------------ ------------------------------- ------------------------- ---------------------------------- ----------------------------------- ------------------------------- ------------------------- --------------------------- ---------------------------------- ---------------------------- --------------------------- ---------------------- -------------------- ------------------------------ ------------------------- ------------------------ -------------------------- ------------------------ -------------------------- ---------------------------- ------------------------ --------------------------------- ----------------------------- ------------------------ ---------------------- ------------------------------ --------------------------- -------------------- -------------------------- ----------------------- -------------------- ------------------------ ------------------------ ------------------------- ---------------------- ----------------------------- ------------------------------- -------------------------------------- ----------------------------------- ----------------------------- ------------------------------ ---------------- ---------------------------- ---------------------- ----------------------- ------------------- --------------------------- ------------------- ------------------ -------------------- ---------------------- ---------------------------- ---------------------------- --------------------- ---------------- ------------------- --------------------- --------------------- -------------------- ---------------- ------------------- ------------------- ------------------- --------------------- -------------------------- ------------------------- ---------------------- --------------------- ---------------------------- ------------------------------ -------------------- ----------------------- --------------------- ---------------------- ---------------------- ---------------------- ----------------------- --------------------- ----------------------------- -------------------------- --------------------- ---------------------- ------------------------------- ----------------------- ---------------------- ------------------- ------------------ ------------------------------- ------------------------------- ---------------------------------- ----------------------------------- ----------------------------------- ----------------------------------- ---------------------------------- ----------------------------------- ------------------------------------- ---------------------------------- ----------------------------------------- -------------------------------------------- ---------------------------------------- ---------------------------------- --------------------------------- ----------------------------------- ---------------------------------- ------------------------------------------ -------------------------------------- ------------------------------------- ----------------------------- --------------------------------- -------------------------------------- -------------------------- ------------------------------ ----------------------- ------------------------------- ------------------------------ ------------------------------- --------------------- ---------------------- ----------------------- ------------------------ ------------------------------- ------------------------ --------------------- ------------------------------------------- ---------------------------- ------------------------------- ----------------------------------------------- --------------------------------------- ---------------------------------------------- --------------------------------------------- ---------------------------------------------- ----------------------------------------------------- ---------------------------------------------------- -------------------------------- ---------------------- -------------------- --------------------- -------------------- ----------------------- ------------------------------- --------------------------------------- ---------------------------------- ---------------------------------- -------------------------- ------------------------------------ ------------------------------- ------------------------------- ----------------------- ----------------------------- --------------------- --------------------- ------------------------------ ---------------------- ----------------------- ----------------------- ------------------------------- -------------------------------------- ------------------------------------ ---------------------- ----------------------------- -------------------------- --------------------- -------------------------- ----------------------------- ---------------------------- ----------------------------------- --------------------------------------- --------------------------------------- --------------------------------------------- ------------------------------- ------------------------------- ------------------------------------- -------------------------------------------- --------------------------------------- ---------------------------------------- ---------------------------------- ------------------------------------- --------------------------------- ------------------------- --------------------------------- --------------------------------- -------------------------- ---------------------------------- ------------------------------------------ ------------------------------------------- ------------------------------------------ ------------------------------------------- ------------------------------------------ ----------------------------------------- ------------------------------------------ --------------------- ----------------------- ------------------------- ---------------------- ------------------------- ------------------------ ------------------------- ----------------------------- ---------------------------------- ------------------------- ----------------------------- ----------------------------- -------------------------- ------------------------ ------------------------- --------------------- ------------------------ --------------------------- ------------------------------ ----------------------------- ------------------------------------------------- -------------------------------------------------------------- ----------------------------------------------------------------- ---------------------------------------------------------- -------------------------------------------------------- ---------------------------------------- --------------------------------------------------- ----------------------------------------------------------- ------------------------------- -------------------------------- ---------------------------- ------------------------------- ----------------------------------- --------------------------- ------------------------------ ----------------------------- --------------------------- ---------------------- -------------------- -------------------- ---------------------- -------------- ----------------------- --------------- -------------------- --------------------------- -------------------------- ------------------------------ -------------------------------- ------------------------- ---------------- ----------------------------- --------------- ----------------- --------------------------- ---------------- ----------------- ---------------------------- ----------------------------- ------------------ ----------------- ------------------------------------- ----------------------------------------- ------------------------------------------- ----------------------------------- ----------------------------------------- ----------------------------------------- ------------------------------------------- ---------------------------------- ----------------------------------- ------------------------------------------ -------------------------------------------- ------------------------------------------- --------------------------------------------- -------------------------------------------------- ------------------------------------------- --------------------------------------------- ------------------------------------------ ---------------------------------------------- ------------------------------------------ -------------------------------------------- ------------------------------------------- --------------------------------------------- ---------------------------------- ------------------------ ----------------------- ----------------------- ---------------- ------------------- ------------------------- ---------------------- ---------------------------- ------------------------ ------------ -------------- -------------- -------------- ------------------ --------------- --------------------- --------------------------- ----------------- ----------------------- ---------------- ---------------------- --------------------------- --------------------------- ------------------------------ ------------------------------- ------------------ ------------------------- ------------------------ ----------------- ---------------------- ------------------------------ --------------- -------------- -------------- ----------------------- ------------------------ ---------- -------------------------- ----------------------- -------------------------- --------------------- ---------------------- ---------------------------- ----------------------- ------------------- ---------------------- -------------------- -------------------- ----------- ------------------------------ -------------------------- ----------------------- ----------------------------- ------------------------- -------------------- -------------------------- ---------------------- ------------------------ -------------------------- --------------------------- ---------------- -----------------------
0    0                    0                     0                         0              224467128           11012237756     0                            0                      0                              0                         0                            0                             0                          0                         0                              0                     0                                594079              0                    0                            3973                    0                           0                   0                      594078               0                          0                       0                          0                             0                          0                              0                         0                           0                          0                                    0                            0                        0                         0                         0                         172179               0                          0                0                     0                        0                           0                        0                            0                       0                         0                        0                                  0                          0                       0                       0                         0                         0                   0                             0                   0                        0                      0                     0                     0                  165391               0                           0                            0                  0                  37                        1056                   0                          0                         0                   0                               0                               0                          0                         0                    0                     0                            0                   0                      0                    0                        0                         0                      0                                   0                       16874                19936                    0                          0                                0                          0                                                                0                             0                               0                            0                               0                              0                              3972                            0                                 0                            0                              0                               0                                0                         0                         0                          3972                      0                                  0                          0                                                             0                       0                                0                              0                          0                             0                                   0                              0                          0                           0                                  0                              19                              1019                      0                                                                      0                               37                        0                                                              0                            0                           0                      0                    0                              0                         0                        0                          0                        0                          0                            0                        0                                 0                             0                        106                    0                              37                          256509               0                          0                       0                    0                        0                        0                         0                      0                             0                               0                                      0                                   0                             0                              1080             7982                         5553                   13306                   0                   0                           0                   4558               0                    0                      0                            0                            0                     0                0                   222                   37                    0                    0                1                   1789368             779585              0                     0                          0                         0                      0                     0                            0                              0                    57                      872236                0                      18636                  0                      0                       10193                 0                             19390075402                1196                  0                      0                               0                       586228                 338863              778900             128                             60250                           1054867456                         12566528                            0                                   0                                   64384                              767                                 352886                                1024                               0                                         451689                                       577053                                   127                                23746                             65535                               49347                              0                                          0                                      19427982271                           24447                         96                                23411196                               6287713                    80826164                       825968                  0                               0                              0                               1211093504            79753                  1115945                 13677973504              352886                          40438                    0                     0                                           0                            0                               0                                               0                                       0                                              0                                             0                                              0                                                     0                                                    0                                0                      0                    0                     0                    0                       2                               0                                       0                                  0                                  0                          112                                  1                               81                              125                     2                             1                     0                     3999280                        665050                 69685215405             69685215384             69678927692                     49877                                  10374                                52725302               19769968                      7264407                    1124597760            610380                     18421303                      685151                       114504                              954914                                  0                                       0                                             0                               0                               0                                     0                                            0                                       0                                        0                                  0                                     0                                 675122                    0                                 0                                 2109855744                 0                                  0                                          0                                           0                                          0                                           0                                          0                                         0                                          16384                 440                     78472                     73914                  352886                    52725301                 0                         304                           0                                  0                         0                             0                             0                          184345                   160095                    19389559020           338863                   19601                       590166                         19623                         0                                                 0                                                              0                                                                 0                                                          0                                                        0                                        34449                                               0                                                           595240                          595240                           595295                       0                               0                                   2884                        97345                          1857                          0                           13371                  18                   0                    1242                   36             0                       0               0                    0                           0                          0                              0                                2                         178949584        0                             44              0                 232                         398              42554             0                            3954                          6887               0                 0                                     0                                         0                                           0                                   0                                         0                                         0                                           0                                  0                                   0                                          0                                            0                                           0                                             0                                                  0                                           0                                             0                                          0                                              0                                          0                                            0                                           0                                             0                                  0                        1                       16759656                0                0                   0                         1148                   0                            1                        1252783      50950          19390114952    84194968       586228             0               0                     0                           0                 0                       16669            0                      0                           0                           0                              0                               0                  0                         0                        11534             0                      0                              0               0              74             0                       0                        385        1196943                    31                      0                          0                     0                      0                            0                       1                   1                      2                    1                    61126       61126                          9223372036854775807        0                       0                             0                         0                    0                          9223372036854775807    0                        0                          0                           0                0

Expected behavior:

Would have expected a slave_seconds_behind_master field.

Use case: [Why is this important (helps with prioritizing requests)]

I would like to track the replica lag between my master and slave servers

nsteinmetz commented 6 years ago

Ok my bad, I thought that the values given in the doc was the default values...

Once I added, gather_slave_status = true, it works as expected !

Sorry for the misunderstanding.