Created
April 27, 2012 22:15
-
-
Save donjohnson/2513850 to your computer and use it in GitHub Desktop.
mysql slow query log to opentsdb using maatkit/percona query digester
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pt-query-digest mysql.slow.log --no-report --filter 'print "put mysql.slowqueries $event->{timestamp} $event->{Query_time} query_md5=" . make_checksum($event->{fingerprint}) . " host=$event->{host} db=$event->{db} dbuser=$event->{user}\n"'|nc opentsdb 4242 | |
format: | |
put mysql.slow.query 1335559893 1.889435 query_md5=AECBE3F75D62FCA4 host=api1 db=prod dbuser=app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah OK, my bad then, I wasn't aware of that. Then yes it's probably fine.