summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-02-25 10:53:02 +0100
committerTobi Oetiker <tobi@oetiker.ch>2008-02-25 10:53:02 +0100
commit4ddd6688d16443d84aabd6ce5d0d540f71b9b4b5 (patch)
treedc1f377dffe65db7dde4a992ef7b9ddc6c53b664
parent0c1233317fb699e800d109160a11ff79b3d07dfc (diff)
downloadsmokeping-4ddd6688d16443d84aabd6ce5d0d540f71b9b4b5.tar.gz
smokeping-4ddd6688d16443d84aabd6ce5d0d540f71b9b4b5.tar.xz
nomasterpoll does not get a default value automatically ... so lets check for nothing as well
-rw-r--r--lib/Smokeping.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 11b896c..28eca8a 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -401,7 +401,7 @@ sub add_targets ($$$$){
if (ref $tree->{$prop} eq 'HASH'){
add_targets $cfg, $probes, $tree->{$prop}, "$name/$prop";
}
- if ($prop eq 'host' and $tree->{nomasterpoll} eq 'no' and check_filter($cfg,$name) and $tree->{$prop} !~ m|^/| ) {
+ if ($prop eq 'host' and ( not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no') and check_filter($cfg,$name) and $tree->{$prop} !~ m|^/| ) {
if($tree->{host} =~ /^DYNAMIC/) {
$probeobj->add($tree,$name);
} else {
@@ -750,7 +750,7 @@ sub get_overview ($$$$){
next unless $phys_tree->{host};
next if $phys_tree->{hide} and $phys_tree->{hide} eq 'yes';
- if ($phys_tree->{nomasterpoll} eq 'no'){
+ if (not $phys_tree->{nomasterpoll} or $phys_tree->{nomasterpoll} eq 'no'){
@slaves = ("");
};
@@ -973,7 +973,7 @@ sub get_detail ($$$$;$){
$tree = $phys_tree;
my @slaves;
- if ($tree->{nomasterpoll} eq 'no'){
+ if (not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no'){
@slaves = ("");
};
@@ -1852,7 +1852,7 @@ sub update_rrds($$$$$$) {
my %slave_test;
my $slaveupdates;
my @updates;
- if ($tree->{nomasterpoll} eq 'no'){
+ if (not $tree->{nomasterpoll} or $tree->{nomasterpoll} eq 'no'){
@updates = ([ "", time, $probeobj->rrdupdate_string($tree) ]);
}
if ($tree->{slaves}){