mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
2007-06-22 Sancho Lerena <slerena@artica.es>
* bin/pandora_recon.pl: This sould be final modifications for recon. Fixed a bug reported by Enrique Verdes in the development list. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@535 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
5b15ef46f4
commit
f9f49ec574
@ -1,3 +1,8 @@
|
|||||||
|
2007-06-22 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
|
* bin/pandora_recon.pl: This sould be final modifications for recon.
|
||||||
|
Fixed a bug reported by Enrique Verdes in the development list.
|
||||||
|
|
||||||
2007-06-19 Sancho Lerena <slerena@artica.es>
|
2007-06-19 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* bin/PandoraFMS/DB.pm: Added support to timeframe alerts.
|
* bin/PandoraFMS/DB.pm: Added support to timeframe alerts.
|
||||||
|
@ -68,8 +68,8 @@ if ( $pa_config{"daemon"} eq "1" ) {
|
|||||||
# Runs main program (have a infinite loop inside)
|
# Runs main program (have a infinite loop inside)
|
||||||
|
|
||||||
threads->new( \&pandora_recon_subsystem, \%pa_config);
|
threads->new( \&pandora_recon_subsystem, \%pa_config);
|
||||||
sleep(1);
|
|
||||||
|
|
||||||
|
sleep(1);
|
||||||
while ( 1 ){
|
while ( 1 ){
|
||||||
pandora_serverkeepaliver ($pa_config, 3, $dbh);
|
pandora_serverkeepaliver ($pa_config, 3, $dbh);
|
||||||
threads->yield;
|
threads->yield;
|
||||||
@ -115,8 +115,7 @@ sub pandora_recon_subsystem {
|
|||||||
logger($pa_config,"Recon Server: Executing task [$task_name]",8);
|
logger($pa_config,"Recon Server: Executing task [$task_name]",8);
|
||||||
# EXEC TASK and mark as "in progress" != -1
|
# EXEC TASK and mark as "in progress" != -1
|
||||||
pandora_update_reconstatus ($pa_config, $dbh, $id_task, 0);
|
pandora_update_reconstatus ($pa_config, $dbh, $id_task, 0);
|
||||||
threads->new( \&pandora_exec_task, $pa_config, $id_task);
|
pandora_exec_task ($pa_config, $id_task);
|
||||||
# pandora_exec_task ($pa_config, $id_task);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$exec_sql->finish();
|
$exec_sql->finish();
|
||||||
@ -224,7 +223,10 @@ sub pandora_exec_task {
|
|||||||
sub scan_icmp {
|
sub scan_icmp {
|
||||||
my $dest = $_[0];
|
my $dest = $_[0];
|
||||||
my $l_timeout = $_[1];
|
my $l_timeout = $_[1];
|
||||||
$result = ping(hostname => $dest, timeout => $l_timeout, size => 32, count => 1);
|
my $result = ping(hostname => $dest, timeout => $l_timeout, size => 32, count => 1);
|
||||||
|
if (!defined($result)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if ($result) {
|
if ($result) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user