Minor fixes and improvements. Discovery

Former-commit-id: d4410ddca6aec18ed28b7b0236ee16a3e8a6d2b8
This commit is contained in:
fbsanchez 2019-02-22 18:12:01 +01:00
parent 2c1eb0fe03
commit 4abf19722b
3 changed files with 46 additions and 1 deletions

View File

@ -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.
*
@ -344,6 +386,7 @@ class ConsoleSupervisor
* Check if CRON is running.
* NOTIF.CRON.CONFIGURED
*/
if (enterprise_installed()) {
$this->checkCronRunning();
}

View File

@ -2680,7 +2680,7 @@ function config_check()
|| (get_system_time() - $config['cron_last_run']) > 3600
) {
$supervisor = new ConsoleSupervisor(false);
$supervisor->checkCronRunning();
$supervisor->runBasic();
}
}

View File

@ -20,6 +20,8 @@ package PandoraFMS::DB;
use strict;
use warnings;
use DBI;
use lib '/usr/lib/perl5';
use PandoraFMS::Tools;
#use Data::Dumper;