mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Availability module fixes (#15369)
* Refactor poller to allow modules to run even if the device is down Include core in config (but not webui) to avoid silly shenanigans Inject datastore into polling * Needed to split datastore interface * Cleanup some data_udpate() references * Apply fixes from StyleCI * Fix legacy poller :D * Output to the correct stream * Fix lint issues * Apply fixes from StyleCI * Fix discovery not including core and submodule handling * Use whereRaw --------- Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
@@ -32,12 +33,12 @@ use SnmpQuery;
|
||||
|
||||
class Arbos extends OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$flows = SnmpQuery::get('PEAKFLOW-SP-MIB::deviceTotalFlows.0')->value();
|
||||
|
||||
if (is_numeric($flows)) {
|
||||
app('Datastore')->put($this->getDeviceArray(), 'arbos_flows', [
|
||||
$datastore->put($this->getDeviceArray(), 'arbos_flows', [
|
||||
'rrd_def' => RrdDefinition::make()->addDataset('flows', 'GAUGE', 0, 3000000),
|
||||
], [
|
||||
'flows' => $flows,
|
||||
|
@@ -25,20 +25,21 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Asyncos extends OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
// Get stats only if device is web proxy
|
||||
if ($this->getDevice()->sysObjectID == '.1.3.6.1.4.1.15497.1.2') {
|
||||
$connections = \SnmpQuery::get('TCP-MIB::tcpCurrEstab.0')->value();
|
||||
|
||||
if (is_numeric($connections)) {
|
||||
data_update($this->getDeviceArray(), 'asyncos_conns', [
|
||||
$datastore->put($this->getDeviceArray(), 'asyncos_conns', [
|
||||
'rrd_def' => RrdDefinition::make()->addDataset('connections', 'GAUGE', 0, 50000),
|
||||
], [
|
||||
'connections' => $connections,
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\OSDiscovery;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS;
|
||||
@@ -40,7 +41,7 @@ class Barracudangfirewall extends OS implements OSDiscovery, OSPolling
|
||||
}
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
// TODO move to count sensor
|
||||
$sessions = snmp_get($this->getDeviceArray(), 'firewallSessions64.8.102.119.83.116.97.116.115.0', '-OQv', 'PHION-MIB');
|
||||
@@ -50,7 +51,7 @@ class Barracudangfirewall extends OS implements OSDiscovery, OSPolling
|
||||
$fields = ['fw_sessions' => $sessions];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
app('Datastore')->put($this->getDeviceArray(), 'barracuda_firewall_sessions', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'barracuda_firewall_sessions', $tags, $fields);
|
||||
$this->enableGraph('barracuda_firewall_sessions');
|
||||
}
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@ namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\AccessPoint;
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessApCountDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
@@ -38,7 +39,7 @@ class Ciscowlc extends Cisco implements
|
||||
WirelessClientsDiscovery,
|
||||
WirelessApCountDiscovery
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$device = $this->getDeviceArray();
|
||||
$apNames = \SnmpQuery::enumStrings()->walk('AIRESPACE-WIRELESS-MIB::bsnAPName')->table(1);
|
||||
@@ -65,7 +66,7 @@ class Ciscowlc extends Cisco implements
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'ciscowlc', $tags, $fields);
|
||||
$datastore->put($device, 'ciscowlc', $tags, $fields);
|
||||
|
||||
$db_aps = $this->getDevice()->accessPoints->keyBy->getCompositeKey();
|
||||
$valid_ap_ids = [];
|
||||
@@ -105,7 +106,7 @@ class Ciscowlc extends Cisco implements
|
||||
->addDataset('numasoclients', 'GAUGE', 0, 500)
|
||||
->addDataset('interference', 'GAUGE', 0, 2000);
|
||||
|
||||
data_update($device, 'arubaap', [
|
||||
$datastore->put($device, 'arubaap', [
|
||||
'name' => $ap->name,
|
||||
'radionum' => $ap->radio_number,
|
||||
'rrd_name' => ['arubaap', $ap->name . $ap->radio_number],
|
||||
|
@@ -29,11 +29,12 @@ use App\Models\Eventlog;
|
||||
use App\Models\TnmsneInfo;
|
||||
use App\Observers\ModuleModelObserver;
|
||||
use LibreNMS\Enum\Severity;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
|
||||
class Coriant extends \LibreNMS\OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
echo 'TNMS-NBI-MIB: enmsNETable';
|
||||
|
||||
|
@@ -27,6 +27,7 @@ namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessFrequencyDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery;
|
||||
@@ -62,7 +63,7 @@ class Epmp extends OS implements
|
||||
}
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$device = $this->getDeviceArray();
|
||||
|
||||
@@ -77,7 +78,7 @@ class Epmp extends OS implements
|
||||
'numVisible' => $cambiumGPSNumVisibleSat,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-gps', $tags, $fields);
|
||||
$datastore->put($device, 'cambium-epmp-gps', $tags, $fields);
|
||||
$this->enableGraph('cambium_epmp_gps');
|
||||
}
|
||||
|
||||
@@ -92,7 +93,7 @@ class Epmp extends OS implements
|
||||
'downlinkMCSMode' => $cambiumSTADownlinkMCSMode,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-modulation', $tags, $fields);
|
||||
$datastore->put($device, 'cambium-epmp-modulation', $tags, $fields);
|
||||
$this->enableGraph('cambium_epmp_modulation');
|
||||
}
|
||||
|
||||
@@ -110,7 +111,7 @@ class Epmp extends OS implements
|
||||
'authFailure' => $sysNetworkEntryAuthenticationFailure,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-access', $tags, $fields);
|
||||
$datastore->put($device, 'cambium-epmp-access', $tags, $fields);
|
||||
$this->enableGraph('cambium_epmp_access');
|
||||
}
|
||||
|
||||
@@ -134,7 +135,7 @@ class Epmp extends OS implements
|
||||
'dlwlanframeutilization' => $dlWlanFrameUtilization,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-frameUtilization', $tags, $fields);
|
||||
$datastore->put($device, 'cambium-epmp-frameUtilization', $tags, $fields);
|
||||
$this->enableGraph('cambium-epmp-frameUtilization');
|
||||
}
|
||||
}
|
||||
|
@@ -25,13 +25,14 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class F5 extends OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$metadata = [
|
||||
'F5-BIGIP-APM-MIB::apmAccessStatCurrentActiveSessions.0' => [
|
||||
@@ -75,7 +76,7 @@ class F5 extends OS implements OSPolling
|
||||
$info['dataset'] => $data[$key],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), $info['name'], $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), $info['name'], $tags, $fields);
|
||||
$this->enableGraph($info['name']);
|
||||
}
|
||||
}
|
||||
@@ -90,7 +91,7 @@ class F5 extends OS implements OSPolling
|
||||
'TotCompatConns' => $data['F5-BIGIP-SYSTEM-MIB::sysClientsslStatTotCompatConns.0'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'bigip_system_tps', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'bigip_system_tps', $tags, $fields);
|
||||
$this->enableGraph('bigip_system_tps');
|
||||
}
|
||||
}
|
||||
|
@@ -3,10 +3,10 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\Interfaces\Discovery\OSDiscovery;
|
||||
use LibreNMS\OS\Shared\Fortinet;
|
||||
|
||||
class Fortiadc extends Fortinet implements OSPolling
|
||||
class Fortiadc extends Fortinet implements OSDiscovery
|
||||
{
|
||||
public function discoverOS(Device $device): void
|
||||
{
|
||||
@@ -14,9 +14,4 @@ class Fortiadc extends Fortinet implements OSPolling
|
||||
|
||||
$device->hardware = $device->hardware ?: $this->getHardwareName();
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@ namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessApCountDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
@@ -45,7 +46,7 @@ class Fortigate extends Fortinet implements
|
||||
$device->hardware = $device->hardware ?: $this->getHardwareName();
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$sessions = snmp_get($this->getDeviceArray(), 'FORTINET-FORTIGATE-MIB::fgSysSesCount.0', '-Ovq');
|
||||
if (is_numeric($sessions)) {
|
||||
@@ -57,7 +58,7 @@ class Fortigate extends Fortinet implements
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
app()->make('Datastore')->put($this->getDeviceArray(), 'fortigate_sessions', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'fortigate_sessions', $tags, $fields);
|
||||
$this->enableGraph('fortigate_sessions');
|
||||
}
|
||||
|
||||
@@ -71,7 +72,7 @@ class Fortigate extends Fortinet implements
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
app()->make('Datastore')->put($this->getDeviceArray(), 'fortigate_cpu', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'fortigate_cpu', $tags, $fields);
|
||||
$this->enableGraph('fortigate_cpu');
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS\Shared\Fortinet;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
@@ -40,7 +41,7 @@ class Fortios extends Fortinet implements OSPolling
|
||||
$device->features = snmp_get($this->getDeviceArray(), 'fmDeviceEntMode.1', '-OQv', 'FORTINET-FORTIMANAGER-FORTIANALYZER-MIB') == 'fmg-faz' ? 'with Analyzer features' : null;
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
// Log rate only for FortiAnalyzer features enabled FortiManagers
|
||||
if ($this->getDevice()->features == 'with Analyzer features') {
|
||||
@@ -49,7 +50,7 @@ class Fortios extends Fortinet implements OSPolling
|
||||
$rrd_def = RrdDefinition::make()->addDataset('lograte', 'GAUGE', 0, 100000000);
|
||||
$fields = ['lograte' => $log_rate];
|
||||
$tags = compact('rrd_def');
|
||||
app()->make('Datastore')->put($this->getDeviceArray(), 'fortios_lograte', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'fortios_lograte', $tags, $fields);
|
||||
$this->enableGraph('fortios_lograte');
|
||||
}
|
||||
}
|
||||
|
@@ -2,12 +2,13 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Gaia extends \LibreNMS\OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$oids = ['fwLoggingHandlingRate.0', 'mgLSLogReceiveRate.0', 'fwNumConn.0', 'fwAccepted.0', 'fwRejected.0', 'fwDropped.0', 'fwLogged.0'];
|
||||
|
||||
@@ -24,7 +25,7 @@ class Gaia extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'gaia_firewall_lograte', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'gaia_firewall_lograte', $tags, $fields);
|
||||
$this->enableGraph('gaia_firewall_lograte');
|
||||
}
|
||||
|
||||
@@ -39,7 +40,7 @@ class Gaia extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'gaia_logserver_lograte', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'gaia_logserver_lograte', $tags, $fields);
|
||||
$this->enableGraph('gaia_logserver_lograte');
|
||||
}
|
||||
|
||||
@@ -54,7 +55,7 @@ class Gaia extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'gaia_connections', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'gaia_connections', $tags, $fields);
|
||||
$this->enableGraph('gaia_connections');
|
||||
}
|
||||
|
||||
@@ -76,7 +77,7 @@ class Gaia extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'gaia_firewall_packets', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'gaia_firewall_packets', $tags, $fields);
|
||||
$this->enableGraph('gaia_firewall_packets');
|
||||
}
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ use App\Models\IsisAdjacency;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Collection;
|
||||
use LibreNMS\DB\SyncsModels;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\IsIsDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessCellDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessChannelDiscovery;
|
||||
@@ -57,7 +58,7 @@ class Iosxe extends Ciscowlc implements
|
||||
use SyncsModels;
|
||||
use CiscoCellular;
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
// Don't poll Ciscowlc FIXME remove when wireless-controller module exists
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@ use App\Models\Device;
|
||||
use App\Models\Sla;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Collection;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\SlaDiscovery;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\Interfaces\Polling\SlaPolling;
|
||||
@@ -55,12 +56,12 @@ class Junos extends \LibreNMS\OS implements SlaDiscovery, OSPolling, SlaPolling
|
||||
$device->version = $data[0]['jnxVirtualChassisMemberSWVersion'] ?? $parsedVersion[1] ?? $parsed['version'] ?? null;
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$data = snmp_get_multi($this->getDeviceArray(), 'jnxJsSPUMonitoringCurrentFlowSession.0', '-OUQs', 'JUNIPER-SRX5000-SPU-MONITORING-MIB');
|
||||
|
||||
if (is_numeric($data[0]['jnxJsSPUMonitoringCurrentFlowSession'] ?? null)) {
|
||||
data_update($this->getDeviceArray(), 'junos_jsrx_spu_sessions', [
|
||||
$datastore->put($this->getDeviceArray(), 'junos_jsrx_spu_sessions', [
|
||||
'rrd_def' => RrdDefinition::make()->addDataset('spu_flow_sessions', 'GAUGE', 0),
|
||||
], [
|
||||
'spu_flow_sessions' => $data[0]['jnxJsSPUMonitoringCurrentFlowSession'],
|
||||
@@ -121,15 +122,7 @@ class Junos extends \LibreNMS\OS implements SlaDiscovery, OSPolling, SlaPolling
|
||||
$time = Carbon::parse($data[$owner][$test]['jnxPingResultsTime'] ?? null)->toDateTimeString();
|
||||
echo 'SLA : ' . $rtt_type . ' ' . $owner . ' ' . $test . '... ' . $sla->rtt . 'ms at ' . $time . "\n";
|
||||
|
||||
$fields = [
|
||||
'rtt' => $sla->rtt,
|
||||
];
|
||||
|
||||
// The base RRD
|
||||
$rrd_name = ['sla', $sla['sla_nr']];
|
||||
$rrd_def = RrdDefinition::make()->addDataset('rtt', 'GAUGE', 0, 300000);
|
||||
$tags = compact('sla_nr', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'sla', $tags, $fields);
|
||||
$collected = ['rtt' => $sla->rtt];
|
||||
|
||||
// Let's gather some per-type fields.
|
||||
switch ($rtt_type) {
|
||||
@@ -154,16 +147,16 @@ class Junos extends \LibreNMS\OS implements SlaDiscovery, OSPolling, SlaPolling
|
||||
->addDataset('ProbeResponses', 'GAUGE', 0, 300000)
|
||||
->addDataset('ProbeLoss', 'GAUGE', 0, 300000);
|
||||
$tags = compact('rrd_name', 'rrd_def', 'sla_nr', 'rtt_type');
|
||||
data_update($device, 'sla', $tags, $icmp);
|
||||
$fields = array_merge($fields, $icmp);
|
||||
app('Datastore')->put($device, 'sla', $tags, $icmp);
|
||||
$collected = array_merge($collected, $icmp);
|
||||
break;
|
||||
case 'NtpQuery':
|
||||
case 'UdpTimestamp':
|
||||
break;
|
||||
}
|
||||
|
||||
d_echo('The following datasources were collected for #' . $sla['sla_nr'] . ":\n");
|
||||
d_echo($fields);
|
||||
d_echo('The following datasources were collected for #' . $sla->sla_nr . ":\n");
|
||||
d_echo($collected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -25,12 +25,13 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Netscaler extends \LibreNMS\OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
echo ' IP';
|
||||
|
||||
@@ -157,7 +158,7 @@ class Netscaler extends \LibreNMS\OS implements OSPolling
|
||||
}
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'netscaler-stats-tcp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'netscaler-stats-tcp', $tags, $fields);
|
||||
|
||||
$this->enableGraph('netscaler_tcp_conn');
|
||||
$this->enableGraph('netscaler_tcp_bits');
|
||||
|
@@ -25,12 +25,13 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Nios extends \LibreNMS\OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
//#############
|
||||
// Create ddns update rrd
|
||||
@@ -59,7 +60,7 @@ class Nios extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'ib_dns_dyn_updates', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'ib_dns_dyn_updates', $tags, $fields);
|
||||
$this->enableGraph('ib_dns_dyn_updates');
|
||||
|
||||
//#################
|
||||
@@ -83,7 +84,7 @@ class Nios extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'ib_dns_performance', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'ib_dns_performance', $tags, $fields);
|
||||
$this->enableGraph('ib_dns_performance');
|
||||
|
||||
//#################
|
||||
@@ -113,7 +114,7 @@ class Nios extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'ib_dns_request_return_codes', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'ib_dns_request_return_codes', $tags, $fields);
|
||||
$this->enableGraph('ib_dns_request_return_codes');
|
||||
|
||||
//#################
|
||||
@@ -158,7 +159,7 @@ class Nios extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'ib_dhcp_messages', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'ib_dhcp_messages', $tags, $fields);
|
||||
$this->enableGraph('ib_dhcp_messages');
|
||||
}
|
||||
}
|
||||
|
@@ -25,13 +25,14 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS\Shared\Unix;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Openbsd extends Unix implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$oids = \SnmpQuery::get([
|
||||
'OPENBSD-PF-MIB::pfStateCount.0',
|
||||
@@ -57,13 +58,13 @@ class Openbsd extends Unix implements OSPolling
|
||||
'OPENBSD-PF-MIB::pfCntNoRoute.0',
|
||||
])->values();
|
||||
|
||||
$this->graphOID('states', ['states' => $oids['OPENBSD-PF-MIB::pfStateCount.0']], 'GAUGE');
|
||||
$this->graphOID('searches', ['searches' => $oids['OPENBSD-PF-MIB::pfStateSearches.0']]);
|
||||
$this->graphOID('inserts', ['inserts' => $oids['OPENBSD-PF-MIB::pfStateInserts.0']]);
|
||||
$this->graphOID('removals', ['removals' => $oids['OPENBSD-PF-MIB::pfStateRemovals.0']]);
|
||||
$this->graphOID('matches', ['matches' => $oids['OPENBSD-PF-MIB::pfCntMatch.0']]);
|
||||
$this->graphOID('states', $datastore, ['states' => $oids['OPENBSD-PF-MIB::pfStateCount.0']], 'GAUGE');
|
||||
$this->graphOID('searches', $datastore, ['searches' => $oids['OPENBSD-PF-MIB::pfStateSearches.0']]);
|
||||
$this->graphOID('inserts', $datastore, ['inserts' => $oids['OPENBSD-PF-MIB::pfStateInserts.0']]);
|
||||
$this->graphOID('removals', $datastore, ['removals' => $oids['OPENBSD-PF-MIB::pfStateRemovals.0']]);
|
||||
$this->graphOID('matches', $datastore, ['matches' => $oids['OPENBSD-PF-MIB::pfCntMatch.0']]);
|
||||
|
||||
$this->graphOID('drops', [
|
||||
$this->graphOID('drops', $datastore, [
|
||||
'badoffset' => $oids['OPENBSD-PF-MIB::pfCntBadOffset.0'],
|
||||
'fragmented' => $oids['OPENBSD-PF-MIB::pfCntFragment.0'],
|
||||
'short' => $oids['OPENBSD-PF-MIB::pfCntShort.0'],
|
||||
@@ -83,7 +84,7 @@ class Openbsd extends Unix implements OSPolling
|
||||
]);
|
||||
}
|
||||
|
||||
private function graphOID(string $graphName, array $oids, string $type = 'COUNTER'): void
|
||||
private function graphOID(string $graphName, DataStorageInterface $datastore, array $oids, string $type = 'COUNTER'): void
|
||||
{
|
||||
$rrd_def = RrdDefinition::make();
|
||||
$fields = [];
|
||||
@@ -94,7 +95,7 @@ class Openbsd extends Unix implements OSPolling
|
||||
}
|
||||
}
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), "pf_$graphName", $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), "pf_$graphName", $tags, $fields);
|
||||
|
||||
$this->enableGraph("pf_$graphName");
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
@@ -36,7 +37,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
'Packet Buffers',
|
||||
];
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$data = snmp_get_multi($this->getDeviceArray(), [
|
||||
'panSessionActive.0',
|
||||
@@ -76,7 +77,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-sessions', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-sessions', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_sessions');
|
||||
}
|
||||
@@ -89,7 +90,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-sessions-tcp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-sessions-tcp', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_sessions_tcp');
|
||||
}
|
||||
@@ -102,7 +103,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-sessions-udp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-sessions-udp', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_sessions_udp');
|
||||
}
|
||||
@@ -115,7 +116,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-sessions-icmp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-sessions-icmp', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_sessions_icmp');
|
||||
}
|
||||
@@ -128,7 +129,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-sessions-ssl', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-sessions-ssl', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_sessions_ssl');
|
||||
}
|
||||
@@ -141,7 +142,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-sessions-sslutil', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-sessions-sslutil', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_sessions_sslutil');
|
||||
}
|
||||
@@ -154,7 +155,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-activetunnels', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-activetunnels', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_activetunnels');
|
||||
}
|
||||
@@ -166,7 +167,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosBlkNumEntries', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosBlkNumEntries', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosBlkNumEntries');
|
||||
}
|
||||
@@ -178,7 +179,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowMeterVsysThrottle', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowMeterVsysThrottle', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowMeterVsysThrottle');
|
||||
}
|
||||
@@ -190,7 +191,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowPolicyDeny', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowPolicyDeny', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowPolicyDeny');
|
||||
}
|
||||
@@ -202,7 +203,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowPolicyNat', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowPolicyNat', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowPolicyNat');
|
||||
}
|
||||
@@ -214,7 +215,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowScanDrop', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowScanDrop', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowScanDrop');
|
||||
}
|
||||
@@ -226,7 +227,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosDropIpBlocked', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosDropIpBlocked', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosDropIpBlocked');
|
||||
}
|
||||
@@ -238,7 +239,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosRedIcmp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosRedIcmp', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosRedIcmp');
|
||||
}
|
||||
@@ -250,7 +251,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosRedIcmp6', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosRedIcmp6', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosRedIcmp6');
|
||||
}
|
||||
@@ -262,7 +263,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosRedIp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosRedIp', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosRedIp');
|
||||
}
|
||||
@@ -274,7 +275,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosRedTcp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosRedTcp', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosRedTcp');
|
||||
}
|
||||
@@ -286,7 +287,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosRedUdp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosRedUdp', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosRedUdp');
|
||||
}
|
||||
@@ -298,7 +299,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosPbpDrop', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosPbpDrop', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosPbpDrop');
|
||||
}
|
||||
@@ -310,7 +311,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosRuleDeny', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosRuleDeny', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosRuleDeny');
|
||||
}
|
||||
@@ -322,7 +323,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosRuleDrop', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosRuleDrop', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosRuleDrop');
|
||||
}
|
||||
@@ -334,7 +335,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosZoneRedAct', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosZoneRedAct', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosZoneRedAct');
|
||||
}
|
||||
@@ -346,7 +347,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosZoneRedMax', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosZoneRedMax', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosZoneRedMax');
|
||||
}
|
||||
@@ -358,7 +359,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosSyncookieNotTcpSyn', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosSyncookieNotTcpSyn', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosSyncookieNotTcpSyn');
|
||||
}
|
||||
@@ -370,7 +371,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosSyncookieNotTcpSynAck', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosSyncookieNotTcpSynAck', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosSyncookieNotTcpSynAck');
|
||||
}
|
||||
@@ -382,7 +383,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosBlkSwEntries', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosBlkSwEntries', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosBlkSwEntries');
|
||||
}
|
||||
@@ -394,7 +395,7 @@ class Panos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'panos-panFlowDosBlkHwEntries', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'panos-panFlowDosBlkHwEntries', $tags, $fields);
|
||||
|
||||
$this->enableGraph('panos_panFlowDosBlkHwEntries');
|
||||
}
|
||||
|
@@ -25,13 +25,14 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS\Shared\Unix;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Pfsense extends Unix implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$oids = snmp_get_multi($this->getDeviceArray(), [
|
||||
'pfStateTableCount.0',
|
||||
@@ -54,7 +55,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_states', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_states', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_states');
|
||||
}
|
||||
@@ -67,7 +68,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_searches', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_searches', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_searches');
|
||||
}
|
||||
@@ -80,7 +81,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_inserts', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_inserts', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_inserts');
|
||||
}
|
||||
@@ -93,7 +94,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_removals', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_removals', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_removals');
|
||||
}
|
||||
@@ -106,7 +107,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_matches', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_matches', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_matches');
|
||||
}
|
||||
@@ -119,7 +120,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_badoffset', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_badoffset', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_badoffset');
|
||||
}
|
||||
@@ -132,7 +133,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_fragmented', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_fragmented', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_fragmented');
|
||||
}
|
||||
@@ -145,7 +146,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_short', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_short', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_short');
|
||||
}
|
||||
@@ -158,7 +159,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_normalized', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_normalized', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_normalized');
|
||||
}
|
||||
@@ -171,7 +172,7 @@ class Pfsense extends Unix implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pf_memdropped', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pf_memdropped', $tags, $fields);
|
||||
|
||||
$this->enableGraph('pf_memdropped');
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ namespace LibreNMS\OS;
|
||||
use App\Models\Device;
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessErrorsDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessFrequencyDiscovery;
|
||||
@@ -95,7 +96,7 @@ class Pmp extends OS implements
|
||||
$device->hardware = $hardware;
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
// Migrated to Wireless Sensor
|
||||
$fec = snmp_get_multi_oid($this->getDeviceArray(), ['fecInErrorsCount.0', 'fecOutErrorsCount.0', 'fecCRCError.0'], '-OQUs', 'WHISP-BOX-MIBV2-MIB');
|
||||
@@ -109,7 +110,7 @@ class Pmp extends OS implements
|
||||
'fecOutErrorsCount' => $fec['fecOutErrorsCount.0'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-errorCount', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-errorCount', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_errorCount');
|
||||
}
|
||||
|
||||
@@ -120,7 +121,7 @@ class Pmp extends OS implements
|
||||
'crcErrors' => $fec['fecCRCError.0'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-crcErrors', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-crcErrors', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_crcErrors');
|
||||
}
|
||||
|
||||
@@ -131,7 +132,7 @@ class Pmp extends OS implements
|
||||
'jitter' => $jitter,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-jitter', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-jitter', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_jitter');
|
||||
unset($rrd_def, $jitter);
|
||||
}
|
||||
@@ -150,7 +151,7 @@ class Pmp extends OS implements
|
||||
'failed' => $failed,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-regCount', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-regCount', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_regCount');
|
||||
unset($rrd_def, $registered, $failed);
|
||||
}
|
||||
@@ -166,7 +167,7 @@ class Pmp extends OS implements
|
||||
'tracked' => floatval($tracked),
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-gpsStats', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-gpsStats', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_gpsStats');
|
||||
}
|
||||
|
||||
@@ -185,7 +186,7 @@ class Pmp extends OS implements
|
||||
'avg' => $radio['radioDbmAvg.0'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-radioDbm', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-radioDbm', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_radioDbm');
|
||||
}
|
||||
|
||||
@@ -199,7 +200,7 @@ class Pmp extends OS implements
|
||||
'vertical' => $dbm['linkRadioDbmVertical.2'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-450-linkRadioDbm', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-450-linkRadioDbm', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_450_linkRadioDbm');
|
||||
}
|
||||
|
||||
@@ -210,7 +211,7 @@ class Pmp extends OS implements
|
||||
'last' => $lastLevel,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-450-powerlevel', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-450-powerlevel', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_450_powerlevel');
|
||||
}
|
||||
|
||||
@@ -228,7 +229,7 @@ class Pmp extends OS implements
|
||||
'combined' => $combined,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-signalHV', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-signalHV', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_signalHV');
|
||||
unset($rrd_def, $vertical, $horizontal, $combined);
|
||||
}
|
||||
@@ -245,7 +246,7 @@ class Pmp extends OS implements
|
||||
'vertical' => $vertical,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'canopy-generic-450-slaveHV', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'canopy-generic-450-slaveHV', $tags, $fields);
|
||||
$this->enableGraph('canopy_generic_450_slaveHV');
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
|
||||
class Poweralert extends \LibreNMS\OS implements OSPolling
|
||||
@@ -37,7 +38,7 @@ class Poweralert extends \LibreNMS\OS implements OSPolling
|
||||
$this->customSysName($device);
|
||||
}
|
||||
|
||||
public function pollOs(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$this->customSysName($this->getDevice());
|
||||
}
|
||||
|
@@ -25,12 +25,13 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Procurve extends \LibreNMS\OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$FdbAddressCount = snmp_get($this->getDeviceArray(), 'hpSwitchFdbAddressCount.0', '-Ovqn', 'STATISTICS-MIB');
|
||||
|
||||
@@ -42,7 +43,7 @@ class Procurve extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'fdb_count', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'fdb_count', $tags, $fields);
|
||||
|
||||
$this->enableGraph('fdb_count');
|
||||
}
|
||||
|
@@ -25,12 +25,13 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Pulse extends \LibreNMS\OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$users = snmp_get($this->getDeviceArray(), 'iveConcurrentUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
|
||||
@@ -42,7 +43,7 @@ class Pulse extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'pulse_users', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'pulse_users', $tags, $fields);
|
||||
$this->enableGraph('pulse_users');
|
||||
}
|
||||
}
|
||||
|
@@ -25,13 +25,14 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Riverbed extends OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
/* optimisation oids
|
||||
*
|
||||
@@ -76,7 +77,7 @@ class Riverbed extends OS implements OSPolling
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
|
||||
data_update($this->getDeviceArray(), 'riverbed_connections', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'riverbed_connections', $tags, $fields);
|
||||
$this->enableGraph('riverbed_connections');
|
||||
}
|
||||
|
||||
@@ -107,7 +108,7 @@ class Riverbed extends OS implements OSPolling
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
|
||||
data_update($this->getDeviceArray(), 'riverbed_datastore', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'riverbed_datastore', $tags, $fields);
|
||||
$this->enableGraph('riverbed_datastore');
|
||||
}
|
||||
|
||||
@@ -139,7 +140,7 @@ class Riverbed extends OS implements OSPolling
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
|
||||
data_update($this->getDeviceArray(), 'riverbed_optimization', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'riverbed_optimization', $tags, $fields);
|
||||
$this->enableGraph('riverbed_optimization');
|
||||
}
|
||||
|
||||
@@ -177,7 +178,7 @@ class Riverbed extends OS implements OSPolling
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
|
||||
data_update($this->getDeviceArray(), 'riverbed_passthrough', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'riverbed_passthrough', $tags, $fields);
|
||||
$this->enableGraph('riverbed_passthrough');
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessCcqDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessDistanceDiscovery;
|
||||
@@ -466,7 +467,7 @@ class Routeros extends OS implements
|
||||
return $sensors;
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$leases = snmp_get($this->getDeviceArray(), 'mtxrDHCPLeaseCount.0', '-OQv', 'MIKROTIK-MIB');
|
||||
|
||||
@@ -478,7 +479,7 @@ class Routeros extends OS implements
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'routeros_leases', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'routeros_leases', $tags, $fields);
|
||||
$this->enableGraph('routeros_leases');
|
||||
}
|
||||
|
||||
@@ -492,7 +493,7 @@ class Routeros extends OS implements
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'routeros_pppoe_sessions', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'routeros_pppoe_sessions', $tags, $fields);
|
||||
$this->enableGraph('routeros_pppoe_sessions');
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessSnrDiscovery;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
@@ -37,7 +38,7 @@ class Rutos2xx extends OS implements
|
||||
WirelessSnrDiscovery,
|
||||
WirelessRssiDiscovery
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
// Mobile Data Usage
|
||||
$usage = snmp_get_multi_oid($this->getDeviceArray(), [
|
||||
@@ -59,7 +60,7 @@ class Rutos2xx extends OS implements
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'rutos_2xx_mobileDataUsage', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'rutos_2xx_mobileDataUsage', $tags, $fields);
|
||||
$this->enableGraph('rutos_2xx_mobileDataUsage');
|
||||
}
|
||||
}
|
||||
|
@@ -25,12 +25,13 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Screenos extends \LibreNMS\OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$sess_data = snmp_get_multi_oid($this->getDeviceArray(), [
|
||||
'.1.3.6.1.4.1.3224.16.3.2.0',
|
||||
@@ -53,7 +54,7 @@ class Screenos extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'screenos_sessions', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'screenos_sessions', $tags, $fields);
|
||||
|
||||
$this->enableGraph('screenos_sessions');
|
||||
}
|
||||
|
@@ -25,12 +25,13 @@
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Secureplatform extends \LibreNMS\OS implements OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$connections = snmp_get($this->getDeviceArray(), 'fwNumConn.0', '-OQv', 'CHECKPOINT-MIB');
|
||||
|
||||
@@ -42,7 +43,7 @@ class Secureplatform extends \LibreNMS\OS implements OSPolling
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'secureplatform_sessions', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'secureplatform_sessions', $tags, $fields);
|
||||
$this->enableGraph('secureplatform_sessions');
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Device\Processor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\ProcessorDiscovery;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS;
|
||||
@@ -33,7 +34,7 @@ use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Sgos extends OS implements ProcessorDiscovery, OSPolling
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$oid_list = [
|
||||
'sgProxyHttpClientRequestRate.0',
|
||||
@@ -55,7 +56,7 @@ class Sgos extends OS implements ProcessorDiscovery, OSPolling
|
||||
'requests' => $sgos[0]['sgProxyHttpClientRequestRate'],
|
||||
];
|
||||
|
||||
data_update($this->getDeviceArray(), 'sgos_average_requests', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'sgos_average_requests', $tags, $fields);
|
||||
|
||||
$this->enableGraph('sgos_average_requests');
|
||||
echo ' HTTP Req Rate';
|
||||
@@ -69,7 +70,7 @@ class Sgos extends OS implements ProcessorDiscovery, OSPolling
|
||||
'client_conn' => $sgos[0]['sgProxyHttpClientConnections'],
|
||||
];
|
||||
|
||||
data_update($this->getDeviceArray(), 'sgos_client_connections', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'sgos_client_connections', $tags, $fields);
|
||||
|
||||
$this->enableGraph('sgos_client_connections');
|
||||
echo ' Client Conn';
|
||||
@@ -83,7 +84,7 @@ class Sgos extends OS implements ProcessorDiscovery, OSPolling
|
||||
'server_conn' => $sgos[0]['sgProxyHttpServerConnections'],
|
||||
];
|
||||
|
||||
data_update($this->getDeviceArray(), 'sgos_server_connections', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'sgos_server_connections', $tags, $fields);
|
||||
|
||||
$this->enableGraph('sgos_server_connections');
|
||||
echo ' Server Conn';
|
||||
@@ -97,7 +98,7 @@ class Sgos extends OS implements ProcessorDiscovery, OSPolling
|
||||
'client_conn_active' => $sgos[0]['sgProxyHttpClientConnectionsActive'],
|
||||
];
|
||||
|
||||
data_update($this->getDeviceArray(), 'sgos_client_connections_active', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'sgos_client_connections_active', $tags, $fields);
|
||||
|
||||
$this->enableGraph('sgos_client_connections_active');
|
||||
echo ' Client Conn Active';
|
||||
@@ -111,7 +112,7 @@ class Sgos extends OS implements ProcessorDiscovery, OSPolling
|
||||
'server_conn_active' => $sgos[0]['sgProxyHttpServerConnectionsActive'],
|
||||
];
|
||||
|
||||
data_update($this->getDeviceArray(), 'sgos_server_connections_active', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'sgos_server_connections_active', $tags, $fields);
|
||||
|
||||
$this->enableGraph('sgos_server_connections_active');
|
||||
echo ' Server Conn Active';
|
||||
@@ -125,7 +126,7 @@ class Sgos extends OS implements ProcessorDiscovery, OSPolling
|
||||
'client_idle' => $sgos[0]['sgProxyHttpClientConnectionsIdle'],
|
||||
];
|
||||
|
||||
data_update($this->getDeviceArray(), 'sgos_client_connections_idle', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'sgos_client_connections_idle', $tags, $fields);
|
||||
|
||||
$this->enableGraph('sgos_client_connections_idle');
|
||||
echo ' Client Conne Idle';
|
||||
@@ -139,7 +140,7 @@ class Sgos extends OS implements ProcessorDiscovery, OSPolling
|
||||
'server_idle' => $sgos[0]['sgProxyHttpServerConnectionsIdle'],
|
||||
];
|
||||
|
||||
data_update($this->getDeviceArray(), 'sgos_server_connections_idle', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'sgos_server_connections_idle', $tags, $fields);
|
||||
|
||||
$this->enableGraph('sgos_server_connections_idle');
|
||||
echo ' Server Conn Idle';
|
||||
|
@@ -440,15 +440,7 @@ class Cisco extends OS implements
|
||||
|
||||
echo 'SLA ' . $sla_nr . ': ' . $rtt_type . ' ' . $sla['owner'] . ' ' . $sla['tag'] . '... ' . $sla->rtt . 'ms at ' . $time . "\n";
|
||||
|
||||
$fields = [
|
||||
'rtt' => $sla->rtt,
|
||||
];
|
||||
|
||||
// The base RRD
|
||||
$rrd_name = ['sla', $sla['sla_nr']];
|
||||
$rrd_def = RrdDefinition::make()->addDataset('rtt', 'GAUGE', 0, 300000);
|
||||
$tags = compact('sla_nr', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'sla', $tags, $fields);
|
||||
$collected = ['rtt' => $sla->rtt];
|
||||
|
||||
// Let's gather some per-type fields.
|
||||
switch ($rtt_type) {
|
||||
@@ -480,8 +472,8 @@ class Cisco extends OS implements
|
||||
->addDataset('AvgSDJ', 'GAUGE', 0)
|
||||
->addDataset('AvgDSJ', 'GAUGE', 0);
|
||||
$tags = compact('rrd_name', 'rrd_def', 'sla_nr', 'rtt_type');
|
||||
data_update($device, 'sla', $tags, $jitter);
|
||||
$fields = array_merge($fields, $jitter);
|
||||
app('Datastore')->put($device, 'sla', $tags, $jitter);
|
||||
$collected = array_merge($collected, $jitter);
|
||||
// Additional rrd for total number packet in sla
|
||||
$numPackets = [
|
||||
'NumPackets' => $data[$sla_nr]['rttMonEchoAdminNumPackets'],
|
||||
@@ -490,8 +482,8 @@ class Cisco extends OS implements
|
||||
$rrd_def = RrdDefinition::make()
|
||||
->addDataset('NumPackets', 'GAUGE', 0);
|
||||
$tags = compact('rrd_name', 'rrd_def', 'sla_nr', 'rtt_type');
|
||||
data_update($device, 'sla', $tags, $numPackets);
|
||||
$fields = array_merge($fields, $numPackets);
|
||||
app('Datastore')->put($device, 'sla', $tags, $numPackets);
|
||||
$collected = array_merge($collected, $numPackets);
|
||||
break;
|
||||
case 'icmpjitter':
|
||||
$icmpjitter = [
|
||||
@@ -519,13 +511,13 @@ class Cisco extends OS implements
|
||||
->addDataset('JitterIAJOut', 'GAUGE', 0)
|
||||
->addDataset('JitterIAJIn', 'GAUGE', 0);
|
||||
$tags = compact('rrd_name', 'rrd_def', 'sla_nr', 'rtt_type');
|
||||
data_update($device, 'sla', $tags, $icmpjitter);
|
||||
$fields = array_merge($fields, $icmpjitter);
|
||||
app('Datastore')->put($device, 'sla', $tags, $icmpjitter);
|
||||
$collected = array_merge($collected, $icmpjitter);
|
||||
break;
|
||||
}
|
||||
|
||||
d_echo('The following datasources were collected for #' . $sla['sla_nr'] . ":\n");
|
||||
d_echo($fields);
|
||||
d_echo($collected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -19,6 +19,7 @@ namespace LibreNMS\OS;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\Device\Processor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\ProcessorDiscovery;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS;
|
||||
@@ -26,7 +27,7 @@ use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
class Sonicwall extends OS implements OSPolling, ProcessorDiscovery
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$data = snmp_get_multi($this->getDeviceArray(), [
|
||||
'sonicCurrentConnCacheEntries.0',
|
||||
@@ -42,7 +43,7 @@ class Sonicwall extends OS implements OSPolling, ProcessorDiscovery
|
||||
'maxsessions' => $data[0]['sonicMaxConnCacheEntries'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'sonicwall_sessions', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'sonicwall_sessions', $tags, $fields);
|
||||
$this->enableGraph('sonicwall_sessions');
|
||||
}
|
||||
}
|
||||
|
@@ -720,7 +720,7 @@ class Timos extends OS implements MplsDiscovery, MplsPolling, WirelessPowerDisco
|
||||
'rrd_def' => $rrd_def,
|
||||
];
|
||||
|
||||
data_update($this->getDeviceArray(), 'sap', $tags, $fields);
|
||||
app('Datastore')->put($this->getDeviceArray(), 'sap', $tags, $fields);
|
||||
$this->enableGraph('sap');
|
||||
}
|
||||
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
@@ -40,7 +41,7 @@ class Topvision extends \LibreNMS\OS implements OSPolling
|
||||
}
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$cmstats = snmp_get_multi_oid($this->getDeviceArray(), ['.1.3.6.1.4.1.32285.11.1.1.2.2.3.1.0', '.1.3.6.1.4.1.32285.11.1.1.2.2.3.6.0', '.1.3.6.1.4.1.32285.11.1.1.2.2.3.5.0']);
|
||||
if (is_numeric($cmstats['.1.3.6.1.4.1.32285.11.1.1.2.2.3.1.0'])) {
|
||||
@@ -49,7 +50,7 @@ class Topvision extends \LibreNMS\OS implements OSPolling
|
||||
'cmtotal' => $cmstats['.1.3.6.1.4.1.32285.11.1.1.2.2.3.1.0'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'topvision_cmtotal', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'topvision_cmtotal', $tags, $fields);
|
||||
$this->enableGraph('topvision_cmtotal');
|
||||
}
|
||||
|
||||
@@ -59,7 +60,7 @@ class Topvision extends \LibreNMS\OS implements OSPolling
|
||||
'cmreg' => $cmstats['.1.3.6.1.4.1.32285.11.1.1.2.2.3.6.0'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'topvision_cmreg', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'topvision_cmreg', $tags, $fields);
|
||||
$this->enableGraph('topvision_cmreg');
|
||||
}
|
||||
|
||||
@@ -69,7 +70,7 @@ class Topvision extends \LibreNMS\OS implements OSPolling
|
||||
'cmoffline' => $cmstats['.1.3.6.1.4.1.32285.11.1.1.2.2.3.5.0'],
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'topvision_cmoffline', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'topvision_cmoffline', $tags, $fields);
|
||||
$this->enableGraph('topvision_cmoffline');
|
||||
}
|
||||
}
|
||||
|
@@ -35,6 +35,7 @@ use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\Device\Processor;
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\MempoolsDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\OSDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\ProcessorDiscovery;
|
||||
@@ -107,7 +108,7 @@ class Vrp extends OS implements
|
||||
}
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
// Polling the Wireless data TODO port to module
|
||||
$apTable = snmpwalk_group($this->getDeviceArray(), 'hwWlanApName', 'HUAWEI-WLAN-AP-MIB', 2);
|
||||
@@ -162,7 +163,7 @@ class Vrp extends OS implements
|
||||
];
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'vrp', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'vrp', $tags, $fields);
|
||||
|
||||
$ap_db = dbFetchRows('SELECT * FROM `access_points` WHERE `device_id` = ?', [$this->getDeviceArray()['device_id']]);
|
||||
|
||||
@@ -223,7 +224,7 @@ class Vrp extends OS implements
|
||||
];
|
||||
|
||||
$tags = compact('name', 'radionum', 'rrd_name', 'rrd_def');
|
||||
data_update($this->getDeviceArray(), 'arubaap', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'arubaap', $tags, $fields);
|
||||
|
||||
$foundid = 0;
|
||||
|
||||
@@ -541,15 +542,7 @@ class Vrp extends OS implements
|
||||
$time = Carbon::parse($data[$owner][$test]['pingResultsLastGoodProbe'] ?? null)->toDateTimeString();
|
||||
echo 'SLA : ' . $rtt_type . ' ' . $owner . ' ' . $test . '... ' . $sla->rtt . 'ms at ' . $time . "\n";
|
||||
|
||||
$fields = [
|
||||
'rtt' => $sla->rtt,
|
||||
];
|
||||
|
||||
// The base RRD
|
||||
$rrd_name = ['sla', $sla['sla_nr']];
|
||||
$rrd_def = RrdDefinition::make()->addDataset('rtt', 'GAUGE', 0, 300000);
|
||||
$tags = compact('sla_nr', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'sla', $tags, $fields);
|
||||
$collected = ['rtt' => $sla->rtt];
|
||||
|
||||
// Let's gather some per-type fields.
|
||||
switch ($rtt_type) {
|
||||
@@ -567,13 +560,13 @@ class Vrp extends OS implements
|
||||
->addDataset('ProbeResponses', 'GAUGE', 0, 300000)
|
||||
->addDataset('ProbeLoss', 'GAUGE', 0, 300000);
|
||||
$tags = compact('rrd_name', 'rrd_def', 'sla_nr', 'rtt_type');
|
||||
data_update($device, 'sla', $tags, $icmp);
|
||||
$fields = array_merge($fields, $icmp);
|
||||
app('Datastore')->put($device, 'sla', $tags, $icmp);
|
||||
$collected = array_merge($collected, $icmp);
|
||||
break;
|
||||
}
|
||||
|
||||
d_echo('The following datasources were collected for #' . $sla['sla_nr'] . ":\n");
|
||||
d_echo($fields);
|
||||
d_echo('The following datasources were collected for #' . $sla->sla_nr . ":\n");
|
||||
d_echo($collected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessFrequencyDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessNoiseFloorDiscovery;
|
||||
@@ -49,7 +50,7 @@ class XirrusAos extends OS implements
|
||||
WirelessRssiDiscovery,
|
||||
WirelessSnrDiscovery
|
||||
{
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$associations = [];
|
||||
|
||||
@@ -75,7 +76,7 @@ class XirrusAos extends OS implements
|
||||
'stations' => $count,
|
||||
];
|
||||
$tags = compact('radio', 'rrd_name', 'rrd_def');
|
||||
data_update($this->getDeviceArray(), $measurement, $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), $measurement, $tags, $fields);
|
||||
}
|
||||
$this->enableGraph('xirrus_stations');
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Device;
|
||||
use LibreNMS\Interfaces\Data\DataStorageInterface;
|
||||
use LibreNMS\Interfaces\Discovery\OSDiscovery;
|
||||
use LibreNMS\Interfaces\Polling\OSPolling;
|
||||
use LibreNMS\OS\Shared\Zyxel;
|
||||
@@ -44,7 +45,7 @@ class Zywall extends Zyxel implements OSDiscovery, OSPolling
|
||||
}
|
||||
}
|
||||
|
||||
public function pollOS(): void
|
||||
public function pollOS(DataStorageInterface $datastore): void
|
||||
{
|
||||
$sessions = snmp_get($this->getDeviceArray(), '.1.3.6.1.4.1.890.1.6.22.1.6.0', '-Ovq');
|
||||
if (is_numeric($sessions)) {
|
||||
@@ -53,7 +54,7 @@ class Zywall extends Zyxel implements OSDiscovery, OSPolling
|
||||
'sessions' => $sessions,
|
||||
];
|
||||
$tags = compact('rrd_def');
|
||||
data_update($this->getDeviceArray(), 'zywall-sessions', $tags, $fields);
|
||||
$datastore->put($this->getDeviceArray(), 'zywall-sessions', $tags, $fields);
|
||||
$this->enableGraph('zywall_sessions');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user