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

@ -4,56 +4,52 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage discovery
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage discovery
* @copyright (C) Adam Armstrong
*
*/
echo " ATTO6500N-MIB-FC-Port ";
$index = $status_db['status_oid'];
$opState = snmp_get($device, "fcPortOperationalState.".$index, '-Ovq', 'ATTO6500N-MIB');
$adminState = snmp_get($device, "fcPortAdminState.".$index, '-Ovq', 'ATTO6500N-MIB');
$index = $status_db['status_oid'];
$opState = snmp_get($device, "fcPortOperationalState." . $index, '-Ovq', 'ATTO6500N-MIB');
$adminState = snmp_get($device, "fcPortAdminState." . $index, '-Ovq', 'ATTO6500N-MIB');
if ($opState && $adminState)
{
if ($adminState == "enabled")
{
if ($opState == "online")
{
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = 'up';
$status_value = "2";
} elseif ($opState == "offline") {
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = 'enabled but down';
$status_value = "1";
if ($opState && $adminState) {
if ($adminState == "enabled") {
if ($opState == "online") {
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = 'up';
$status_value = "2";
} elseif ($opState == "offline") {
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = 'enabled but down';
$status_value = "1";
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
} elseif ($adminState == "disabled") {
if ($opState == "online") {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'up but disabled';
$status_value = "0";
} elseif ($opState == "offline") {
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = 'down';
$status_value = "2";
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
} elseif($adminState == "disabled") {
if ($opState == "online")
{
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'up but disabled';
$status_value = "0";
} elseif ($opState == "offline") {
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = 'down';
$status_value = "2";
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
}
// EOF

View File

@ -4,50 +4,50 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage discovery
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage discovery
* @copyright (C) Adam Armstrong
*
*/
echo " ATTO6500N-MIB-SAS-Port ";
$index = $status_db['status_oid'];
$opState = snmp_get($device, "sasPortOperationalState.".$index, '-Ovq', 'ATTO6500N-MIB');
$adminState = snmp_get($device, "sasPortAdminState.".$index, '-Ovq', 'ATTO6500N-MIB');
$index = $status_db['status_oid'];
$opState = snmp_get($device, "sasPortOperationalState." . $index, '-Ovq', 'ATTO6500N-MIB');
$adminState = snmp_get($device, "sasPortAdminState." . $index, '-Ovq', 'ATTO6500N-MIB');
if($opState && $adminState) {
if ($adminState == "enabled") {
if ($opState == "online") {
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = 'up';
$status_value = "2";
} elseif ($opState == "offline") {
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = 'enabled but down';
$status_value = "1";
if ($opState && $adminState) {
if ($adminState == "enabled") {
if ($opState == "online") {
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = 'up';
$status_value = "2";
} elseif ($opState == "offline") {
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = 'enabled but down';
$status_value = "1";
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
} elseif ($adminState == "disabled") {
if ($opState == "online") {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'up but disabled';
$status_value = "0";
} elseif ($opState == "offline") {
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = 'down';
$status_value = "2";
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
} elseif($adminState == "disabled") {
if ($opState == "online") {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'up but disabled';
$status_value = "0";
} elseif ($opState == "offline") {
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = 'down';
$status_value = "2";
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
}

View File

@ -5,9 +5,9 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage discovery
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage discovery
* @copyright (C) Adam Armstrong
*
*/
@ -16,73 +16,69 @@
// Collect HAMode & HAState
$sysHighAvailabilityMode = snmp_get($device, 'sysHighAvailabilityMode.0', '-Ovq', 'NS-ROOT-MIB');
$haCurState = snmp_get($device, 'haCurState.0', '-Ovq', 'NS-ROOT-MIB');
$haPeerState = snmp_get($device, 'haPeerState.0', '-Ovq', 'NS-ROOT-MIB');
$haCurState = snmp_get($device, 'haCurState.0', '-Ovq', 'NS-ROOT-MIB');
$haPeerState = snmp_get($device, 'haPeerState.0', '-Ovq', 'NS-ROOT-MIB');
if ($sysHighAvailabilityMode !== '' && $haCurState !== '')
{
switch ($sysHighAvailabilityMode)
{
case "standalone":
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = $sysHighAvailabilityMode.'/'.$haCurState;
$status_value = "1";
break;
case "primary":
case "secondary":
switch ($haCurState)
{
case "up":
case "monitorOk":
switch ($haPeerState)
{
case "primary":
case "secondary":
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = $sysHighAvailabilityMode.'/'.$haCurState.'/'.$haPeerState;
$status_value = "1";
break;
case "standalone":
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = $sysHighAvailabilityMode.'/'.$haCurState.'/'.$haPeerState;
$status_value = "-1";
break;
default:
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = $sysHighAvailabilityMode.'/'.$haCurState.'/'.$haPeerState;
$status_value = "-1";
break;
}
break;
case "init":
case "dumb":
case "disabled":
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = $sysHighAvailabilityMode.'/'.$haCurState.'/'.$haPeerState;
$status_value = "0";
break;
case "alert":
case "down":
case "partialFail":
case "monitorFail":
case "completeFail":
case "partialFailSsl":
case "routemonitorFail":
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = $sysHighAvailabilityMode.'/'.$haCurState.'/'.$haPeerState;
$status_value = "-1";
break;
}
break;
default:
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = $sysHighAvailabilityMode.'/'.$haCurState.'/'.$haPeerState;
$status_value = "0";
}
if ($sysHighAvailabilityMode !== '' && $haCurState !== '') {
switch ($sysHighAvailabilityMode) {
case "standalone":
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = $sysHighAvailabilityMode . '/' . $haCurState;
$status_value = "1";
break;
case "primary":
case "secondary":
switch ($haCurState) {
case "up":
case "monitorOk":
switch ($haPeerState) {
case "primary":
case "secondary":
$status_poll['status_event'] = 'ok';
$status_poll['status_name'] = $sysHighAvailabilityMode . '/' . $haCurState . '/' . $haPeerState;
$status_value = "1";
break;
case "standalone":
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = $sysHighAvailabilityMode . '/' . $haCurState . '/' . $haPeerState;
$status_value = "-1";
break;
default:
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = $sysHighAvailabilityMode . '/' . $haCurState . '/' . $haPeerState;
$status_value = "-1";
break;
}
break;
case "init":
case "dumb":
case "disabled":
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = $sysHighAvailabilityMode . '/' . $haCurState . '/' . $haPeerState;
$status_value = "0";
break;
case "alert":
case "down":
case "partialFail":
case "monitorFail":
case "completeFail":
case "partialFailSsl":
case "routemonitorFail":
$status_poll['status_event'] = 'alert';
$status_poll['status_name'] = $sysHighAvailabilityMode . '/' . $haCurState . '/' . $haPeerState;
$status_value = "-1";
break;
}
break;
default:
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = $sysHighAvailabilityMode . '/' . $haCurState . '/' . $haPeerState;
$status_value = "0";
}
} else {
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
$status_poll['status_event'] = 'warning';
$status_poll['status_name'] = 'unknown';
$status_value = "0";
}
// EOF