fix temperature and processors discovery

git-svn-id: http://www.observium.org/svn/observer/trunk@2238 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-05-04 12:58:57 +00:00
parent bccaa2c279
commit 7cd3dc86ec
36 changed files with 60 additions and 146 deletions
+1 -3
View File
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "akcp" || $device['os'] == "minkelsrms")
{
$oids = snmp_walk($device, ".1.3.6.1.4.1.3854.1.2.2.1.16.1.4", "-Osqn", "");
@@ -38,4 +36,4 @@ if ($device['os'] == "akcp" || $device['os'] == "minkelsrms")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "aos")
{
echo("Alcatel-Lucent Device: ");
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "apc")
{
$oids = snmp_get($device, "1.3.6.1.4.1.318.1.1.1.2.2.2.0", "-OsqnU", "");
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "areca")
{
$oids = snmp_walk($device, "1.3.6.1.4.1.18928.1.1.2.14.1.2", "-Osqn", "");
@@ -47,4 +45,4 @@ if ($device['os'] == "areca")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
global $entity_temperature;
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = 'temperature' AND (`sensor_type` = 'cisco-entity-sensor' OR `sensor_type` = 'entity-sensor')"),0) == "0" && ($device['os'] == "ios" || $device['os_group'] == "ios"))
{
echo("Cisco ");
@@ -27,6 +25,8 @@ if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` =
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'cisco', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
print_r($valid['sensor']);
}
}
}
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "cometsystem-p85xx")
{
$regexp = '/
@@ -62,4 +60,4 @@ if ($device['os'] == "cometsystem-p85xx")
}
}
?>
?>
+1 -3
View File
@@ -1,7 +1,5 @@
<?php
if (strstr($device['hardware'], "dell"))
{
$oids = snmp_walk($device, "coolingDeviceDiscreteReading", "-Osqn", "MIB-Dell-10892");
@@ -24,4 +22,4 @@ if (strstr($device['hardware'], "dell"))
}
?>
?>
@@ -1,7 +1,5 @@
<?php
### Force10 C-Series
#F10-C-SERIES-CHASSIS-MIB::chSysCardType.1 = INTEGER: lc4802E48TB(1024)
@@ -12,9 +10,7 @@
if ($device['os'] == "ftos" || $device['os_group'] == "ftos")
{
echo("FTOS C-Series ");
$oids = snmpwalk_cache_oid($device, "chSysCardTemp", array(), "F10-C-SERIES-CHASSIS-MIB", $config['mib_dir'].":".$config['mib_dir']."/ftos" );
if (is_array($oids))
{
foreach ($oids as $index => $entry)
@@ -22,16 +18,9 @@ if ($device['os'] == "ftos" || $device['os_group'] == "ftos")
$entry['descr'] = "Slot ".$index;
$entry['oid'] = ".1.3.6.1.4.1.6027.3.8.1.2.1.1.5.".$index;
$entry['current'] = $entry['chSysCardTemp'];
discover_sensor($valid['sensor'], 'temperature', $device, $entry['oid'], $index, 'ftos-cseries', $entry['descr'], '1', '1', NULL, NULL, NULL, NULL, $entry['current']);
}
unset($entry);
}
unset($oids);
}
?>
@@ -1,7 +1,5 @@
<?php
### Force10 E-Series
#F10-CHASSIS-MIB::chSysCardType.1 = INTEGER: rpmCardEF3(206)
@@ -28,8 +26,6 @@ if ($device['os'] == "ftos" || $device['os_group'] == "ftos")
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'ftos-eseries', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
}
}
unset($oids);
}
?>
?>
@@ -1,7 +1,5 @@
<?php
### Force10 S-Series
#F10-S-SERIES-CHASSIS-MIB::chStackUnitTemp.1 = Gauge32: 47
@@ -21,12 +19,9 @@ if ($device['os'] == "ftos" || $device['os_group'] == "ftos")
$descr = "Unit ".$index . " " . $entry['chStackUnitSysType'];
$oid = ".1.3.6.1.4.1.6027.3.10.1.2.2.1.14.".$index;
$current = $entry['chStackUnitTemp'];
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'ftos-sseries', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
}
}
unset($oids);
}
?>
?>
@@ -3,8 +3,6 @@
# FIXME: EMD "stack" support?
# FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigTempOffset.0 ?
if ($device['os'] == "ipoman")
{
echo(" IPOMANII-MIB ");
@@ -27,4 +25,4 @@ if ($device['os'] == "ipoman")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "ironware")
{
echo("IronWare ");
@@ -38,4 +36,4 @@ if ($device['os'] == "ironware")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "junos" || $device['os_group'] == "junos")
{
echo("JunOS ");
@@ -32,4 +30,4 @@ if ($device['os'] == "junos" || $device['os_group'] == "junos")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
## JunOSe Temperatures
if ($device['os'] == "junose")
@@ -27,4 +25,4 @@ if ($device['os'] == "junose")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "linux")
{
$oids = snmp_walk($device, "lmTempSensorsDevice", "-Osqn", "LM-SENSORS-MIB");
@@ -29,4 +27,4 @@ if ($device['os'] == "linux")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os_group'] == "unix")
{
# FIXME snmp_walk
@@ -25,4 +23,4 @@ if ($device['os_group'] == "unix")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "papouch-tme")
{
echo("Papouch TME ");
@@ -17,4 +15,4 @@ if ($device['os'] == "papouch-tme")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "powerconnect")
{
$oids = snmp_get($device, ".1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.4.0", "-OsqnU", "");
@@ -20,4 +18,4 @@ if ($device['os'] == "powerconnect")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "netmanplus" || $device['os'] == "deltaups" || $device['os'] == "poweralert")
{
$oids = snmp_walk($device, "1.3.6.1.2.1.33.1.2.7", "-Osqn", "UPS-MIB");
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "sentry3")
{
$oids = snmp_walk($device, "tempHumidSensorTempValue", "-Osqn", "Sentry3-MIB");
@@ -32,9 +30,7 @@ if ($device['os'] == "sentry3")
discover_sensor($valid['sensor'], 'temperature', $device, $temperature_oid, $index, 'sentry3', $descr, $divisor, $multiplier, $low_limit, $low_warn_limit, $high_warn_limit, $high_limit, $current);
}
}
unset($data);
}
unset($oids);
}
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "linux")
{
# Supermicro sensors
@@ -38,4 +36,4 @@ if ($device['os'] == "linux")
}
}
?>
?>
+1 -3
View File
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "powerware")
{
# XUPS-MIB::xupsEnvAmbientTemp.0 = INTEGER: 52
@@ -30,4 +28,4 @@ if ($device['os'] == "powerware")
}
}
?>
?>
@@ -1,7 +1,5 @@
<?php
if ($device['os'] == 'ies')
{
echo("ZyXEL IES ");
@@ -25,4 +23,4 @@ if ($device['os'] == 'ies')
}
}
?>
?>