Skip to content

Commit

Permalink
merged r1322 to munin-limits.in (patch to munin-limits to provide tim…
Browse files Browse the repository at this point in the history
…ing information for munin_stats)
  • Loading branch information
mattthias committed Feb 17, 2008
1 parent cb0aec2 commit 4d524dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/munin-limits.in
Expand Up @@ -21,6 +21,7 @@ use strict;
use Munin;
use POSIX qw(strftime);
use Getopt::Long;
use Time::HiRes;
use Text::Balanced qw (extract_multiple extract_delimited extract_quotelike extract_bracketed);

my $DEBUG=0;
Expand Down Expand Up @@ -91,6 +92,8 @@ logger("Starting munin-limits, checking lock");
munin_runlock("$config->{rundir}/munin-limits.lock");
logger("Created lock: $config->{rundir}/munin-limits.lock");

my $update_time = Time::HiRes::time;

if (!defined $config->{'contact'}->{'nagios'}->{'command'} and
defined $config->{'nsca'})
{
Expand All @@ -107,7 +110,10 @@ for my $domain ( keys %{$config->{domain}}) {
process_domain($domain);
}
&munin_writeconfig ("$config->{dbdir}/limits", \%notes);
logger("munin-limits finished.");

$update_time = sprintf ("%.2f",(Time::HiRes::time - $update_time));

logger("munin-limits finished ($update_time sec)");


sub process_domain {
Expand Down

0 comments on commit 4d524dd

Please sign in to comment.