2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

reorder graph to, hopefully, fix stacking

This commit is contained in:
Antoine Beaupré 2014-01-02 18:52:58 -05:00
parent ade1481717
commit 88ba6e86be

View File

@ -82,9 +82,6 @@ sub print_graph_data() {
$upper_limit = poll_variables($MYSQL_VARIABLES,"max_connections");
# Return the values to Munin
print "current.value $current\n";
print "limit.value $upper_limit\n";
my $threads = get_thread_list();
my %counts = ();
my ($thread, $user, $count);
@ -102,6 +99,8 @@ sub print_graph_data() {
last if $i++ >= $numusers;
print "$user.value $counts{$user}\n";
}
print "current.value $current\n";
print "limit.value $upper_limit\n";
}
sub poll_variables {
@ -130,14 +129,6 @@ graph_vlabel Connections
graph_info The number of current connexions per user.
graph_category mysql
graph_total Total
current.label In Use
current.draw LINE1
current.info The number of current threads connected
current.warning $warning
current.critical $critical
limit.label Maximum
limit.draw LINE1
limit.info The current value of the "max_connections" variable
EOM
my $threads = get_thread_list();
my %seen = ();
@ -148,7 +139,6 @@ while (($thread, $user) = each %$threads) {
next;
}
else {
$seen{$user} = 1;
print <<EOM;
$user.label Connexions for user $user
$user.info Number of connexions used by user $user
@ -161,10 +151,20 @@ EOM
else {
print "AREA\n";
}
$seen{$user} = 1;
}
}
print <<EOM;
current.label In Use
current.draw LINE1
current.info The number of current threads connected
current.warning $warning
current.critical $critical
limit.label Maximum
limit.draw LINE1
limit.info The current value of the "max_connections" variable
EOM
}
sub get_thread_list {