AKCP sensorProbe2 detection + temperature support

git-svn-id: http://www.observium.org/svn/observer/trunk@1245 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-06-23 14:22:14 +00:00
parent b2c84a7189
commit 56031f21ca
2 changed files with 28 additions and 0 deletions

View File

@ -219,6 +219,33 @@ switch ($device['os'])
}
}
break;
case "akcp":
case "minkelsrms":
$oids = snmp_walk($device, ".1.3.6.1.4.1.3854.1.2.2.1.16.1.4", "-Osqn", "");
if ($debug) { echo($oids."\n"); }
$oids = trim($oids);
if ($oids) echo("AKCP ");
foreach(explode("\n", $oids) as $data)
{
$data = trim($data);
if ($data)
{
list($oid,$status) = explode(" ", $data,2);
if ($status == 2) # 2 = normal, 0 = not connected
{
$split_oid = explode('.',$oid);
$temp_id = $split_oid[count($split_oid)-1];
$descr_oid = ".1.3.6.1.4.1.3854.1.2.2.1.16.1.1.$temp_id";
$temp_oid = ".1.3.6.1.4.1.3854.1.2.2.1.16.1.3.$temp_id";
$descr = trim(snmp_get($device, $descr_oid, "-Oqv", ""),'"');
$temp = snmp_get($device, $temp_oid, "-Oqv", "");
discover_temperature($valid_temp, $device, $temp_oid, $temp_id, "akcp", $descr, 1, NULL, NULL, $temp);
}
}
}
break;
}
if ($device['os'] == "junos" || $device['os_group'] == "junos")

View File

@ -4,6 +4,7 @@ if (!$os) {
if (preg_match("/8VD-X20/", $sysDescr)) { $os = "minkelsrms"; }
if (preg_match("/SensorProbe/", $sysDescr)) { $os = "akcp"; }
if (preg_match("/sensorProbe2/", $sysDescr)) { $os = "akcp"; }
}