Performs the Icinga check.

@return $this
328176
public function run()
    {
        try {
            return $this
                ->preRun()
                ->check();
        } catch (Exception $e) {
            return $this
                ->setMessage($e->getMessage())
                ->setCode($e->getCode());
        }
    }
719583
public function commit(): self
    {
        ($this->fulfill)(
            new Request(
                $this->current()->commitEndpoint(),
                Method::post(),
                new ProtocolVersion(1, 1),
                $this->headers,
                $this->body
            )
        );
        $this->transactions = $this->transactions->dropEnd(1);

        return $this;
    }
289056
public function check()
	{
		// Check if the db connector has been set.
		if (!($this->db instanceof PostgresqlDriver))
		{
			throw new \Exception('Database connection wrong type.');
		}

		// Check if the tables have been specified.
		if (empty($this->from))
		{
			throw new \Exception('ERROR: No Tables Specified');
		}

		return $this;
	}
654692
public function normalizeDeclaration()
    {
        if (empty($this->getTable())) {
            $this->getConstants()->remove('TABLE');
        }

        if (empty($this->getDatabase())) {
            $this->getConstants()->remove('DATABASE');
        }

        return $this;
    }
409239
public function envRestart()
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        $this->engineInstance()->restart();
        $this->executeCommandHook(__FUNCTION__, 'after');

        return $this;
    }
328749
public function clearWatched(): self
    {
        foreach ($this->watchedFiles as $wd) {
            inotify_rm_watch($this->inotify, $wd);
        }

        $this->watchedFiles = [];

        return $this;
    }
456522
public function onErrorSkipField(): self
    {
        $this->_validations[\count($this->_validations) - 1]['skip'] = self::SKIP_ONE;

        return $this;
    }
1084413
public function init() {
		if ($this->initialized)
			return $this;
		$this->initialized = true;
		$this->check_tables();
		return $this;
	}
1128849
public function beginTransaction()
    {
        $this->_connect();
        $q = $this->_profiler->queryStart('begin', Zend_Db_Profiler::TRANSACTION);
        $this->_beginTransaction();
        $this->_profiler->queryEnd($q);
        return $this;
    }
994060
protected function registerBootChecker()
    {
        $this->app->singleton(Component::BOOTCHECKER, $this->getCoreConfig('bindings.' . Component::BOOTCHECKER));

        $this->app->bind(BootCheckerInterface::class, Component::BOOTCHECKER);

        return $this;
    }
694787
public function wOr()
    {
        $this->setDefaultOperator(PredicateSet::OP_OR);
        if (func_num_args()) {
            call_user_func_array([$this, 'condition'], func_get_args());
            $this->endOr();
        }
        
        return $this;
    }
711944
protected function _process()
    {
        if ($this->__isProcessed === true) {
            return $this;
        }

        $limit = $this->getLimit();
        if (is_null($limit)) {
            $this->setPagesNumber(1);
            $this->setOffset(0);
        } else {
            $this->setPagesNumber(round($this->getItemsNumber() / $this->getLimit()));
        }

        $this->__isProcessed = true;
        return $this;
    }
351865
public function checkDATA() {
        if (!defined(DATA))
                define(DATA,
                    __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR);

        if (!is_dir(DATA)) mkdir(DATA, 0777, true);

        return $this;
    }
1176508
private function refresh()
    {
        $this->setHandler($this->config->get('logging.default', 'stack'));

        $this->messages = [
            'handler' => '',
            'files'   => [],
        ];
        $this->files    = [];

        $this->checkHandler();
        $this->checkLogFiles();

        return $this;
    }
1073422
protected function addWatch()
    {
        return inotify_add_watch($this->getBag()->getInotify(), $this->getResource()->getResource(), $this->getInotifyEventMask());
    }
108470
public function rollback() {
        if ($this->transactionLevel < 0) throw new RuntimeException('Negative transaction nesting level detected: '.$this->transactionLevel);

        if      (!$this->isConnected())    trigger_error('Not connected', E_USER_WARNING);
        else if (!$this->transactionLevel) trigger_error('No database transaction to roll back', E_USER_WARNING);
        else {
            if ($this->transactionLevel == 1)
                $this->execute('rollback');
            $this->transactionLevel--;
        }
        return $this;
    }
432350
public function handleCron(): self
    {
        $groups = explode(',', $this->params->getScriptParam('g', 'default'));

        $commands = [];
        foreach ($groups as $group) {
            $commands[] = $this->params->getBotParam('cron.groups.' . $group, []);
        }
        $this->telegram->runCommands(array_merge(...$commands));

        return $this;
    }