pt-query-digest daemonized slow log reader

  • Filter
  • Time
  • Show
Clear All
new posts

  • pt-query-digest daemonized slow log reader

    I have a need for something that could run on thousands of servers, watch the slow logs, abstract the queries and collect data, and then insert that info into a central database. I see that pt-q-d has a daemonize function, but it appears to be intended to watch processlist or tcp and log progressively to a file. I want something that can be kicked off, will start at launch time in the slow logs, and collect data until it is killed. I tried variations on:

    pt-query-digest --daemonize --pid <PIDPATH> --create-review-history-table --create-review-table --review <DSNINFO>t=review --review-history t=review_history --since 0 --nozero-admin --report-all --iterations 0 --noreport --limit 100% <LOGPATH>

    yet it just collects data (and ignores --since? it collects all from start.), writes to the table, and exits.

    Has anyone else tried something like this? Is pt-q-d able to do this? Will I need to hack it a bunch?

  • #2
    pt-query-digest has --since --until parameters. It is like log queries from that particular timestamp (--since) till that end of time (--until).
    Is that what you looking for ?


    • #3
      Nah, I need it to watch from launch (--since 0, basically) and stay running in the background, watching the log, as a slow query tracking daemon that would connect and log to a central monitoring server.