summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping/probes/basevars.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Smokeping/probes/basevars.pm')
-rw-r--r--lib/Smokeping/probes/basevars.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Smokeping/probes/basevars.pm b/lib/Smokeping/probes/basevars.pm
index 8a1b475..ec40f99 100644
--- a/lib/Smokeping/probes/basevars.pm
+++ b/lib/Smokeping/probes/basevars.pm
@@ -69,6 +69,7 @@ sub add($$)
my $self = shift;
my $tree = shift;
+ $self->{target_count}++;
$self->{targets}{$tree} = shift;
$self->{vars}{$tree} = { %{$self->{properties}}, %$tree };
}
@@ -84,7 +85,9 @@ sub targets {
for (@$addr) {
@{$copy{$_}} = @{$self->{addrlookup}{$_}} unless exists $copy{$_};
my $tree = pop @{$copy{$_}};
- push @targets, { addr => $_, vars => $self->{vars}{$tree}, tree => $tree };
+ my $vars = $self->{vars}{$tree};
+ next if defined $vars->{nomasterpoll} and $vars->{nomasterpoll} eq "yes";
+ push @targets, { addr => $_, vars => $vars, tree => $tree };
}
return \@targets;
}