- Das Device unterstützt kein SNMPHTML_NEWLINE - Du hast eine falsche Read-Community angegebenHTML_NEWLINE - Du hast eine falsche IP-Adresse angegebenHTML_NEWLINE - Du hast vergessen, SNMP am device einzuschaltenHTML_NEWLINE - Dieses PHP unterstützt kein SNMP, kompilieren sie es mit SNMPHTML_NEWLINE oder laden sie sich ein vorkompiliertes PHP mit SNMP vonHTML_NEWLINE <a href="http://de.php.net">Der Deutschen PHP Seite</a> herunterHTML_NEWLINE, '), "index.php?mod=noc&action=add_device&step=1"); break; } // Fetched Vars from SNMP from tha device $sysDescr = $noc->getSNMPValue($_POST["device_ip"], $_POST["device_read"], ".1.3.6.1.2.1.1.1.0"); $sysContact = $noc->getSNMPValue($_POST["device_ip"], $_POST["device_read"], ".1.3.6.1.2.1.1.4.0"); $sysUpTime = $noc->getSNMPValue($_POST["device_ip"], $_POST["device_read"], ".1.3.6.1.2.1.1.3.0"); $sysLocation = $noc->getSNMPValue($_POST["device_ip"], $_POST["device_read"], ".1.3.6.1.2.1.1.6.0"); $sysName = $noc->getSNMPValue($_POST["device_ip"], $_POST["device_read"], ".1.3.6.1.2.1.1.5.0"); $ports = $noc->getSNMPwalk($_POST["device_ip"], $_POST["device_read"], ".1.3.6.1.2.1.2.2.1.1"); $numport = count($ports); // Store the device into a SQL table $add_query = $db->qry("INSERT INTO %prefix%noc_devices SET\n name = %string%,\n ip = %string%,\n readcommunity = %string%,\n writecommunity = %string%,\n sysDescr = %string%,\n sysContact = %string%,\n sysUpTime = %string%,\n sysLocation = %string%,\n sysName = %string%,\n ports = %string%\n ", $_POST['device_caption'], $_POST['device_ip'], $_POST['device_read'], $_POST['device_write'], $sysDescr, $sysContact, $sysUpTime, $sysLocation, $sysName, $numport); $db->qry("SELECT id, ip, readcommunity FROM %prefix%noc_devices WHERE name=%string%", $_POST["device_caption"]); $row = $db->fetch_array(); for ($ActualPort = 0; $ActualPort < count($ports); $ActualPort++) { $Port[$ActualPort]["deviceid"] = $row["id"]; $Port[$ActualPort]["PortNr"] = $noc->getSNMPValue($row["ip"], $row["readcommunity"], ".1.3.6.1.2.1.2.2.1.1." . $ports[$ActualPort]); $Port[$ActualPort]["BytesIn"] = $noc->getSNMPValue($row["ip"], $row["readcommunity"], ".1.3.6.1.2.1.2.2.1.10." . $ports[$ActualPort]); $Port[$ActualPort]["BytesOut"] = $noc->getSNMPValue($row["ip"], $row["readcommunity"], ".1.3.6.1.2.1.2.2.1.16." . $ports[$ActualPort]); $Port[$ActualPort]["Speed"] = $noc->getSNMPValue($row["ip"], $row["readcommunity"], ".1.3.6.1.2.1.2.2.1.5." . $ports[$ActualPort]) / (1000 * 1000); $Port[$ActualPort]["LinkStatus"] = $noc->getSNMPValue($row["ip"], $row["readcommunity"], ".1.3.6.1.2.1.2.2.1.8." . $ports[$ActualPort]); $Port[$ActualPort]["AdminStatus"] = $noc->getSNMPValue($row["ip"], $row["readcommunity"], ".1.3.6.1.2.1.2.2.1.7." . $ports[$ActualPort]); //$Port[$ActualPort]["MACAddress"] = // $noc->getSNMPValue( $row["ip"], $row["readcommunity"], ".1.3.6.1.2.1.2.2.1.6." . $ports[$ActualPort]);