=back
+=back
+
=cut
sub handle_config_addtype
}
else
{
- $opts->{'script'} = $script;
- push (@$Scripts, $opts);
+ if (ref ($opts) eq 'ARRAY')
+ {
+ for (@$opts)
+ {
+ my $opt = $_;
+ $opt->{'script'} = $script;
+ push (@$Scripts, $opt);
+ }
+ }
+ else
+ {
+ $opts->{'script'} = $script;
+ push (@$Scripts, $opts);
+ }
}
} # for (keys %$scripts)
} # handle_config_script
if ($perfdata)
{
- push (@serviceperfdata, split (' ', $perfdata));
+ push (@serviceperfdata, split (' ', $perfdata));
}
$state = 1;
if ($perfdata)
{
- push (@serviceperfdata, split (' ', $perfdata));
- $state = 2;
+ push (@serviceperfdata, split (' ', $perfdata));
+ $state = 2;
}
}
else # ($state == 2)
for (@serviceperfdata)
{
handle_performance_data ($host, 'nagios', $pinst, $script->{'type'},
- $time, $_);
+ $time, $_);
}
}
} # execute_script