mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Rename NetSnmp to SnmpQuery (#13344)
* Rename NetSnmp to SnmpQuery Always resolve a new instance. It was not expected to be a singleton, set options persisted. This means numeric() works properly now * fix snmpfetch call and style * Ability to set device from device array
This commit is contained in:
@@ -32,7 +32,7 @@ use LibreNMS\Data\Source\Fping;
|
||||
use LibreNMS\Data\Source\FpingResponse;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
use Log;
|
||||
use NetSnmp;
|
||||
use SnmpQuery;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
class ConnectivityHelper
|
||||
@@ -133,7 +133,7 @@ class ConnectivityHelper
|
||||
|
||||
public function isSNMPable(): bool
|
||||
{
|
||||
$response = NetSnmp::device($this->device)->get('SNMPv2-MIB::sysObjectID.0');
|
||||
$response = SnmpQuery::device($this->device)->get('SNMPv2-MIB::sysObjectID.0');
|
||||
|
||||
return $response->getExitCode() === 0 || $response->isValid();
|
||||
}
|
||||
|
Reference in New Issue
Block a user