mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Minor fixes and improvements. Discovery
Former-commit-id: d4410ddca6aec18ed28b7b0236ee16a3e8a6d2b8
This commit is contained in:
parent
2c1eb0fe03
commit
4abf19722b
@ -141,6 +141,48 @@ class ConsoleSupervisor
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manage scheduled tasks (basic).
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function runBasic()
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check license.
|
||||||
|
* NOTIF.LICENSE.EXPIRATION
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->checkLicense();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check component statuses (servers down - frozen).
|
||||||
|
* NOTIF.SERVER.STATUS.ID_SERVER
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->checkPandoraServers();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check at least 1 server running in master mode.
|
||||||
|
* NOTIF.SERVER.MASTER
|
||||||
|
*/
|
||||||
|
|
||||||
|
$this->checkPandoraServerMasterAvailable();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if CRON is running.
|
||||||
|
* NOTIF.CRON.CONFIGURED
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (enterprise_installed()) {
|
||||||
|
$this->checkCronRunning();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manage scheduled tasks.
|
* Manage scheduled tasks.
|
||||||
*
|
*
|
||||||
@ -344,6 +386,7 @@ class ConsoleSupervisor
|
|||||||
* Check if CRON is running.
|
* Check if CRON is running.
|
||||||
* NOTIF.CRON.CONFIGURED
|
* NOTIF.CRON.CONFIGURED
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (enterprise_installed()) {
|
if (enterprise_installed()) {
|
||||||
$this->checkCronRunning();
|
$this->checkCronRunning();
|
||||||
}
|
}
|
||||||
|
@ -2680,7 +2680,7 @@ function config_check()
|
|||||||
|| (get_system_time() - $config['cron_last_run']) > 3600
|
|| (get_system_time() - $config['cron_last_run']) > 3600
|
||||||
) {
|
) {
|
||||||
$supervisor = new ConsoleSupervisor(false);
|
$supervisor = new ConsoleSupervisor(false);
|
||||||
$supervisor->checkCronRunning();
|
$supervisor->runBasic();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@ package PandoraFMS::DB;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
|
||||||
|
use lib '/usr/lib/perl5';
|
||||||
use PandoraFMS::Tools;
|
use PandoraFMS::Tools;
|
||||||
|
|
||||||
#use Data::Dumper;
|
#use Data::Dumper;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user