Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -6,29 +6,30 @@
*
* @package observium
* @subpackage poller
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
* @copyright (C) Adam Armstrong
*
*/
// Keep this for some OSes, who not include UPS-MIB by default
if (!is_device_mib($device, 'UPS-MIB')) {
return;
}
if (empty($hardware)) {
//echo "DEVEL UPS\n";
$hardware = snmp_get_oid($device, 'upsIdentModel.0', 'UPS-MIB');
}
if (empty($version)) {
//echo "DEVEL UPS\n";
$version = snmp_get_oid($device, 'upsIdentUPSSoftwareVersion.0', 'UPS-MIB');
if (empty($version)) {
$version = snmp_get_oid($device, 'upsIdentAgentSoftwareVersion.0', 'UPS-MIB');
}
}
// Better to use vendor from OS definition
//if (empty($vendor))
//{
// $vendor = snmp_get_oid($device, 'upsIdentManufacturer.0', 'UPS-MIB');
//}
if (empty($hardware))
{
$hardware = snmp_get_oid($device, 'upsIdentModel.0', 'UPS-MIB');
}
if (empty($version))
{
$version = snmp_get_oid($device, 'upsIdentUPSSoftwareVersion.0', 'UPS-MIB');
if (empty($version))
{
$version = snmp_get_oid($device, 'upsIdentAgentSoftwareVersion.0', 'UPS-MIB');
}
if ($device['os'] === 'generic-ups' && empty($vendor)) {
$vendor = snmp_get_oid($device, 'upsIdentManufacturer.0', 'UPS-MIB');
}
// EOF