diff --git a/LibreNMS/Alert/AlertUtil.php b/LibreNMS/Alert/AlertUtil.php index ee1c6e9678..1fa4d1b12a 100644 --- a/LibreNMS/Alert/AlertUtil.php +++ b/LibreNMS/Alert/AlertUtil.php @@ -156,7 +156,7 @@ class AlertUtil $contacts = []; foreach ($results as $result) { - $device = DeviceCache::get($result); + $device = DeviceCache::get($result['device_id']); $email = $device->getAttrib('override_sysContact_bool') ? $device->getAttrib('override_sysContact_string') : $device->sysContact; diff --git a/LibreNMS/Alert/RunAlerts.php b/LibreNMS/Alert/RunAlerts.php index aad4add77f..dbfcd26fb3 100644 --- a/LibreNMS/Alert/RunAlerts.php +++ b/LibreNMS/Alert/RunAlerts.php @@ -511,7 +511,7 @@ class RunAlerts $tmp = $instance->deliverAlert($obj, $item['opts'] ?? []); $this->alertLog($tmp, $obj, $obj['transport']); } catch (AlertTransportDeliveryException $e) { - Eventlog::log($e->getMessage(), $obj['device_id'], 'alert', Severity::Error); + Eventlog::log($e->getTraceAsString() . PHP_EOL . $e->getMessage(), $obj['device_id'], 'alert', Severity::Error); $this->alertLog($e->getMessage(), $obj, $obj['transport']); } catch (\Exception $e) { $this->alertLog($e, $obj, $obj['transport']);