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 --create-review-history-table --create-review-table --review t=review --review-history t=review_history --since 0 --nozero-admin --report-all --iterations 0 --noreport --limit 100%
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?