Misc device column cleanups (#15518)

* Misc device column cleanups
Update last_ping on poll

* Revert inserted change for now
This commit is contained in:
Tony Murray
2023-11-02 01:51:52 -05:00
committed by GitHub
parent 7a72f81ee6
commit 4622742629
2 changed files with 6 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ namespace LibreNMS\Polling;
use App\Models\Device;
use App\Models\DeviceOutage;
use App\Models\Eventlog;
use Carbon\Carbon;
use LibreNMS\Config;
use LibreNMS\Data\Source\Fping;
use LibreNMS\Data\Source\FpingResponse;
@@ -207,6 +208,7 @@ class ConnectivityHelper
$perf->debug = array_merge($perf->debug, $this->traceroute());
}
$this->device->perf()->save($perf);
$this->device->last_ping = Carbon::now();
$this->device->last_ping_timetaken = $ping_response->avg_latency ?: $this->device->last_ping_timetaken;
$this->device->save();