2016-02-24 12:01:22 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if ($device['os'] == 'serveriron') {
|
2016-03-01 10:46:00 +01:00
|
|
|
echo(" FOUNDRY-SN-AGENT-MIB");
|
2016-02-24 12:01:22 +01:00
|
|
|
|
|
|
|
// Chassis temperature (default)
|
2016-03-02 13:47:48 +01:00
|
|
|
$high_limit = 110;
|
|
|
|
$high_warn_limit = 95;
|
2016-02-24 12:01:22 +01:00
|
|
|
|
|
|
|
$descr = "Chassis Temperature";
|
|
|
|
$oid = "1.3.6.1.4.1.1991.1.1.1.1.18.0"; // snChasActualTemperature
|
|
|
|
$warn_oid = "1.3.6.1.4.1.1991.1.1.1.1.19.0"; // snChasWarningTemperature
|
|
|
|
$high_oid = "1.3.6.1.4.1.1991.1.1.1.1.20.0"; // snChasShutdownTemperature
|
2016-03-01 10:46:00 +01:00
|
|
|
$value = snmp_get($device, $oid, '-Oqv');
|
2016-02-24 12:01:22 +01:00
|
|
|
|
|
|
|
|
2016-03-01 10:46:00 +01:00
|
|
|
$value_warn = snmp_get($device, $warn_oid, '-Oqv');
|
2016-02-24 12:01:22 +01:00
|
|
|
if (is_numeric($value_warn)) {
|
2016-03-02 13:47:48 +01:00
|
|
|
$high_warn_limit = ($value_warn / 2);
|
2016-02-24 12:01:22 +01:00
|
|
|
}
|
|
|
|
|
2016-03-01 10:46:00 +01:00
|
|
|
$value_high = snmp_get($device, $high_oid, '-Oqv');
|
2016-02-24 12:01:22 +01:00
|
|
|
if (is_numeric($value_high)) {
|
2016-03-02 13:47:48 +01:00
|
|
|
$high_limit = ($value_high / 2);
|
2016-02-24 12:01:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (is_numeric($value)) {
|
2016-03-02 13:47:48 +01:00
|
|
|
$current = ($value / 2);
|
2016-02-24 12:01:22 +01:00
|
|
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, 1, 'serveriron-temp', $descr, '2', '1', null, null, $high_warn_limit, $high_limit, $current);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// EOF
|