Skip to content

Commit

Permalink
mysql_connections_per_user: skip internal user "system user"
Browse files Browse the repository at this point in the history
This is the user name used internally by mysql for binlog handling (even
though it's not present in the mysql.user table).

The space in the name makes the plugin freak out about an unknown
"system" value.

Number of connections for this interal user is irrelevant.
  • Loading branch information
lelutin committed Feb 17, 2015
1 parent 323b4a7 commit 78a229d
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 78a229d

Please sign in to comment.