Skip to content

Commit

Permalink
Improved support for DNOS/FTOS M-Series (#8749)
Browse files Browse the repository at this point in the history
Current implementation for Force10 series doesn't support the switch-blade M-Series model. This PR adds support for mempools and temperature. In my test environment (still 1.31) I have processors utilization support as well, but I have to test that in the new way processors are handled since 1.37

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
  • Loading branch information
skoef authored and laf committed Jun 16, 2018
1 parent fd77b23 commit 7b182e2
Show file tree
Hide file tree
Showing 8 changed files with 20,691 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/discovery/mempools/dnos-ftos.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
if (is_numeric($total)) {
discover_mempool($valid_mempool, $device, 0, $device['os'], 'Memory Utilization', '1', null, null);
}
} elseif (preg_match('/.6027.1.4.[0-9]+$/', $device['sysObjectID'])) {
$total = str_replace(' percent', '', snmp_get($device, 'dellNetCpuUtilMemUsage.stack.1.1', '-OvQ', 'DELL-NETWORKING-CHASSIS-MIB'));
if (is_numeric($total)) {
discover_mempool($valid_mempool, $device, 0, $device['os'], 'Memory Utilization', '1', null, null);
}
} else {
$free = snmp_get($device, '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.1.0', '-OvQ');
if (is_numeric($free)) {
Expand Down
16 changes: 16 additions & 0 deletions includes/discovery/sensors/temperature/dnos.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,19 @@
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'ftos-sseries', $descr, '1', '1', null, null, null, null, $current);
}
}

// Force10 M-Series
// DELL-NETWORKING-CHASSIS-MIB::dellNetStackUnitTemp.1 = Gauge32: 67
// DELL-NETWORKING-CHASSIS-MIB::dellNetStackUnitModelId.1 = INTEGER: m-MXL(25)
echo 'FTOS M-Series ';

$oids = snmpwalk_cache_oid($device, 'dellNetStackUnitTemp', array(), 'DELL-NETWORKING-CHASSIS-MIB', 'dnos');

if (is_array($oids)) {
foreach ($oids as $index => $entry) {
$descr = 'Unit '.$index;
$oid = '.1.3.6.1.4.1.6027.3.26.1.3.4.1.13.'.$index;
$current = $entry['dellNetStackUnitTemp'];
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'dnos', $descr, '1', '1', null, null, null, null, $current);
}
}
4 changes: 4 additions & 0 deletions includes/polling/mempools/dnos.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
$mempool['total'] = snmp_get($device, 'chSysProcessorMemSize.1', '-OvQU', 'F10-C-SERIES-CHASSIS-MIB');
$mempool['used'] = $mempool['total'] * (snmp_get($device, 'chStackUnitMemUsageUtil.1', '-OvQU', 'F10-C-SERIES-CHASSIS-MIB')/ 100);
$mempool['free'] = ($mempool['total'] - $mempool['used']);
} elseif (preg_match('/.6027.1.4.[0-9]+$/', $device['sysObjectID'])) {
$mempool['total'] = snmp_get($device, 'dellNetProcessorMemSize.stack.1.1', '-OvQU', 'DELL-NETWORKING-CHASSIS-MIB');
$mempool['used'] = $mempool['total'] * (snmp_get($device, 'dellNetCpuUtilMemUsage.stack.1.1', '-OvQU', 'DELL-NETWORKING-CHASSIS-MIB')/ 100);
$mempool['free'] = ($mempool['total'] - $mempool['used']);
} else {
$mempool['total'] = snmp_get($device, '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.2.0', '-OvQ');
$mempool['free'] = snmp_get($device, '.1.3.6.1.4.1.674.10895.5000.2.6132.1.1.1.1.4.1.0', '-OvQ');
Expand Down
Loading

0 comments on commit 7b182e2

Please sign in to comment.