librenms/includes/discovery/mempools/aos-device.inc.php

15 lines
587 B
PHP
Raw Normal View History

<?php
2015-07-13 18:10:26 +00:00
if ($device['os'] == 'aos') {
echo 'Alcatel-Lucent OS: ';
2015-07-13 18:10:26 +00:00
$total = snmp_get($device, 'systemHardwareMemorySize.0', '-OvQ', 'ALCATEL-IND1-SYSTEM-MIB', '+'.$config['install_dir'].'/mibs/aos');
$percent = snmp_get($device, 'healthDeviceMemoryLatest.0', '-OvQ', 'ALCATEL-IND1-HEALTH-MIB', '+'.$config['install_dir'].'/mibs/aos');
$used = ($total / 100 * $perc_used);
$free = ($total - $used);
2015-07-13 18:10:26 +00:00
if (is_numeric($total) && is_numeric($used)) {
discover_mempool($valid_mempool, $device, 0, 'aos-device', 'Device Memory', '1', null, null);
}
}