mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Added model, processor, fan and power supply for Alcatel Omnistack Switches * Removed Index from description of Fan and power supply * Merged PR #10655 * Added Temperature Sensor for AOS7+ Alcatel Enterprise Switches * Added AOS7 mempools * Added Tests * Update aos.yaml * Update alerts levels in state sensors * Add test data
26 lines
1.2 KiB
PHP
26 lines
1.2 KiB
PHP
<?php
|
|
|
|
if ($device['os'] == 'aos') {
|
|
echo 'Alcatel-Lucent OS: ';
|
|
if (strpos($device['sysObjectID'], '1.3.6.1.4.1.6486.801')) { // AOS 7
|
|
$total = snmp_get($device, '.1.3.6.1.4.1.6486.801.1.1.1.2.1.1.3.4.0', '-OvQ', 'ALCATEL-IND1-SYSTEM-MIB', 'nokia/aos7'); // systemHardwareMemorySize
|
|
$percent = snmp_get($device, '.1.3.6.1.4.1.6486.801.1.2.1.16.1.1.1.1.1.8.0', '-OvQ', 'ALCATEL-IND1-HEALTH-MIB', 'nokia/aos7'); // healthModuleMemory1MinAvg
|
|
$used = $total / 100 * $percent;
|
|
$free = ($total - $used);
|
|
|
|
if (is_numeric($total) && is_numeric($percent)) {
|
|
$total *= 1024; // Memory in MB
|
|
discover_mempool($valid_mempool, $device, 0, 'aos-device', 'Device Memory', 1, null, null);
|
|
}
|
|
} else {
|
|
$total = snmp_get($device, 'systemHardwareMemorySize.0', '-OvQ', 'ALCATEL-IND1-SYSTEM-MIB', 'aos');
|
|
$percent = snmp_get($device, 'healthDeviceMemoryLatest.0', '-OvQ', 'ALCATEL-IND1-HEALTH-MIB', 'aos');
|
|
$used = ($total / 100 * $perc_used);
|
|
$free = ($total - $used);
|
|
|
|
if (is_numeric($total) && is_numeric($used)) {
|
|
discover_mempool($valid_mempool, $device, 0, 'aos-device', 'Device Memory', '1', null, null);
|
|
}
|
|
}
|
|
}
|