commit version 22.12.12447

This commit is contained in:
2023-01-01 22:36:12 -05:00
parent af1b03d79f
commit b948283a96
744 changed files with 620715 additions and 27381 deletions

View File

@ -1,30 +0,0 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage poller
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
// EMBEDDED-NGX-MIB
if (!is_array($cache_storage['embedded-ngx-mib']))
{
$cache_storage['embedded-ngx-mib'] = snmpwalk_cache_oid($device, "swStorage", NULL, "EMBEDDED-NGX-MIB");
if (OBS_DEBUG && count($cache_storage['embedded-ngx-mib'])) { print_vars($cache_storage['embedded-ngx-mib']); }
}
$entry = $cache_storage['embedded-ngx-mib'][$storage['storage_index']];
$storage['units'] = 1024;
$storage['size'] = $entry['swStorageConfigTotal'] * $storage['units'];
$storage['free'] = $entry['swStorageConfigFree'] * $storage['units'];
$storage['used'] = $storage['size'] - $storage['free'];
// EOF

View File

@ -1,37 +0,0 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage poller
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
echo(' GPFS-MIB: ');
$index = $storage['storage_index'];
if (!is_array($cache_storage['gpfs-mib']))
{
foreach (array('gpfsFileSystemTotalSpaceL', 'gpfsFileSystemTotalSpaceH', 'gpfsFileSystemFreeSpaceL', 'gpfsFileSystemFreeSpaceH') as $param)
{
$cache_storage['gpfs-mib'] = snmpwalk_cache_oid($device, $param, $cache_storage['gpfs-mib'], 'GPFS-MIB');
}
if (OBS_DEBUG && count($cache_storage['gpfs-mib'])) { print_vars($cache_storage['gpfs-mib']); }
}
$entry = $cache_storage['gpfs-mib'][$index];
$storage['units'] = 1024; // Hardcode units.
$storage['size'] = snmp_size64_high_low($entry['gpfsFileSystemTotalSpaceH'], $entry['gpfsFileSystemTotalSpaceL']) * 1024;
$storage['free'] = snmp_size64_high_low($entry['gpfsFileSystemFreeSpaceH'], $entry['gpfsFileSystemFreeSpaceL']) * 1024;
$storage['used'] = $storage['size'] - $storage['free'];
unset($index, $entry);
// EOF

View File

@ -1,29 +0,0 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage poller
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
// EMBEDDED-NGX-MIB
if (!is_array($cache_storage['ISILON-MIB']))
{
$cache_storage['ISILON-MIB'] = snmp_get_multi_oid($device, 'ifsTotalBytes.0 ifsUsedBytes.0', array(), 'ISILON-MIB');
}
$entry = $cache_storage['ISILON-MIB'][$storage['storage_index']];
$storage['units'] = 1;
$storage['size'] = $entry['ifsTotalBytes'];
$storage['used'] = $entry['ifsUsedBytes'];
$storage['free'] = $storage['size'] - $storage['used'];
// EOF

View File

@ -1,57 +0,0 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage poller
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
// NETAPP-MIB
//echo(' NETAPP-MIB: ');
$index = $storage['storage_index'];
if ($storage['storage_hc'])
{
$netapp_oids = array('size' => 'df64TotalKBytes', 'used' => 'df64UsedKBytes', 'free' => 'df64AvailKBytes');
if (!is_array($cache_storage['netapp-mib-hc']))
{
foreach (array('size', 'used', 'free') as $param)
{
$oid = $netapp_oids[$param];
$cache_storage['netapp-mib-hc'] = snmpwalk_cache_oid($device, $oid, $cache_storage['netapp-mib-hc'], 'NETAPP-MIB');
}
if (OBS_DEBUG && count($cache_storage['netapp-mib-hc'])) { print_vars($cache_storage['netapp-mib-hc']); }
}
$entry = $cache_storage['netapp-mib-hc'][$index];
} else {
$netapp_oids = array('size' => 'dfKBytesTotal', 'used' => 'dfKBytesUsed', 'free' => 'dfKBytesAvail');
if (!is_array($cache_storage['netapp-mib']))
{
foreach (array('size', 'used', 'free') as $param)
{
$oid = $netapp_oids[$param];
$cache_storage['netapp-mib'] = snmpwalk_cache_oid($device, $oid, $cache_storage['netapp-mib'], 'NETAPP-MIB');
}
if (OBS_DEBUG && count($cache_storage['netapp-mib'])) { print_vars($cache_storage['netapp-mib']); }
}
$entry = $cache_storage['netapp-mib-hc'][$index];
}
$storage['units'] = 1024; // Hardcode units.
foreach (array('size', 'used', 'free') as $param)
{
$oid = $netapp_oids[$param];
$storage[$param] = $entry[$oid] * $storage['units'];
}
unset($index, $entry, $param, $netapp_oids);
// EOF

View File

@ -1,41 +0,0 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage poller
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
$index = $storage['storage_index'];
if (!is_array($cache_storage['NIMBLE-MIB']))
{
foreach (array('volSizeLow', 'volSizeHigh', 'volUsageLow', 'volUsageHigh', 'volOnline') as $param)
{
$cache_storage['NIMBLE-MIB'] = snmpwalk_cache_oid($device, $param, $cache_storage['NIMBLE-MIB'], 'NIMBLE-MIB');
}
if (OBS_DEBUG > 1 && count($cache_storage['NIMBLE-MIB'])) { print_vars($cache_storage['NIMBLE-MIB']); }
}
$entry = $cache_storage['NIMBLE-MIB'][$index];
// FIXME, probably need additional field for storages like OperStatus up/down
$ignore = in_array($entry['volOnline'], array('0', 'false')) ? 1 : 0;
if ($storage['storage_ignore'] != $ignore)
{
force_discovery($device, 'storage');
}
$storage['units'] = 1048576; // Hardcode units. In MIB is written that bytes, but really Mbytes
$storage['size'] = snmp_size64_high_low($entry['volSizeHigh'], $entry['volSizeLow']) * $storage['units'];
$storage['used'] = snmp_size64_high_low($entry['volUsageHigh'], $entry['volUsageLow']) * $storage['units'];
$storage['free'] = $storage['size'] - $storage['used'];
unset($index, $entry, $ignore);
// EOF