add temperature polling for harddisks connected to areca controllers

git-svn-id: http://www.observium.org/svn/observer/trunk@1120 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-06-09 19:08:53 +00:00
parent ba9b26313d
commit 34209dd893
3 changed files with 34 additions and 4 deletions
+25 -4
View File
@@ -44,7 +44,6 @@ if($device['os'] == "ironware")
}
}
## JunOS Temperatures
if ($device['os'] == "junos" || $device['os_group'] == "junos")
{
@@ -77,6 +76,31 @@ if ($device['os'] == "junos" || $device['os_group'] == "junos")
}
}
## Areca Harddisk Temperatures
if ($device['os'] == "areca")
{
$oids = shell_exec($config['snmpwalk'] . " -$snmpver -CI -Osqn -c $community $hostname:$port SNMPv2-SMI::enterprises.18928.1.1.2.14.1.2");
if ($debug) { echo($oids."\n"); }
$oids = trim($oids);
if ($oids) echo("Areca ");
foreach(explode("\n", $oids) as $data)
{
$data = trim($data);
if ($data)
{
list($oid,$descr) = explode(" ", $data,2);
$split_oid = explode('.',$oid);
$temp_id = $split_oid[count($split_oid)-1];
$temp_oid = "1.3.6.1.4.1.18928.1.1.2.14.1.2.$temp_id";
$temp = trim(shell_exec($config['snmpget'] . " -O qv -$snmpver -c $community $hostname:$port $temp_oid"));
$descr = "Hard disk $temp_id";
if ($temp != -128)
{
discover_temperature($valid_temp, $device, $temp_oid, $temp_id, "areca", $descr, 1, NULL, NULL, NULL);
}
}
}
}
## Papouch TME Temperatures
if ($device['os'] == "papouch-tme")
@@ -90,8 +114,6 @@ if ($device['os'] == "papouch-tme")
$descr = trim(str_replace("\"", "", $descr));
discover_temperature($valid_temp, $device, $temp_oid, "1", "ironware", $descr, "10", NULL, NULL, $temp);
$temp_exists[] = "$id $temp_oid";
}
}
@@ -216,7 +238,6 @@ if ($device['os'] == "ios")
$descr = trim($descr);
discover_temperature($valid_temp, $device, $oid, $index, "cisco", $descr, "1", NULL, NULL, $temp);
$temp_exists[] = $device['device_id'] . " $oid";
}
}
}
+7
View File
@@ -0,0 +1,7 @@
<?php
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.1.1.1.0", "-OQv", "", ""),'"');
$version = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.1.1.4.0", "-OQv", "", ""),'"');
$serial = trim(snmp_get($device, "1.3.6.1.4.1.18928.1.1.1.3.0", "-OQv", "", ""),'"');
?>
+2
View File
@@ -66,6 +66,8 @@ $os_text['dell-laser'] = "Dell Laser Printer";
$os_text['adva'] = "Adva";
$os_text['allied'] = "AlliedWare";
$os_text['mgeups'] = "MGE UPS";
$os_text['apc'] = "APC";
$os_text['areca'] = "Areca RAID Subsystem";
if(!$config['graph_colours']['greens']) {
$config['graph_colours']['greens'] = array('B6D14B','91B13C','6D912D','48721E','24520F','003300');