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

Prometheus scrape for mysql targets causes twice the queries.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: MySQLd_Exporter
    • Labels:
      None

      Description

      Pretty annoying and causing overhead.  For every scrape interval, the same query are run twice.  For example, here's a slow log extract (long_query_time=0) of my home server for the mysql-hr target with the comments removed:

      SET timestamp=1547245972;
      SELECT @@version;
      SET timestamp=1547245972;
      SELECT
      		  name, subsystem, type, comment,
      		  count
      		  FROM information_schema.innodb_metrics
      		  WHERE status = 'enabled';
      SET timestamp=1547245972;
      SHOW GLOBAL STATUS;
      SET timestamp=1547245972;
      SELECT @@version;
      SET timestamp=1547245972;
      SELECT
      		  name, subsystem, type, comment,
      		  count
      		  FROM information_schema.innodb_metrics
      		  WHERE status = 'enabled';
      SET timestamp=1547245972;
      SHOW GLOBAL STATUS;
      

      The same sequence repeated twice (within the same timestamp).  Same for the other targets.  I did a quick tcpdump analysis and it seems prometheus is requesting twice.

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              yves@percona.com Yves Trudeau
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: