mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Connectivity Helper to check and record device reachability (#13315)
* Fping WIP
* Update availability, move ping rrd update in the same place as db update.
* move classes around
* make device:ping command work
* use new code, remove legacy code
* save metrics boolean prevents all saves
style fixes
* update device array
* style fixes
* Update unit test
* fix whitespace
* Fix Fping stub
* fix backwards if
* fix phpstan complaining
* Fix return type
* add fillable to DeviceOutage model.
* device_outage migration to add id...
* missed line in db_schema.yaml
* 1 billion more comments on the brain damage up/down code
* tests for status and status_reason fields
* fix style again :D
* Duplicate legacy isSNMPable() functionality
but with only one snmp call ever 😎
* Remove unused variable
* fix migrations for sqlite
This commit is contained in:
@@ -137,9 +137,9 @@ function discover_device(&$device, $force_module = false)
|
||||
// Start counting device poll time
|
||||
echo $device['hostname'] . ' ' . $device['device_id'] . ' ' . $device['os'] . ' ';
|
||||
|
||||
$response = device_is_up($device, true);
|
||||
$helper = new \LibreNMS\Polling\ConnectivityHelper(DeviceCache::getPrimary());
|
||||
|
||||
if ($response['status'] !== '1') {
|
||||
if (! $helper->isUp()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user