Files
librenms-librenms/includes/discovery/processors/powerconnect.inc.php

23 lines
1.3 KiB
PHP
Raw Normal View History

<?php
2015-07-13 20:10:26 +02:00
if ($device['os'] == 'powerconnect') {
2016-08-04 16:20:13 -04:00
if (strpos($device["sysObjectID"], "enterprises.674.10895.3031") !== false) {
2016-08-06 20:39:53 +01:00
d_echo("Dell Powerconnect 55xx");
2015-07-13 20:10:26 +02:00
$usage = trim(snmp_get($device, '.1.3.6.1.4.1.89.1.7.0', '-Ovq'));
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.89.1.7.0', '0', 'powerconnect', 'Processor', '1', $usage, null, null);
2016-08-04 16:20:13 -04:00
} elseif (strpos($device["sysObjectID"], "enterprises.674.10895.3024") !== false) {
2016-08-06 20:39:53 +01:00
d_echo("Dell Powerconnect 8024F");
$usage = trim(snmp_get($device, '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.9.0', '-Ovq'), '"');
$usage = ltrim($usage, ' ');
if (substr($usage, 0, 5) == '5 Sec') {
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.9.0', '0', 'powerconnect', 'Processor', '1', $usage, null, null);
}
2016-08-04 16:20:13 -04:00
} else {
2015-07-13 20:10:26 +02:00
$descr = 'Processor';
$usage = trim(snmp_get($device, 'dellLanExtension.6132.1.1.1.1.4.4.0', '-OQUvs', 'Dell-Vendor-MIB'), '"');
if (substr($usage, 0, 5) == '5 Sec') {
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.4.0', '0', 'powerconnect', $descr, '1', $usage, null, null);
}
}
}