Skip to content

Commit

Permalink
Merge pull request #586 from lelutin/mysql_conn_per_user-system_user
Browse files Browse the repository at this point in the history
mysql_connections_per_user: skip internal user "system user"
  • Loading branch information
sumpfralle committed Oct 20, 2016
2 parents 78dea36 + 78a229d commit 40396db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/mysql/mysql_connections_per_user
Expand Up @@ -91,6 +91,10 @@ sub print_graph_data() {
my $print_user = "";
foreach my $user (reverse sort { $counts{$a} <=> $counts{$b} } keys %counts) {
last if $i++ >= $numusers;
if ($user eq "system user") {
#skip internal user that manages binlog operations for slave servers.
next;
}
$total += $counts{$user};
$print_user = $user;
if($print_user eq "root") {
Expand Down Expand Up @@ -125,6 +129,10 @@ EOM
my $i = 0;
foreach my $user (reverse sort { $counts{$a} <=> $counts{$b} } keys %counts) {
last if $i++ >= $numusers;
if ($user eq "system user") {
#skip internal user that manages binlog operations for slave servers.
next;
}
my $print_user = $user;
if($print_user eq "root") {
$print_user = "root_";
Expand Down

0 comments on commit 40396db

Please sign in to comment.