You are not permitted to perform this function"); exit; } echo("

Add Device

"); if($_POST['hostname'] && $_POST['community']) { if($_SESSION['userlevel'] > '5') { $hostname = mres($_POST['hostname']); $community = mres($_POST['community']); $snmpver = mres($_POST['snmpver']); if($_POST['port']) { $port = mres($_POST['port']); } else { $port = "161"; } echo("

"); echo("Adding host $hostname community $community port $port

"); $result = addHost($hostname, $community, $snmpver, $port); echo("

"); } else { echo("

Error: You don't have the necessary privileges to add hosts.

"); } } elseif ( $_POST['hostname'] && !$_POST['community'] ) { echo("

Error: A community string is required.

"); } elseif ( !$_POST['hostname'] && $_POST['community'] ) { echo("

Error: A hostname is required.

"); } ?>

Devices will be checked for Ping and SNMP reachability before being probed. Only devices with recognised OSes will be added.

Hostname
Community
SNMP Version  Port