- ');
#echo("
#
- # # Overview # # "); echo('
- Graphs '); $health = mysql_result(mysql_query("select count(*) from storage WHERE host_id = '" . $device['device_id'] . "'"), 0) + mysql_result(mysql_query("select count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"), 0) + mysql_result(mysql_query("select count(*) from cempMemPool WHERE device_id = '" . $device['device_id'] . "'"), 0) + mysql_result(mysql_query("select count(*) from cpmCPU WHERE device_id = '" . $device['device_id'] . "'"), 0) + mysql_result(mysql_query("select count(*) from processors WHERE device_id = '" . $device['device_id'] . "'"), 0); if($health) { echo('
- Health '); } $cisco_sensors = mysql_result(mysql_query("SELECT count(*) FROM `entPhysical` WHERE device_id = '".$device['device_id']."' AND entSensorType != '' AND entSensorType NOT LIKE 'No%'"),0); if($cisco_sensors) { echo('
- Sensors '); } if(is_dir($config['collectd_dir'] . "/" . $device['hostname'] ."/")) { echo('
- CollectD '); } if(@mysql_result(mysql_query("select count(interface_id) from interfaces WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') { echo('
- Ports '); } if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') { echo('
- VLANs '); } if(@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') { echo('
- VRFs '); } if($config['enable_bgp'] && $device['bgpLocalAs']) { echo('
- BGP '); } #if(@mysql_result(mysql_query("SELECT count(*) FROM nagios_hosts WHERE address = '".$device['hostname']."'", $nagios_link), 0) > '0') { # echo('
- # # Nagios # # '); #} if($_SESSION['userlevel'] >= "5" && mysql_result(mysql_query("SELECT count(*) FROM links AS L, interfaces AS I WHERE I.device_id = '".$device['device_id']."' AND I.interface_id = L.local_interface_id"),0)) { echo('
- Map '); } if($config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `entPhysical` WHERE device_id = '".$_GET['id']."'"), 0) > '0') { echo('
- Inventory '); } elseif ( $config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `hrDevice` WHERE device_id = '".$_GET['id']."'"), 0) > '0') { echo('
- Inventory '); } #if(mysql_result(mysql_query("select count(storage_id) from storage WHERE host_id = '" . $device['device_id'] . "'"), 0) > '0') { # echo(" #
- # # Storage # # #"); #} if(mysql_result(mysql_query("select count(service_id) from services WHERE service_host = '" . $device['device_id'] . "'"), 0) > '0') { echo('
- Services '); } echo('
- Events '); if($config['enable_syslog']) { echo('
- Syslog '); } if($_SESSION['userlevel'] >= "5" && is_file($config['rancid_configs'] . $device['hostname'])) { echo('
- Config '); } if($_SESSION['userlevel'] >= "5") { echo('
- Settings '); } echo("
-
#
');
include("pages/device/".mres($section).".inc.php");
echo("
");
}
} else { include("includes/error-no-perm-dev.inc.php"); }
?>