Percona Monitoring and Management 1.11.0

  • Date

    May, 23 2018

For more information about this release, see the release announcement.

In PMM Release 1.11.0, we’re delivering the following changes:

  • Configurable MySQL Slow Log Rotation - Enable or Disable rotation, and specify how many files to keep on disk
  • Predictable Graphs - We’ve updated our formulas to use aggregation functions over time for more reliable graphs
  • MySQL Exporter Parsing of my.cnf - We’ve improved how we read my.cnf
  • Annotation improvements - Passing multiple strings results in single annotation being written

The issues in the release includes 1 new features & improvements, and 9 bugs fixed.

MySQL Slow Log Rotation Improvements

We spent some time this release going over how we handle MySQL’s Slow Log rotation logic. Query Analytics requires that slow logging be enabled (either to file, or to PERFORMANCE_SCHEMA) and what we found was that Users of Percona Server for MySQL overwhelmingly choose logging to a file in order to take advantage of log_slow_verbosity which provides enhanced InnoDB Usage information. The challenge however with MySQL’s Slow Log is that it is very verbose and thus the number one concern is disk space - PMM strives to Do No Harm and so doing MySQL Slow Log Rotation was a natural fit, but until this release we were very strict and hadn’t enabled any configuration of these parameters.

Percona Server for MySQL Users have long known about Slow Query Log Rotation and Expiration, but until now had no way of using the in-built Percona Server feature while ensuring that PMM wasn’t missing any queries from the Slow Log during file rotation. Or perhaps your use case is that you want to do Slow Log Rotation using logrotate or some other facility. Today with Release 1.11 this is now possible!

We have made two significant changes:

  • You can now specify the number of Slow Log files to remain on disk, and let PMM handle deleting the oldest files first. Default remains unchanged - 1 Slow Log to remain on disk.
  • Slow Log rotation can now be disabled, for example if you want to manage rotation using logrotate or Percona Server for MySQL Slow Query Log Rotation and Expiration. Default remains unchanged - Slow Log Rotation is ON.

You specify each of these two new controls when setting up the MySQL service. The following example specifies that 5 Slow Log files should remain on disk:

$ pmm-admin add mysql ... --retain-slow-logs=5

While the following example specifies that Slow Log rotation is to be disabled (flag value of false), with the assumption that you will perform your own Slow Log Rotation:

$ pmm-admin add mysql ... --slow-log-rotation=false

We do not currently support modifying option parameters for an existing service definition. This means you must remove, then re-add the service and including the new options.

We are including a logrotate script in this post to get you started, and it is designed to keep 30 copies of Slow Logs at 1GB each. Note that you will need to update the Slow Log location, and ensure a MySQL User Account with SUPER, RELOAD are used for this script to successfully execute.

Example logrotate

/var/mysql/mysql-slow.log {
             nocompress
             create 660 mysql mysql
             size 1G
             dateext
             missingok
             notifempty
             sharedscripts
             postrotate
             /bin/mysql -e 'SELECT @@global.long_query_time INTO @LQT_SAVE; SET GLOBAL long_query_time=2000; SELECT SLEEP(2); FLUSH SLOW LOGS; SELECT SLEEP(2); SET GLOBAL long_query_time=@LQT_SAVE;'
             endscript
             rotate 30
}

Predictable Graphs

We’ve updated the logic on 4 Dashboards to better handle predictability and also zooming to look at shorter time ranges. For example, refreshing PXC/Galera Graphs prior to 1.11 led to graphs spiking at different points during the metric series. We’ve reviewed each of these Graphs and their corresponding queries and added in _over_time() functions so that Graphs display a consistent view of the metric series. This also improves your ability to drill in on the Dashboards, so that no matter how short your time range, you will still observe the same spikes and troughs in your metric series. The four Dashboards affected by this improvement are:

  • Home Dashboard
  • PXC/Galera Graphs Dashboard
  • MySQL Overview Dashboard
  • MySQL InnoDB Metrics Dashboard
  • MySQL Exporter Parsing of my.cnf

In earlier releases, the MySQL Exporter expected only key=value type flags and would ignore options without values (i.e. disable-auto-rehash), and could sometimes read the wrong section of the my.cnf file. We’ve updated the parsing engine to be more MySQL compatible.

Annotation Improvements

Annotations permit the display of an event on all dashboards in PMM. Users reported that passing more than one string to pmm-admin annotate would generate an error, so we updated the parsing logic to assume all strings passed during Annotation creation generates a single Annotation event. Previously you needed to enclose your strings in quotes so that it would be parsed as a single string.

Issues in this release

New Features & Improvements

  • PMM-2432: Configurable MySQL Slow Log File Rotation

Bug fixes

  • PMM-1187: Graphs breaks at tight resolution
  • PMM-2362: Explain is a part of query
  • PMM-2399: RPM for PMM Server is missing some files
  • PMM-2407: Menu items are not visible on PMM QAN dashboard
  • PMM-2469: Parsing of a valid my.cnf can break the mysqld_exporter
  • PMM-2479: PXC/Galera Cluster Overview dashboard: typo in metric names
  • PMM-2484: PXC/Galera Graphs display unpredictable results each time they are refreshed
  • PMM-2503: Wrong Innodb Adaptive Hash Index Statistics
  • PMM-2513: QAN-agent always changes max_slowlog_size to 0
  • PMM-2514: pmm-admin annotate help - fix typos
  • PMM-2515: pmm-admin annotate - more than 1 annotation

How to get PMM

PMM is available for installation using three methods:

Help us improve our software quality by reporting any bugs you encounter using our bug tracking system.

  • Page updated 2021-01-29

Contents

Previous topic

Percona Monitoring and Management 1.12.0

Next topic

Percona Monitoring and Management 1.10.0

Contact Us

For free technical help, visit the Percona Community Forum.
To report bugs or submit feature requests, open a JIRA ticket.
For paid support and managed or professional services, contact Percona Sales.