diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2008-01-23 13:56:35 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2008-01-23 13:56:35 +0100 |
commit | 3809f4928c67b774515d0cbd6dfcbb0587ec4dd1 (patch) | |
tree | 5fefc740056faf6c8495777c937692a6644adc22 /lib/Smokeping | |
parent | aeb75494086a98101cdf22ba3dc6767cb03939a5 (diff) | |
download | smokeping-3809f4928c67b774515d0cbd6dfcbb0587ec4dd1.tar.gz smokeping-3809f4928c67b774515d0cbd6dfcbb0587ec4dd1.tar.xz |
added new hide and noserverpoll properties to target configuration
Diffstat (limited to 'lib/Smokeping')
-rw-r--r-- | lib/Smokeping/Graphs.pm | 1 | ||||
-rw-r--r-- | lib/Smokeping/Master.pm | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Smokeping/Graphs.pm b/lib/Smokeping/Graphs.pm index 85ed2b7..8d13cbe 100644 --- a/lib/Smokeping/Graphs.pm +++ b/lib/Smokeping/Graphs.pm @@ -180,6 +180,7 @@ sub get_multi_detail ($$$$;$){ $i++; my $swidth = $max->{$start} / $cfg->{Presentation}{detail}{height}; my $rrd = $cfg->{General}{datadir}.$host.".rrd"; + next unless -r $rrd; # skip things that do not exist; my $medc = shift @colors; my @tree_path = split /\//,$host; shift @tree_path; diff --git a/lib/Smokeping/Master.pm b/lib/Smokeping/Master.pm index 4a5cd90..95c7884 100644 --- a/lib/Smokeping/Master.pm +++ b/lib/Smokeping/Master.pm @@ -46,7 +46,8 @@ sub get_targets { $ok = 1 if $key eq 'host'; $return{$key} = $trg->{$key}; } - } + } + $trg->{nomasterpoll} = 'no'; # slaves poll always return ($ok ? \%return : undef); } @@ -99,11 +100,9 @@ sub save_updates { for my $update (split /\n/, $updates){ my ($name, $time, $updatestring) = split /\t/, $update; my $file = $cfg->{General}{datadir}."/${name}.slave_cache"; - if ( ! -f $cfg->{General}{datadir}."/${name}.rrd" ){ + if ( ${name} =~ m{(^|/)\.\.($|/)} ){ warn "Skipping update for ${name}.slave_cache since ". - "$cfg->{General}{datadir}/${name}.rrd does not exist ". - " in the local data structure. Make sure you run the ". - "smokeping daemon. ($cfg->{General}{datadir})\n"; + "you seem to try todo some directory magic here. Don't!"; } elsif ( open (my $lock, '>>' , "$file.lock") ) { for (my $i = 10; $i > 0; $i--){ |