diff --git a/html/graph.php b/html/graph.php index 50a30edf54..e2e7d9ed18 100644 --- a/html/graph.php +++ b/html/graph.php @@ -122,7 +122,13 @@ $graph = cpugraphHP ($hostname . "/cpu.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical); } elseif($os == "Snom") { $graph = callsgraphSNOM ($hostname . "/data.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical); + } elseif($os == "ScreenOS") { + $graph = graph_netscreen_cpu ($hostname . "/data.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical); + } elseif($os == "Fortigate") { + $graph = graph_fortinet_cpu ($hostname . "/data.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical); } + + break; case 'temp': $graph = temp_graph ($_GET['id'], $graphfile, $from, $to, $width, $height, $title, $vertical); diff --git a/html/images/box-alert.png b/html/images/box-alert.png index f56486ad17..dcbaa5067c 100644 Binary files a/html/images/box-alert.png and b/html/images/box-alert.png differ diff --git a/html/images/box-info.png b/html/images/box-info.png index b8259cd0fe..866533e447 100644 Binary files a/html/images/box-info.png and b/html/images/box-info.png differ diff --git a/html/images/box-ok.png b/html/images/box-ok.png index b7af967ef2..6ab6fbe20d 100644 Binary files a/html/images/box-ok.png and b/html/images/box-ok.png differ diff --git a/html/images/box-warn.png b/html/images/box-warn.png index afa0398376..a02714cfd3 100644 Binary files a/html/images/box-warn.png and b/html/images/box-warn.png differ diff --git a/html/includes/print-interface.inc b/html/includes/print-interface.inc index 7b7638707a..1207fa5f80 100644 --- a/html/includes/print-interface.inc +++ b/html/includes/print-interface.inc @@ -123,7 +123,7 @@ echo(""); } } unset($br); - } + # } $sql = "SELECT network_id FROM ip6addr AS A, ip6networks AS N, interfaces AS I WHERE A.interface_id = I.interface_id @@ -137,8 +137,8 @@ echo(""); $sql = "SELECT I.interface_id FROM ip6addr AS A, ip6networks AS N, interfaces AS I, devices AS D WHERE A.interface_id = I.interface_id - AND A.network = N.cidr - AND N.network_id = '".$net['network_id']."' AND D.device_id = I.device_id and D.device_id != '".$device['device_id']."'"; + AND A.network = N.cidr AND N.network_id = '".$net['network_id']."' AND D.device_id = I.device_id + AND D.device_id != '".$device['device_id']."' AND A.origin != 'linklayer' AND A.origin != 'wellknown'"; $new_query = mysql_query($sql); while($new = mysql_fetch_array($new_query)) { @@ -174,6 +174,8 @@ echo(""); unset($int_links, $int_links_v6, $int_links_v4, $int_links_phys, $br); + } + echo(""); // If we're showing graphs, generate the graph and print the img tags diff --git a/includes/functions.php b/includes/functions.php index 150e87284a..1e0ee0fced 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -13,7 +13,6 @@ include_once($config['install_dir'] . "/includes/ios.php"); include_once($config['install_dir'] . "/includes/unix.php"); include_once($config['install_dir'] . "/includes/windows.php"); include_once($config['install_dir'] . "/includes/procurve.php"); -include_once($config['install_dir'] . "/includes/snom.php"); include_once($config['install_dir'] . "/includes/graphing.php"); include_once($config['install_dir'] . "/includes/print-functions.php"); include_once($config['install_dir'] . "/includes/billing-functions.php"); diff --git a/includes/snom.php b/includes/snom.php index 7c5dc45a8d..7af80872bd 100755 --- a/includes/snom.php +++ b/includes/snom.php @@ -2,43 +2,25 @@ include("snom-graphing.php"); -function pollDeviceSNOM() { +function pollDeviceSNOM($device) { - global $device; - global $community; - $snmpver = $device['snmpver']; - $id = $device['device_id']; - $hostname = $device['hostname']; - $hardware = $device['hardware']; - $version = $device['version']; - $features = $device['features']; - $location = $device['location']; + global $config - $snmpdata = `snmpget -Ovq -$snmpver -c $community $hostname 1.3.6.1.2.1.7526.2.1.1 1.3.6.1.2.1.7526.2.1.2 1.3.6.1.2.1.7526.2.2.1 1.3.6.1.2.1.7526.2.2.2`; - $snmpdatab = `snmpget -Oqv -$snmpver -c $community $hostname 1.3.6.1.2.1.7526.2.5 1.3.6.1.2.1.7526.2.6`; + $snmpdata = shell_exec($config['snmpget'] . " -Ovq -".$device['snmpver']." -c ".$device['community']." ".$device['hostname']." 1.3.6.1.2.1.7526.2.1.1 1.3.6.1.2.1.7526.2.1.2 1.3.6.1.2.1.7526.2.2.1 1.3.6.1.2.1.7526.2.2.2"); + $snmpdatab = shell_exec($config['snmpget'] . " -Oqv -".$device['snmpver']." -c ".$device['community']." ".$device['hostname']." 1.3.6.1.2.1.7526.2.5 1.3.6.1.2.1.7526.2.6"); list($rxbytes, $rxpkts, $txbytes, $txpkts) = explode("\n", $snmpdata); list($calls, $registrations) = explode("\n", $snmpdatab); $txbytes = 0 - $txbytes * 8; $rxbytes = 0 - $rxbytes * 8; - echo("$rxbytes, $rxpkts, $txbytes, $txpkts, $calls, $registrations"); - $rrdfile = "rrd/" . $hostname . "-data.rrd"; + $rrdfile = "rrd/" . $device['hostname'] . "-data.rrd"; if(!is_file($rrdfile)) { - $woo = `rrdtool create $rrdfile \ - DS:INOCTETS:COUNTER:600:U:100000000000 \ - DS:OUTOCTETS:COUNTER:600:U:10000000000 \ - DS:INPKTS:COUNTER:600:U:10000000000 \ - DS:OUTPKTS:COUNTER:600:U:10000000000 \ - DS:CALLS:COUNTER:600:U:10000000000 \ - DS:REGISTRATIONS:COUNTER:600:U:10000000000 \ - RRA:AVERAGE:0.5:1:600 \ - RRA:AVERAGE:0.5:6:700 \ - RRA:AVERAGE:0.5:24:775 \ - RRA:AVERAGE:0.5:288:797 \ - RRA:MAX:0.5:1:600 \ - RRA:MAX:0.5:6:700 \ - RRA:MAX:0.5:24:775 \ - RRA:MAX:0.5:288:797`; + $woo = shell_exec($config['rrdtool'] . " create $rrdfile \ + DS:INOCTETS:COUNTER:600:U:100000000000 DS:OUTOCTETS:COUNTER:600:U:10000000000 \ + DS:INPKTS:COUNTER:600:U:10000000000 DS:OUTPKTS:COUNTER:600:U:10000000000 \ + DS:CALLS:COUNTER:600:U:10000000000 DS:REGISTRATIONS:COUNTER:600:U:10000000000 \ + RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 \ + RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797"); } $rrdupdate = "N:$rxbytes:$txbytes:$rxpkts:$rxbytes:$calls:$registrations"; diff --git a/poll-device.php b/poll-device.php index cf5ef13d14..99615d4686 100755 --- a/poll-device.php +++ b/poll-device.php @@ -263,12 +263,12 @@ while ($device = mysql_fetch_array($device_query)) { if(is_file($old_uptimerrd) && !is_file($uptimerrd)) { rename($old_uptimerrd, $uptimerrd); echo("Moving $old_uptimerrd to $uptimerrd"); } if(!is_file($uptimerrd)) { - $woo = `rrdtool create $uptimerrd \ + $woo = shell_exec($config['rrdtool'] . " create $uptimerrd \ DS:uptime:GAUGE:600:0:U \ RRA:AVERAGE:0.5:1:600 \ RRA:AVERAGE:0.5:6:700 \ RRA:AVERAGE:0.5:24:775 \ - RRA:AVERAGE:0.5:288:797`; + RRA:AVERAGE:0.5:288:797"); } rrdtool_update($uptimerrd, "N:$uptime");