pt-query-digest doesn't parse user info from general logs

Bug #1048844 reported by Mike Siekkinen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Triaged
Medium
Unassigned

Bug Description

Running version 2.1.2.

The output of pt-query-digest --type=genlog does not include any user, host summary information.

The summary looks like

# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 29
# Exec time 0 0 0 0 0 0 0 0
# Query size 0 5.04k 177 179 178 174.84 0 174.84
# String:
# Databases db1 (28/96%), db2 (1/3%)
# Query_time distribution

I realize not as much information is available as the slow query logs but the general log does include Connect lines. Taking a look at the script, the parse_event method seems to be looking for the Connect lines and storing the info per thread id.

Around line 9618

if ( $cmd eq 'Connect' ) {
            if ( $arg =~ m/^Access denied/ ) {
               $cmd = $arg;
            }
            else {
               my ($user, undef, $db) = $arg =~ /(\S+)/g;
               my $host;
               ($user, $host) = split(/@/, $user);
.....

I'd like to use this tool to get better insight into what specific accounts are accessing specific tables this this granularity isn't available from the information_schema statistics

tags: added: gen-log
Changed in percona-toolkit:
status: New → Triaged
Changed in percona-toolkit:
milestone: none → 2.2.5
importance: Undecided → Medium
summary: - No user information included when parsing type genlog
+ pt-query-digest doesn't parse user info from general logs
Changed in percona-toolkit:
milestone: 2.2.5 → none
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-580

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.