diff options
-rwxr-xr-x | stats.pl | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -70,8 +70,6 @@ for my $section (@content) { $time_maint = $1; } elsif ($line =~ /time_down: (.*)/i) { $time_down = $1; - } else { - print STDERR "Unkown line: \"$line\""; } } @@ -82,11 +80,9 @@ for my $section (@content) { $group_info->{'downtime'}->{$user} = $time_down; $group_info->{'maintenance'}->{$user} = $time_maint; $group_info->{'server'}->{$user} = $endpoint; - - push @group_names, $user; } -@group_names = sort @group_names; +@group_names = sort keys %{$group_info->{'rrd_groups'}}; $#group_colors = $#group_names; for my $group (@group_names) { @@ -258,7 +254,7 @@ my @usr_sources = $user_rrd->sources("$usr_rrd"); my @pst_sources = $user_rrd->sources("$pst_rrd"); my @cmt_sources = $comment_rrd->sources("$cmt_rrd"); -for my $group (keys %{$group_info->{'rrd_groups'}}) { +for my $group (@group_names) { $position_rrd->add_source("$pos_rrd", $group => $group_info->{'rrd_groups'}->{$group}) unless (in_array($group, \@pos_sources)); $balance_rrd->add_source("$bal_rrd", $group => $group_info->{'rrd_groups'}->{$group}) unless (in_array($group, \@bal_sources)); $uptime_rrd->add_source("$upt_rrd", $group => $group_info->{'rrd_groups'}->{$group}) unless (in_array($group, \@upt_sources)); |