summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping.pm
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-03-06 00:13:24 +0100
committerTobi Oetiker <tobi@oetiker.ch>2008-03-06 00:13:24 +0100
commit6c15f78cac4a0b94907352c4184d6d7d5ca87164 (patch)
treea0b68103a60b67ab21b9159c394c5b47ac4d5e58 /lib/Smokeping.pm
parent31e4fcaa45fb5dca6018a1ef70b71bdfbbac4965 (diff)
downloadsmokeping-6c15f78cac4a0b94907352c4184d6d7d5ca87164.tar.gz
smokeping-6c15f78cac4a0b94907352c4184d6d7d5ca87164.tar.xz
longer timeout for slaves and separate cache files per slave for improved scaling -- Phillip Moore
Diffstat (limited to 'lib/Smokeping.pm')
-rw-r--r--lib/Smokeping.pm15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index c7726ca..b3e37b9 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -1849,22 +1849,15 @@ sub update_rrds($$$$$$) {
my $probeobj = $probes->{$probe};
my $pings = $probeobj->_pings($tree);
if ($prop eq 'host' and check_filter($cfg,$name) and $tree->{$prop} !~ m|^/|) { # skip multihost
- my %slave_test;
- my $slaveupdates;
my @updates;
if (not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no'){
@updates = ([ "", time, $probeobj->rrdupdate_string($tree) ]);
}
if ($tree->{slaves}){
- %slave_test = ( map { $_,1 } split(/\s+/, $tree->{slaves}));
- $slaveupdates = Smokeping::Master::get_slaveupdates($name);
- for my $slave (@{$slaveupdates}){
- if (not $slave_test{$slave->[0]}){
- warn "WARNING: skipping update for $slave->[0] since it is not configured for $name\n";
- next;
- }
- push @updates, $slave;
- }
+ my @slaves = split(/\s+/, $tree->{slaves});
+ foreach my $slave (@slaves) {
+ push @updates, Smokeping::Master::get_slaveupdates($name, $slave);
+ } #foreach my $checkslave
}
for my $update (sort {$a->[1] <=> $b->[1]} @updates){ # make sure we put the updates in chronological order in
my $s = $update->[0] ? "~".$update->[0] : "";