Webhook-Events & Health-Endpoint
- Notifier: controllerUnreachable, loginNewIp, updateAvailable - Login von neuer IP -> Webhook (Abgleich gegen audit_log) - cron_sync meldet nicht erreichbare Controller; cron_cleanup prüft täglich optional auf Updates und meldet Verfügbarkeit - health.php: Status-Endpoint (DB; optional Controller per ?deep=1&token=)
This commit is contained in:
parent
c7f9b7d39c
commit
0b1d4ec3b8
5 changed files with 116 additions and 0 deletions
|
|
@ -90,6 +90,7 @@ set_exception_handler(function($e) use ($isCli) {
|
|||
require_once __DIR__ . '/config.php';
|
||||
require_once __DIR__ . '/includes/Database.php';
|
||||
require_once __DIR__ . '/includes/UniFiController.php';
|
||||
require_once __DIR__ . '/includes/Notifier.php';
|
||||
|
||||
$db = Database::getInstance();
|
||||
|
||||
|
|
@ -194,6 +195,9 @@ try {
|
|||
$siteResult['error'] = $e->getMessage();
|
||||
$totalStats['sites_failed']++;
|
||||
logMessage(" FEHLER - " . $e->getMessage(), $isCli);
|
||||
if (class_exists('Notifier')) {
|
||||
Notifier::controllerUnreachable($site['name'], $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
$results[] = $siteResult;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue