Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-3749

InnoDB Checkpoint Age showing empty when no checkpoint global status available

    XMLWordPrintable

    Details

      Description

      On MySQL versions (like 5.7.22-log MySQL Commercial Server, community, and RDS) that doesn't have the Innodb_checkpoint_age/Innodb_checkpoint_max_age the InnoDB Checkpoint Age is empty.

      This info is available on "show engine innodb status". The mysqld_exporter already collects data from there but it doesn't stores everything inside prometheus: https://github.com/percona/mysqld_exporter/blob/master/collector/engine_innodb.go

      With that info, checkpoint value can be calculated as

      "Log sequence number" minus "Last checkpoint at"

      And the value of Innodb_checkpoint_max_age can be replaced with innodb_log_files_in_group*mysql_global_variables_innodb_log_file_size

      The full PromQL can be as: 

      mysql_global_status_innodb_checkpoint_age{instance="$host"} or (mysql_global_variables_innodb_log_files_in_group{instance="$host"}*mysql_global_variables_innodb_log_file_size{instance="$host"})

      Dashboard: "MySQL InnoDB Details"
      Row: "InnoDB Checkpointing and Flushing"
      Element: "InnoDB Checkpoint Age"
      Formula:

      max_over_time(mysql_global_status_innodb_checkpoint_max_age{service_name=~"$service_name"}[$interval]) or
      max_over_time(mysql_global_status_innodb_checkpoint_max_age{service_name=~"$service_name"}[5m]) or
      max_over_time(mysql_info_schema_innodb_metrics_recovery_log_max_modified_age_async{service_name=~"$service_name"}[$interval]) or
      max_over_time(mysql_info_schema_innodb_metrics_recovery_log_max_modified_age_async{service_name=~"$service_name"}[5m]) or
      max_over_time(mysql_info_schema_innodb_metrics_log_log_max_modified_age_async{service_name=~"$service_name"}[$interval]) or
      max_over_time(mysql_info_schema_innodb_metrics_log_log_max_modified_age_async{service_name=~"$service_name"}[5m])
      

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              vadim.yalovets Vadim Yalovets
              Reporter:
              daniel.guzman.burgos Daniel Guzman Burgos (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 45 minutes
                  45m