diff --git a/html/images/os/extremeware.png b/html/images/os/extreme.png similarity index 100% rename from html/images/os/extremeware.png rename to html/images/os/extreme.png diff --git a/html/includes/graphs/device_snmp_packets.inc.php b/html/includes/graphs/device_snmp_packets.inc.php new file mode 100644 index 000000000..c70fabb53 --- /dev/null +++ b/html/includes/graphs/device_snmp_packets.inc.php @@ -0,0 +1,25 @@ + diff --git a/html/includes/graphs/device_snmp_statistics.inc.php b/html/includes/graphs/device_snmp_statistics.inc.php new file mode 100644 index 000000000..de9c63b28 --- /dev/null +++ b/html/includes/graphs/device_snmp_statistics.inc.php @@ -0,0 +1,49 @@ + diff --git a/html/includes/print-device-graph.php b/html/includes/print-device-graph.php index 4278eae37..5a38d69cb 100644 --- a/html/includes/print-device-graph.php +++ b/html/includes/print-device-graph.php @@ -7,24 +7,24 @@ echo('
'.$graph_title.'
'); - $daily_traffic = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=$day&to=$now&width=215&height=100"; + $daily_traffic = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['day']."&to=".$config['now']."&width=215&height=100"; $daily_traffic .= $args; - $daily_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=$day&to=$now&width=400&height=150"; + $daily_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['day']."&to=".$config['now']."&width=400&height=150"; $daily_url .= $args; - $weekly_traffic = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=$week&to=$now&width=215&height=100"; + $weekly_traffic = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['week']."&to=".$config['now']."&width=215&height=100"; $weekly_traffic .= $args; - $weekly_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=$week&to=$now&width=400&height=150"; + $weekly_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['week']."&to=".$config['now']."&width=400&height=150"; $weekly_url .= $args; - $monthly_traffic = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=$month&to=$now&width=215&height=100"; + $monthly_traffic = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['month']."&to=".$config['now']."&width=215&height=100"; $monthly_traffic .= $args; - $monthly_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=$month&to=$now&width=400&height=150"; + $monthly_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['month']."&to=".$config['now']."&width=400&height=150"; $monthly_url .= $args; - $yearly_traffic = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=$year&to=$now&width=215&height=100"; + $yearly_traffic = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['year']."&to=".$config['now']."&width=215&height=100"; $yearly_traffic .= $args; - $yearly_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=$year&to=$now&width=400&height=150"; + $yearly_url = "graph.php?device=" . $device['device_id'] . "&type=$graph_type&from=".$config['year']."&to=".$config['now']."&width=400&height=150"; $yearly_url .= $args; echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> diff --git a/html/pages/device/graphs.inc.php b/html/pages/device/graphs.inc.php index 1331f9a15..b80ded461 100644 --- a/html/pages/device/graphs.inc.php +++ b/html/pages/device/graphs.inc.php @@ -1,27 +1,52 @@ '); + +$datas = array('System','Network'); + +if(!$_GET['opta']) { $_GET['opta'] = strtolower($datas[0]); } + +print_optionbar_start('', ''); + +$sep = ""; +foreach ($datas as $texttype) { - $hostname = $device[hostname]; - $bg="#ffffff"; - - echo('
'); - - if ($config['os'][$device['os']]['group']) { $os_group = $config['os'][$device['os']]['group']; } - - if (is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os'].".inc.php")) { - /// OS Specific - include($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os'].".inc.php"); - } elseif ($os_group && is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$os_group.".inc.php")) { - /// OS Group Specific - include($config['install_dir'] . "/html/pages/device/graphs/os-".$os_group.".inc.php"); - } else { - echo("No graph definitions found for OS " . $device['os'] . "!"); + $type = strtolower($texttype); + echo($sep); + if ($_GET['opta'] == $type) + { + echo(""); + echo(''); } - - echo("
"); + else + { + echo(''); + } + echo("
" . $texttype ."\n"); + if ($_GET['opta'] == $type) { echo(""); } + $sep = " | "; } +unset ($sep); +print_optionbar_end(); + +#echo('
'); + + include_dir("/html/pages/device/graphs/".mres($_GET['opta'])); + + #if ($config['os'][$device['os']]['group']) { $os_group = $config['os'][$device['os']]['group']; } + #if (is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os'].".inc.php")) { + # /// OS Specific + # include($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os'].".inc.php"); + #} elseif ($os_group && is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$os_group.".inc.php")) { + # /// OS Group Specific + # include($config['install_dir'] . "/html/pages/device/graphs/os-".$os_group.".inc.php"); + #} else { + # echo("No graph definitions found for OS " . $device['os'] . "!"); + #} + +# echo("
"); ?> diff --git a/html/pages/device/graphs/netstats.inc.php b/html/pages/device/graphs/netstats.inc.php deleted file mode 100644 index 92e0d20ad..000000000 --- a/html/pages/device/graphs/netstats.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/html/pages/device/graphs/network/netstats.inc.php b/html/pages/device/graphs/network/netstats.inc.php new file mode 100644 index 000000000..5cb716df8 --- /dev/null +++ b/html/pages/device/graphs/network/netstats.inc.php @@ -0,0 +1,51 @@ + diff --git a/html/pages/device/graphs/os-allied.inc.php b/html/pages/device/graphs/os-allied.inc.php deleted file mode 100644 index 6628668a8..000000000 --- a/html/pages/device/graphs/os-allied.inc.php +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/html/pages/device/graphs/os-bcm96348.inc.php b/html/pages/device/graphs/os-bcm96348.inc.php deleted file mode 100644 index d5b05f80e..000000000 --- a/html/pages/device/graphs/os-bcm96348.inc.php +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/html/pages/device/graphs/os-fortigate.inc.php b/html/pages/device/graphs/os-fortigate.inc.php deleted file mode 100644 index e926b015b..000000000 --- a/html/pages/device/graphs/os-fortigate.inc.php +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/html/pages/device/graphs/os-ios.inc.php b/html/pages/device/graphs/os-ios.inc.php deleted file mode 100644 index 42532d915..000000000 --- a/html/pages/device/graphs/os-ios.inc.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/html/pages/device/graphs/os-ironware.inc.php b/html/pages/device/graphs/os-ironware.inc.php deleted file mode 100644 index 42532d915..000000000 --- a/html/pages/device/graphs/os-ironware.inc.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/html/pages/device/graphs/os-junos.inc.php b/html/pages/device/graphs/os-junos.inc.php deleted file mode 100644 index 6628668a8..000000000 --- a/html/pages/device/graphs/os-junos.inc.php +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/html/pages/device/graphs/os-junose.inc.php b/html/pages/device/graphs/os-junose.inc.php deleted file mode 100644 index c464742a3..000000000 --- a/html/pages/device/graphs/os-junose.inc.php +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/html/pages/device/graphs/os-mgeups.inc.php b/html/pages/device/graphs/os-mgeups.inc.php deleted file mode 100644 index deafeb748..000000000 --- a/html/pages/device/graphs/os-mgeups.inc.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/html/pages/device/graphs/os-papouch-tme.inc.php b/html/pages/device/graphs/os-papouch-tme.inc.php deleted file mode 100644 index deafeb748..000000000 --- a/html/pages/device/graphs/os-papouch-tme.inc.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/html/pages/device/graphs/os-powerconnect.inc.php b/html/pages/device/graphs/os-powerconnect.inc.php deleted file mode 100644 index 2d0ca5e27..000000000 --- a/html/pages/device/graphs/os-powerconnect.inc.php +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/html/pages/device/graphs/os-procurve.inc.php b/html/pages/device/graphs/os-procurve.inc.php deleted file mode 100644 index e9aaec5a5..000000000 --- a/html/pages/device/graphs/os-procurve.inc.php +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/html/pages/device/graphs/os-redback.inc.php b/html/pages/device/graphs/os-redback.inc.php deleted file mode 100644 index 683ec6642..000000000 --- a/html/pages/device/graphs/os-redback.inc.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/html/pages/device/graphs/os-screenos.inc.php b/html/pages/device/graphs/os-screenos.inc.php deleted file mode 100644 index 9a6f2a144..000000000 --- a/html/pages/device/graphs/os-screenos.inc.php +++ /dev/null @@ -1,16 +0,0 @@ -"; - $graph_type = "netscreen_memory"; include ("includes/print-device-graph.php"); - - $graph_title = "Firewall Sessions"; - $graph_type = "netscreen_sessions"; include ("includes/print-device-graph.php"); - - - include("graphs/netstats.inc.php"); - include("graphs/uptime.inc.php"); - -?> diff --git a/html/pages/device/graphs/os-snom.inc.php b/html/pages/device/graphs/os-snom.inc.php deleted file mode 100644 index cdb553007..000000000 --- a/html/pages/device/graphs/os-snom.inc.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/html/pages/device/graphs/os-unix.inc.php b/html/pages/device/graphs/os-unix.inc.php deleted file mode 100644 index 4a0979348..000000000 --- a/html/pages/device/graphs/os-unix.inc.php +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/html/pages/device/graphs/os-windows.inc.php b/html/pages/device/graphs/os-windows.inc.php deleted file mode 100644 index 4a0979348..000000000 --- a/html/pages/device/graphs/os-windows.inc.php +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/html/pages/device/graphs/storage.inc.php b/html/pages/device/graphs/storage.inc.php deleted file mode 100644 index a7369a6cb..000000000 --- a/html/pages/device/graphs/storage.inc.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/html/pages/device/graphs/cpu.inc.php b/html/pages/device/graphs/system/cpu.inc.php similarity index 65% rename from html/pages/device/graphs/cpu.inc.php rename to html/pages/device/graphs/system/cpu.inc.php index 74f840d25..84597a097 100644 --- a/html/pages/device/graphs/cpu.inc.php +++ b/html/pages/device/graphs/system/cpu.inc.php @@ -1,5 +1,7 @@ diff --git a/html/pages/device/graphs/hrprocesses.inc.php b/html/pages/device/graphs/system/hrprocesses.inc.php similarity index 63% rename from html/pages/device/graphs/hrprocesses.inc.php rename to html/pages/device/graphs/system/hrprocesses.inc.php index 0176e3b2a..0a03a49fb 100644 --- a/html/pages/device/graphs/hrprocesses.inc.php +++ b/html/pages/device/graphs/system/hrprocesses.inc.php @@ -1,5 +1,7 @@ diff --git a/html/pages/device/graphs/hrusers.inc.php b/html/pages/device/graphs/system/hrusers.inc.php similarity index 61% rename from html/pages/device/graphs/hrusers.inc.php rename to html/pages/device/graphs/system/hrusers.inc.php index be8e19184..1829c5a60 100644 --- a/html/pages/device/graphs/hrusers.inc.php +++ b/html/pages/device/graphs/system/hrusers.inc.php @@ -1,5 +1,11 @@ diff --git a/html/pages/device/graphs/laload.inc.php b/html/pages/device/graphs/system/laload.inc.php similarity index 61% rename from html/pages/device/graphs/laload.inc.php rename to html/pages/device/graphs/system/laload.inc.php index ed1a4ab6c..0e9a72473 100644 --- a/html/pages/device/graphs/laload.inc.php +++ b/html/pages/device/graphs/system/laload.inc.php @@ -1,5 +1,7 @@ diff --git a/html/pages/device/graphs/memory.inc.php b/html/pages/device/graphs/system/memory.inc.php similarity index 62% rename from html/pages/device/graphs/memory.inc.php rename to html/pages/device/graphs/system/memory.inc.php index 67a2f7bd8..211f9ca25 100644 --- a/html/pages/device/graphs/memory.inc.php +++ b/html/pages/device/graphs/system/memory.inc.php @@ -1,5 +1,7 @@ diff --git a/html/pages/device/graphs/uptime.inc.php b/html/pages/device/graphs/system/uptime.inc.php similarity index 100% rename from html/pages/device/graphs/uptime.inc.php rename to html/pages/device/graphs/system/uptime.inc.php diff --git a/includes/osdiscovery/discover-extremeware.php b/includes/osdiscovery/discover-extremeware.php index bc356f18c..7fa4be126 100755 --- a/includes/osdiscovery/discover-extremeware.php +++ b/includes/osdiscovery/discover-extremeware.php @@ -3,6 +3,8 @@ if(!$os) { if(strstr($sysObjectId, ".1.3.6.1.4.1.1916.2")) { $os = "extremeware"; } + if(strstr($sysDescr, "XOS")) { $os = "xos"; } + } diff --git a/includes/rewrites.php b/includes/rewrites.php index e367129cc..4d848bccf 100644 --- a/includes/rewrites.php +++ b/includes/rewrites.php @@ -115,6 +115,82 @@ $rewrite_junose_hardware = array( 'juniSsx1440' => 'SSX-1440', ); + +$rewrite_extreme_hardware = array ( +'.1.3.6.1.4.1.1916.2.26' => 'Alpine 3802', +'.1.3.6.1.4.1.1916.2.20' => 'Alpine 3804', +'.1.3.6.1.4.1.1916.2.17' => 'Alpine 3808', +'.1.3.6.1.4.1.1916.2.86' => 'Altitude 300', +'.1.3.6.1.4.1.1916.2.75' => 'Altitude 350', +'.1.3.6.1.4.1.1916.2.56' => 'BlackDiamond 10808', +'.1.3.6.1.4.1.1916.2.85' => 'BlackDiamond 12802', +'.1.3.6.1.4.1.1916.2.77' => 'BlackDiamond 12804', +'.1.3.6.1.4.1.1916.2.8' => 'BlackDiamond 6800', +'.1.3.6.1.4.1.1916.2.27' => 'BlackDiamond 6804', +'.1.3.6.1.4.1.1916.2.11' => 'BlackDiamond 6808', +'.1.3.6.1.4.1.1916.2.24' => 'BlackDiamond 6816', +'.1.3.6.1.4.1.1916.2.74' => 'BlackDiamond 8806', +'.1.3.6.1.4.1.1916.2.62' => 'BlackDiamond 8810', +'.1.3.6.1.4.1.1916.2.23' => 'EnetSwitch 24Port', +'.1.3.6.1.4.1.1916.2.83' => 'Sentriant CE150', +'.1.3.6.1.4.1.1916.2.58' => 'Summit 400-48t', +'.1.3.6.1.4.1.1916.2.59' => 'Summit 400-48t', +'.1.3.6.1.4.1.1916.2.71' => 'Summit X450a-24t', +'.1.3.6.1.4.1.1916.2.81' => 'Summit X450a-24t', +'.1.3.6.1.4.1.1916.2.1' => 'Summit 1', +'.1.3.6.1.4.1.1916.2.19' => 'Summit 1iSX', +'.1.3.6.1.4.1.1916.2.14' => 'Summit 1iTX', +'.1.3.6.1.4.1.1916.2.2' => 'Summit 2', +'.1.3.6.1.4.1.1916.2.53' => 'Summit 200-24', +'.1.3.6.1.4.1.1916.2.70' => 'Summit 200-24fx', +'.1.3.6.1.4.1.1916.2.54' => 'Summit 200-48', +'.1.3.6.1.4.1.1916.2.7' => 'Summit 24', +'.1.3.6.1.4.1.1916.2.41' => 'Summit 24e2SX', +'.1.3.6.1.4.1.1916.2.40' => 'Summit 24e2TX', +'.1.3.6.1.4.1.1916.2.25' => 'Summit 24e3', +'.1.3.6.1.4.1.1916.2.3' => 'Summit 3', +'.1.3.6.1.4.1.1916.2.61' => 'Summit 300-24', +'.1.3.6.1.4.1.1916.2.55' => 'Summit 300-48', +'.1.3.6.1.4.1.1916.2.4' => 'Summit 4', +'.1.3.6.1.4.1.1916.2.58' => 'Summit 400-24', +'.1.3.6.1.4.1.1916.2.64' => 'Summit 400-24p', +'.1.3.6.1.4.1.1916.2.63' => 'Summit 400-24t', +'.1.3.6.1.4.1.1916.2.59' => 'Summit 400-24x', +'.1.3.6.1.4.1.1916.2.6' => 'Summit 48', +'.1.3.6.1.4.1.1916.2.16' => 'Summit 48i', +'.1.3.6.1.4.1.1916.2.28' => 'Summit 48i1u', +'.1.3.6.1.4.1.1916.2.5' => 'Summit 4FX', +'.1.3.6.1.4.1.1916.2.15' => 'Summit 5i', +'.1.3.6.1.4.1.1916.2.21' => 'Summit 5iLX', +'.1.3.6.1.4.1.1916.2.22' => 'Summit 5iTX', +'.1.3.6.1.4.1.1916.2.12' => 'Summit 7iSX', +'.1.3.6.1.4.1.1916.2.13' => 'Summit 7iTX', +'.1.3.6.1.4.1.1916.2.30' => 'Summit Px1', +'.1.3.6.1.4.1.1916.2.67' => 'SummitStack', +'.1.3.6.1.4.1.1916.2.93' => 'Summit Ver2Stack', +'.1.3.6.1.4.1.1916.2.68' => 'SummitWM 100', +'.1.3.6.1.4.1.1916.2.69' => 'SummitWM 1000', +'.1.3.6.1.4.1.1916.2.94' => 'SummitWM 200', +'.1.3.6.1.4.1.1916.2.95' => 'SummitWM 2000', +'.1.3.6.1.4.1.1916.2.89' => 'Summit X250-24p', +'.1.3.6.1.4.1.1916.2.88' => 'Summit X250-24t', +'.1.3.6.1.4.1.1916.2.90' => 'Summit X250-24x', +'.1.3.6.1.4.1.1916.2.92' => 'Summit X250-48p', +'.1.3.6.1.4.1.1916.2.91' => 'Summit X250-48t', +'.1.3.6.1.4.1.1916.2.93' => 'Summit X250e-24t (3-Stack)', +'.1.3.6.1.4.1.1916.2.88' => 'Summit X250e-24t (Single)', +'.1.3.6.1.4.1.1916.2.66' => 'Summit X450-24t', +'.1.3.6.1.4.1.1916.2.65' => 'Summit X450-24x', +'.1.3.6.1.4.1.1916.2.80' => 'Summit X450a-24tDC', +'.1.3.6.1.4.1.1916.2.84' => 'Summit X450a-24x', +'.1.3.6.1.4.1.1916.2.82' => 'Summit X450a-24xDC', +'.1.3.6.1.4.1.1916.2.76' => 'Summit X450a-48t', +'.1.3.6.1.4.1.1916.2.87' => 'Summit X450a-48tDC', +'.1.3.6.1.4.1.1916.2.72' => 'Summit X450e-24p', +'.1.3.6.1.4.1.1916.2.79' => 'Summit X450e-48p' +); + + $rewrite_ironware_hardware = array( 'snFIWGSwitch' => 'Stackable FastIron workgroup', 'snFIBBSwitch' => 'Stackable FastIron backbone', @@ -667,6 +743,15 @@ function rewrite_ios_features ($features) return ($features); } +function rewrite_extreme_hardware ($hardware) +{ + global $rewrite_extreme_hardware; + #$hardware = array_str_replace($rewrite_extreme_hardware, $hardware); + $hardware = $rewrite_extreme_hardware[$hardware]; + return ($hardware); +} + + function rewrite_ironware_hardware ($hardware) { global $rewrite_ironware_hardware; diff --git a/includes/static-config.php b/includes/static-config.php index d5eab51d9..dbf418980 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -108,6 +108,15 @@ $config['os']['ironware']['type'] = "network"; $config['os']['extremeware']['text'] = "Extremeware"; $config['os']['extremeware']['type'] = "network"; $config['os']['extremeware']['ifname'] = 1; +$config['os']['extremeware']['icon'] = "extreme"; + + +$config['os']['xos']['text'] = "Extreme XOS"; +$config['os']['xos']['type'] = "network"; +$config['os']['xos']['ifname'] = 1; +$config['os']['xos']['group'] = "extremeware"; +$config['os']['xos']['icon'] = "extreme"; + $config['os']['powerconnect']['text'] = "Dell PowerConnect"; $config['os']['powerconnect']['ifname'] = 1; diff --git a/poller.php b/poller.php index a02aecdbc..79391ce19 100755 --- a/poller.php +++ b/poller.php @@ -162,6 +162,8 @@ while ($device = mysql_fetch_array($device_query)) { echo("Generic :("); } + echo("Hardware:".$hardware." Version:".$version." Features:".$features."\n"); + $sysLocation = str_replace("\"","", $sysLocation); include("includes/polling/temperatures.inc.php");