initial commit; version 22.5.12042

This commit is contained in:
2022-12-12 23:28:25 -05:00
commit af1b03d79f
17653 changed files with 22692970 additions and 0 deletions

View File

@ -0,0 +1,59 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage discovery
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
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');
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";
}
}
// EOF

View File

@ -0,0 +1,53 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage discovery
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
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');
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";
}
}

View File

@ -0,0 +1,88 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage discovery
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
// echo(" NS-ROOT-MIB HA ");
// 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');
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";
}
// EOF