mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
2012-02-01 Ramon Novoa <rnovoa@artica.es>
* conf/pandora_server.conf, lib/PandoraFMS/Config.pm, lib/PandoraFMS/PluginServer.pm: Use timeout by default instead of pandora_exec. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5459 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
45cc7ae535
commit
1e0b008bf9
@ -1,3 +1,10 @@
|
|||||||
|
2012-02-01 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* conf/pandora_server.conf,
|
||||||
|
lib/PandoraFMS/Config.pm,
|
||||||
|
lib/PandoraFMS/PluginServer.pm: Use timeout by default instead of
|
||||||
|
pandora_exec.
|
||||||
|
|
||||||
2012-01-30 Ramon Novoa <rnovoa@artica.es>
|
2012-01-30 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* lib/PandoraFMS/Config.pm: Updated version string.
|
* lib/PandoraFMS/Config.pm: Updated version string.
|
||||||
|
@ -98,7 +98,7 @@ pluginserver 0
|
|||||||
|
|
||||||
# Pandora FMS Plugin exec tool filepath (by default at /usr/bin)
|
# Pandora FMS Plugin exec tool filepath (by default at /usr/bin)
|
||||||
|
|
||||||
plugin_exec /usr/bin/pandora_exec
|
plugin_exec /usr/bin/timeout
|
||||||
|
|
||||||
# predictionserver : 1 or 0. Set to 1 to activate prediction server with this setup
|
# predictionserver : 1 or 0. Set to 1 to activate prediction server with this setup
|
||||||
# DISABLED BY DEFAULT
|
# DISABLED BY DEFAULT
|
||||||
|
@ -204,7 +204,7 @@ sub pandora_load_config {
|
|||||||
$pa_config->{"tcp_timeout"} = 20; # Introduced on 1.3.1
|
$pa_config->{"tcp_timeout"} = 20; # Introduced on 1.3.1
|
||||||
$pa_config->{"snmp_proc_deadresponse"} = 1; # Introduced on 1.3.1 10 Feb08
|
$pa_config->{"snmp_proc_deadresponse"} = 1; # Introduced on 1.3.1 10 Feb08
|
||||||
$pa_config->{"plugin_threads"} = 2; # Introduced on 2.0
|
$pa_config->{"plugin_threads"} = 2; # Introduced on 2.0
|
||||||
$pa_config->{"plugin_exec"} = '/usr/bin/pandora_exec'; # 3.0
|
$pa_config->{"plugin_exec"} = '/usr/bin/timeout'; # 3.0
|
||||||
$pa_config->{"recon_threads"} = 2; # Introduced on 2.0
|
$pa_config->{"recon_threads"} = 2; # Introduced on 2.0
|
||||||
$pa_config->{"prediction_threads"} = 1; # Introduced on 2.0
|
$pa_config->{"prediction_threads"} = 1; # Introduced on 2.0
|
||||||
$pa_config->{"plugin_timeout"} = 5; # Introduced on 2.0
|
$pa_config->{"plugin_timeout"} = 5; # Introduced on 2.0
|
||||||
|
@ -52,10 +52,10 @@ sub new ($$;$) {
|
|||||||
|
|
||||||
return undef unless $config->{'pluginserver'} == 1;
|
return undef unless $config->{'pluginserver'} == 1;
|
||||||
|
|
||||||
# Check for pandora_exec
|
# Check for plugin_exec
|
||||||
if (system($config->{'plugin_exec'} . ' > /dev/null 2>&1') != 256) {
|
if (! -x $config->{'plugin_exec'}) {
|
||||||
logger ($config, " [E] pandora_exec not found. Plugin Server not started.", 1);
|
logger ($config, ' [E] ' . $config->{'plugin_exec'} . ' not found. Plugin Server not started.', 1);
|
||||||
print_message ($config, " [E] pandora_exec not found. Plugin Server not started.", 1);
|
print_message ($config, ' [E] ' . $config->{'plugin_exec'} . ' not found. Plugin Server not started.', 1);
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ sub data_consumer ($$) {
|
|||||||
logger ($pa_config, "Executing AM # $module_id plugin command '$command'", 9);
|
logger ($pa_config, "Executing AM # $module_id plugin command '$command'", 9);
|
||||||
|
|
||||||
# Execute command
|
# Execute command
|
||||||
$command = $pa_config->{'plugin_exec'} . ' ' . $timeout . ' ' . quotemeta ($command);
|
$command = $pa_config->{'plugin_exec'} . ' ' . $timeout . ' ' . $command;
|
||||||
|
|
||||||
my $module_data;
|
my $module_data;
|
||||||
eval {
|
eval {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user