mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Alcatel-Lucent Omniswitch device memory pool discovery & polling
git-svn-id: http://www.observium.org/svn/observer/trunk@1963 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
20
includes/discovery/mempools/aos-device.inc.php
Executable file
20
includes/discovery/mempools/aos-device.inc.php
Executable file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
global $valid_mempool;
|
||||
|
||||
if ($device['os'] == "aos")
|
||||
{
|
||||
echo("Alcatel-Lucent OS: ");
|
||||
|
||||
$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;
|
||||
|
||||
|
||||
if (is_numeric($total) && is_numeric($used))
|
||||
{
|
||||
discover_mempool($valid_mempool, $device, 0, "aos-device", "Memory", "1", NULL, NULL);
|
||||
}
|
||||
}
|
||||
?>
|
18
includes/polling/mempools/aos-device.inc.php
Executable file
18
includes/polling/mempools/aos-device.inc.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
#ALCATEL-IND1-SYSTEM-MIB::systemHardwareMemoryMfg.0 = INTEGER: notreadable(12)
|
||||
#ALCATEL-IND1-SYSTEM-MIB::systemHardwareMemorySize.0 = Gauge32: 268435456
|
||||
#ALCATEL-IND1-HEALTH-MIB::healthDeviceMemoryLatest.0 = INTEGER: 74
|
||||
#ALCATEL-IND1-HEALTH-MIB::healthDeviceMemory1MinAvg.0 = INTEGER: 74
|
||||
#ALCATEL-IND1-HEALTH-MIB::healthDeviceMemory1HrAvg.0 = INTEGER: 74
|
||||
#ALCATEL-IND1-HEALTH-MIB::healthDeviceMemory1HrMax.0 = INTEGER: 74
|
||||
|
||||
$mempool['units'] = "1";
|
||||
|
||||
$mempool['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");
|
||||
|
||||
$mempool['used'] = $mempool['total'] * ($percent / 100);
|
||||
$mempool['free'] = $mempool['total'] - $mempool['used'];
|
||||
|
||||
?>
|
Reference in New Issue
Block a user