2007-12-04 Sancho Lerena <slerena@gmail.com>
* lib/PandoraFMS/Config.pm, bin/pandora_network: This little portion of code should fix problem detected in some very extrange module "blackout" effect reported by Corona. Need check and testing before get as final. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@680 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
626e056c28
commit
7f60b3921f
|
@ -1,3 +1,9 @@
|
||||||
|
2007-12-04 Sancho Lerena <slerena@gmail.com>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Config.pm, bin/pandora_network: This little portion of
|
||||||
|
code should fix problem detected in some very extrange module "blackout"
|
||||||
|
effect reported by Corona. Need check and testing before get as final.
|
||||||
|
|
||||||
2007-11-20 Manuel Arostegui <marostegui@artica.es>
|
2007-11-20 Manuel Arostegui <marostegui@artica.es>
|
||||||
|
|
||||||
* pandora_snmpconsole,pandora_server,pandora_recon,pandora_network: Fixed
|
* pandora_snmpconsole,pandora_server,pandora_recon,pandora_network: Fixed
|
||||||
|
|
|
@ -143,13 +143,23 @@ sub pandora_network_consumer ($$) {
|
||||||
lock %current_task_hash;
|
lock %current_task_hash;
|
||||||
$current_task_hash{$data_id_agent_module}=1;
|
$current_task_hash{$data_id_agent_module}=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Executing network task with unmanaged error trapping
|
||||||
|
eval {
|
||||||
# Call network execution process
|
# Call network execution process
|
||||||
exec_network_module ( $pa_config, $data_id_agent_module, $dbh);
|
exec_network_module ( $pa_config, $data_id_agent_module, $dbh);
|
||||||
|
};
|
||||||
|
if ($@){
|
||||||
|
logger ($pa_config, "[ERROR] Network Task for module $data_id_agent_module causes a system exception", 0);
|
||||||
|
logger ($pa_config, "ERROR Code: $@", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove from queue. If catch an error, probably data is
|
||||||
|
# not been processed, but has been freed from task queue
|
||||||
{
|
{
|
||||||
lock %current_task_hash;
|
lock %current_task_hash;
|
||||||
delete($current_task_hash{$data_id_agent_module});
|
delete($current_task_hash{$data_id_agent_module});
|
||||||
}
|
}
|
||||||
|
|
||||||
$counter = 0;
|
$counter = 0;
|
||||||
} else {
|
} else {
|
||||||
$counter ++;
|
$counter ++;
|
||||||
|
@ -262,7 +272,7 @@ sub pandora_ping_icmp {
|
||||||
|
|
||||||
# Make more than a single ping (as defined in icmp_checks
|
# Make more than a single ping (as defined in icmp_checks
|
||||||
for ($temp =0; $temp < $pa_config->{'icmp_checks'}; $temp++){
|
for ($temp =0; $temp < $pa_config->{'icmp_checks'}; $temp++){
|
||||||
# Some hosts don't accept ICMP with too small payload. Use 16 Bytes
|
# Some hosts don't accept ICMP with too small payload. Use 16 Bytes min
|
||||||
{
|
{
|
||||||
lock $icmp_lock;
|
lock $icmp_lock;
|
||||||
$p = Net::Ping->new("icmp", $l_timeout, 32);
|
$p = Net::Ping->new("icmp", $l_timeout, 32);
|
||||||
|
@ -415,7 +425,7 @@ sub pandora_query_snmp (%$$$$) {
|
||||||
Community => $snmp_community,
|
Community => $snmp_community,
|
||||||
Version => 1);
|
Version => 1);
|
||||||
if ( (!defined($SESSION)) && ($snmp_target != "") && ($snmp_community != "") && ($snmp_oid != "")) {
|
if ( (!defined($SESSION)) && ($snmp_target != "") && ($snmp_community != "") && ($snmp_oid != "")) {
|
||||||
logger($pa_config, "SNMP ERROR SESSION for Target $snmp_target ", 4);
|
logger($pa_config, "SNMP ERROR SESSION for Target $snmp_target ", 2);
|
||||||
$_[4] = "1";
|
$_[4] = "1";
|
||||||
} else {
|
} else {
|
||||||
# Perl uses different OID syntax than SNMPWALK or PHP's SNMP
|
# Perl uses different OID syntax than SNMPWALK or PHP's SNMP
|
||||||
|
|
|
@ -34,8 +34,8 @@ our @EXPORT = qw( pandora_help_screen
|
||||||
# There is no global vars, all variables (setup) passed as hash reference
|
# There is no global vars, all variables (setup) passed as hash reference
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "1.3beta3";
|
my $pandora_version = "1.3.1";
|
||||||
my $pandora_build="PS071008";
|
my $pandora_build="PS071203";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -136,7 +136,7 @@ sub pandora_loadconfig {
|
||||||
$pa_config->{"servername"}=~ s/\s//g; # Replace ' ' chars
|
$pa_config->{"servername"}=~ s/\s//g; # Replace ' ' chars
|
||||||
$pa_config->{"networkserver"}=0;
|
$pa_config->{"networkserver"}=0;
|
||||||
$pa_config->{"dataserver"}=0;
|
$pa_config->{"dataserver"}=0;
|
||||||
$pa_config->{"icmp_checks"}=1;
|
$pa_config->{"icmp_checks"}=1; # Introduced on 1.3.1
|
||||||
$pa_config->{"reconserver"}=0;
|
$pa_config->{"reconserver"}=0;
|
||||||
$pa_config->{"servermode"}="";
|
$pa_config->{"servermode"}="";
|
||||||
$pa_config->{'snmp_logfile'}="/var/log/pandora/pandora_snmptrap.log";
|
$pa_config->{'snmp_logfile'}="/var/log/pandora/pandora_snmptrap.log";
|
||||||
|
|
Loading…
Reference in New Issue