Update PingCheck.php to remove duplicate "Device status changed to ... from icmp check." event (#14785)

* Update PingCheck.php

Remove duplicate log entry per https://github.com/librenms/librenms/issues/14751

* Update PingCheck.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
MANT5149
2023-01-21 05:17:43 -08:00
committed by GitHub
parent 309a9be3b6
commit d86b9ce889

View File

@@ -26,7 +26,6 @@
namespace App\Jobs;
use App\Models\Device;
use App\Models\Eventlog;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
@@ -254,7 +253,6 @@ class PingCheck implements ShouldQueue
// if changed, update reason
$device->status_reason = $device->status ? '' : 'icmp';
$type = $device->status ? 'up' : 'down';
Eventlog::log('Device status changed to ' . ucfirst($type) . ' from icmp check.', $device->device_id, $type);
}
$device->save(); // only saves if needed (which is every time because of last_ping)