diff --git a/html/includes/graphs/XXX_device_memory_windows.inc.php b/html/includes/graphs/XXX_device_memory_windows.inc.php index ad246586d..cd964a856 100644 --- a/html/includes/graphs/XXX_device_memory_windows.inc.php +++ b/html/includes/graphs/XXX_device_memory_windows.inc.php @@ -1,6 +1,7 @@ diff --git a/html/includes/graphs/application/mysql_innodb_semaphores.inc.php b/html/includes/graphs/application/mysql_innodb_semaphores.inc.php index 3192a2ecb..27e33aa18 100644 --- a/html/includes/graphs/application/mysql_innodb_semaphores.inc.php +++ b/html/includes/graphs/application/mysql_innodb_semaphores.inc.php @@ -32,7 +32,4 @@ $unit_text = "Semaphores"; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - - - ?> diff --git a/html/includes/graphs/application/mysql_innodb_transactions.inc.php b/html/includes/graphs/application/mysql_innodb_transactions.inc.php index ffe77a4ab..2f53e561b 100644 --- a/html/includes/graphs/application/mysql_innodb_transactions.inc.php +++ b/html/includes/graphs/application/mysql_innodb_transactions.inc.php @@ -30,5 +30,4 @@ $unit_text = "transactions"; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - ?> diff --git a/html/includes/graphs/application/mysql_myisam_indexes.inc.php b/html/includes/graphs/application/mysql_myisam_indexes.inc.php index c336e814c..883b496b1 100644 --- a/html/includes/graphs/application/mysql_myisam_indexes.inc.php +++ b/html/includes/graphs/application/mysql_myisam_indexes.inc.php @@ -5,9 +5,9 @@ include("includes/graphs/common.inc.php"); $rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd'; $array = array( 'KRRs' => 'read requests', - 'KRs' => 'reads', - 'KWR' => 'write requests', - 'KWs' => 'writes', + 'KRs' => 'reads', + 'KWR' => 'write requests', + 'KWs' => 'writes', ); $i = 0; @@ -33,5 +33,4 @@ $unit_text = "Keys"; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - ?> diff --git a/html/includes/graphs/application/mysql_query_cache.inc.php b/html/includes/graphs/application/mysql_query_cache.inc.php index ebb65296e..132e66dd0 100644 --- a/html/includes/graphs/application/mysql_query_cache.inc.php +++ b/html/includes/graphs/application/mysql_query_cache.inc.php @@ -9,7 +9,6 @@ if (is_file($mysql_rrd)) $rrd_filename = $mysql_rrd; } - $array = array('QCQICe' => array('descr' => 'Queries in cache', 'colour' => '22FF22'), 'QCHs' => array('descr' => 'Cache hits', 'colour' => '0022FF'), 'QCIs' => array('descr' => 'Inserts', 'colour' => 'FF0000'), @@ -36,6 +35,4 @@ $unit_text = "Commands"; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - - ?> diff --git a/html/includes/graphs/application/mysql_query_cache_memory.inc.php b/html/includes/graphs/application/mysql_query_cache_memory.inc.php index 133938c01..bc72499d5 100644 --- a/html/includes/graphs/application/mysql_query_cache_memory.inc.php +++ b/html/includes/graphs/application/mysql_query_cache_memory.inc.php @@ -31,5 +31,4 @@ $unit_text = "Bytes"; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - ?> diff --git a/html/includes/graphs/application/mysql_select_types.inc.php b/html/includes/graphs/application/mysql_select_types.inc.php index e96b43c73..7d25324e4 100644 --- a/html/includes/graphs/application/mysql_select_types.inc.php +++ b/html/includes/graphs/application/mysql_select_types.inc.php @@ -2,7 +2,6 @@ include("includes/graphs/common.inc.php"); - $rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd'; $array = array( 'SFJn' => 'Full Join', diff --git a/html/includes/graphs/application/mysql_slow_queries.inc.php b/html/includes/graphs/application/mysql_slow_queries.inc.php index dfcf412ea..6abffdd0c 100644 --- a/html/includes/graphs/application/mysql_slow_queries.inc.php +++ b/html/includes/graphs/application/mysql_slow_queries.inc.php @@ -4,7 +4,7 @@ include("includes/graphs/common.inc.php"); $rrd_filename = $config["rrd_dir"] . '/' . $device["hostname"] . '/app-mysql-'.$app["app_id"].'.rrd'; -$array = array( +$array = array( 'SQs' => 'Slow queries', ); @@ -31,5 +31,4 @@ $unit_text = "Queries"; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - ?> diff --git a/html/includes/graphs/application/mysql_sorts.inc.php b/html/includes/graphs/application/mysql_sorts.inc.php index 430758e6a..d2f44720b 100644 --- a/html/includes/graphs/application/mysql_sorts.inc.php +++ b/html/includes/graphs/application/mysql_sorts.inc.php @@ -34,6 +34,4 @@ $unit_text = ""; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - - ?> diff --git a/html/includes/graphs/application/mysql_table_locks.inc.php b/html/includes/graphs/application/mysql_table_locks.inc.php index e5d91f0df..08234d735 100644 --- a/html/includes/graphs/application/mysql_table_locks.inc.php +++ b/html/includes/graphs/application/mysql_table_locks.inc.php @@ -32,6 +32,4 @@ $unit_text = "Table locks"; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - - ?> diff --git a/html/includes/graphs/application/mysql_temporary_objects.inc.php b/html/includes/graphs/application/mysql_temporary_objects.inc.php index cef2c8eb3..ec22c6925 100644 --- a/html/includes/graphs/application/mysql_temporary_objects.inc.php +++ b/html/includes/graphs/application/mysql_temporary_objects.inc.php @@ -33,6 +33,4 @@ $unit_text = "Temp"; include("includes/graphs/generic_multi_simplex_seperated.inc.php"); - - ?> diff --git a/html/includes/graphs/application/ntpdserver_bits.inc.php b/html/includes/graphs/application/ntpdserver_bits.inc.php index 1766b72d1..f3cbb7428 100644 --- a/html/includes/graphs/application/ntpdserver_bits.inc.php +++ b/html/includes/graphs/application/ntpdserver_bits.inc.php @@ -29,6 +29,7 @@ if (is_file($ntpdserver_rrd)) } // include("includes/graphs/generic_bits.inc.php"); + include("includes/graphs/generic_duplex.inc.php"); ?> diff --git a/html/includes/graphs/application/ntpdserver_packets.inc.php b/html/includes/graphs/application/ntpdserver_packets.inc.php index 86bdc88d0..780039700 100644 --- a/html/includes/graphs/application/ntpdserver_packets.inc.php +++ b/html/includes/graphs/application/ntpdserver_packets.inc.php @@ -28,6 +28,7 @@ if (is_file($rrd_filename)) } // include("includes/graphs/generic_multi_line.inc.php"); + include("includes/graphs/generic_multi_simplex_seperated.inc.php"); ?> diff --git a/html/includes/graphs/c6kxbar/auth.inc.php b/html/includes/graphs/c6kxbar/auth.inc.php index fe4efc8e7..96076c92c 100644 --- a/html/includes/graphs/c6kxbar/auth.inc.php +++ b/html/includes/graphs/c6kxbar/auth.inc.php @@ -15,7 +15,4 @@ if ($auth && is_numeric($_GET['mod']) && is_numeric($_GET['chan'])) $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/c6kxbar-" . safename($_GET['mod']. "-".$_GET['chan']. ".rrd"); } - - - ?> diff --git a/html/includes/graphs/device/cras_sessions.inc.php b/html/includes/graphs/device/cras_sessions.inc.php index b7332d5cd..02496464d 100644 --- a/html/includes/graphs/device/cras_sessions.inc.php +++ b/html/includes/graphs/device/cras_sessions.inc.php @@ -3,6 +3,7 @@ $scale_min = "0"; include("includes/graphs/common.inc.php"); + $device = device_by_id_cache($id); $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cras_sessions.rrd"; diff --git a/html/includes/graphs/device/ipSystemStats.inc.php b/html/includes/graphs/device/ipSystemStats.inc.php index 738da6bd1..da2aff92b 100644 --- a/html/includes/graphs/device/ipSystemStats.inc.php +++ b/html/includes/graphs/device/ipSystemStats.inc.php @@ -1,6 +1,7 @@ diff --git a/html/includes/graphs/device/netstat_ip.inc.php b/html/includes/graphs/device/netstat_ip.inc.php index 0db64cd40..c6a174155 100644 --- a/html/includes/graphs/device/netstat_ip.inc.php +++ b/html/includes/graphs/device/netstat_ip.inc.php @@ -1,6 +1,7 @@ diff --git a/html/includes/graphs/device/nfsen_packets.inc.php b/html/includes/graphs/device/nfsen_packets.inc.php index 7ede8a551..a7b946394 100644 --- a/html/includes/graphs/device/nfsen_packets.inc.php +++ b/html/includes/graphs/device/nfsen_packets.inc.php @@ -1,5 +1,7 @@ diff --git a/html/includes/graphs/device/nfsen_traffic.inc.php b/html/includes/graphs/device/nfsen_traffic.inc.php index 50cf75cdf..77294aff7 100644 --- a/html/includes/graphs/device/nfsen_traffic.inc.php +++ b/html/includes/graphs/device/nfsen_traffic.inc.php @@ -1,5 +1,7 @@ diff --git a/html/includes/graphs/device/sensor.inc.php b/html/includes/graphs/device/sensor.inc.php index 0a3bd7db9..d6af31e60 100644 --- a/html/includes/graphs/device/sensor.inc.php +++ b/html/includes/graphs/device/sensor.inc.php @@ -1,6 +1,7 @@ "300") { $descr_len = "40"; } else { $descr_len = "22"; } diff --git a/html/includes/graphs/device/smokeping_all_common_avg.inc.php b/html/includes/graphs/device/smokeping_all_common_avg.inc.php index 9f0e3309f..ee46093ce 100644 --- a/html/includes/graphs/device/smokeping_all_common_avg.inc.php +++ b/html/includes/graphs/device/smokeping_all_common_avg.inc.php @@ -100,8 +100,6 @@ $descr = str_replace(":", "\:", substr(str_pad("Average", $descr_len),0,$descr_l $rrd_options .= " GPRINT:avsd:'%5.1lf%Ss'"; $rrd_options .= " GPRINT:avmsr:'%5.1lf%s\\l'"; - - # $rrd_options .= " AREA:dmlow$i"; # $rrd_options .= " AREA:s2d$i#".$colour."30::STACK"; # $rrd_options .= " LINE1:dm$i#".$colour.":'$descr'"; diff --git a/html/includes/graphs/device/toner.inc.php b/html/includes/graphs/device/toner.inc.php index 0615e54f5..ba49239d6 100644 --- a/html/includes/graphs/device/toner.inc.php +++ b/html/includes/graphs/device/toner.inc.php @@ -1,6 +1,7 @@ '); + echo('graph'); } unlink($graphfile); } diff --git a/html/includes/graphs/location/auth.inc.php b/html/includes/graphs/location/auth.inc.php index b266d7e5e..498dad149 100644 --- a/html/includes/graphs/location/auth.inc.php +++ b/html/includes/graphs/location/auth.inc.php @@ -2,7 +2,7 @@ foreach (dbFetchRows("SELECT * FROM `devices` WHERE `location` = ?", array($id)) as $device) { - if ($config['allow_unauth_graphs'] || device_permitted($device_id)) + if ($config['allow_unauth_graphs'] || device_permitted($device_id)) { $devices[] = $device; $title = $id; diff --git a/html/includes/graphs/location/bits.inc.php b/html/includes/graphs/location/bits.inc.php index a593da84d..e11f13d63 100644 --- a/html/includes/graphs/location/bits.inc.php +++ b/html/includes/graphs/location/bits.inc.php @@ -6,7 +6,7 @@ $ds_in = "INOCTETS"; $ds_out = "OUTOCTETS"; $i=1; -foreach($devices as $device) +foreach ($devices as $device) { foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($device['device_id'])) as $int) { @@ -64,5 +64,4 @@ $colour_area_out = "C3D9FF"; include("includes/graphs/generic_multi_bits_separated.inc.php"); - ?> diff --git a/html/includes/graphs/mempool/usage.inc.php b/html/includes/graphs/mempool/usage.inc.php index 15ee6a385..d05640d8d 100644 --- a/html/includes/graphs/mempool/usage.inc.php +++ b/html/includes/graphs/mempool/usage.inc.php @@ -28,7 +28,6 @@ if($width > "500") $descr = substr(str_pad(short_hrDeviceDescr($mempool['mempool_descr']), $descr_len),0,$descr_len); $descr = str_replace(":", "\:", $descr); - $perc = round($mempool['mempool_perc'], 0); $background = get_percentage_colours($perc); diff --git a/html/includes/graphs/rserver/auth.inc.php b/html/includes/graphs/rserver/auth.inc.php index 864419979..5cf6458ef 100644 --- a/html/includes/graphs/rserver/auth.inc.php +++ b/html/includes/graphs/rserver/auth.inc.php @@ -4,7 +4,7 @@ if (is_numeric($id)) { # $auth= TRUE; $rserver = dbFetchRow("SELECT * FROM `loadbalancer_rservers` AS I, `devices` AS D WHERE I.rserver_id = ? AND I.device_id = D.device_id", array($id)); - + if (is_numeric($rserver['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($rserver['device_id']))) { $device = device_by_id_cache($rserver['device_id']); diff --git a/html/includes/graphs/rserver/curr.inc.php b/html/includes/graphs/rserver/curr.inc.php index 6bd5c6ada..048a80b68 100755 --- a/html/includes/graphs/rserver/curr.inc.php +++ b/html/includes/graphs/rserver/curr.inc.php @@ -18,10 +18,10 @@ #include("includes/graphs/generic_simplex.inc.php"); - $scale_min = 0; include("includes/graphs/common.inc.php"); + $graph_max = 1; $ds = "RserverCurrentConns"; @@ -31,7 +31,6 @@ $colour_line = "191970"; $colour_area_max = "FFEE99"; - $nototal = 1; $unit_text = "Conns"; diff --git a/html/includes/graphs/rserver/failed.inc.php b/html/includes/graphs/rserver/failed.inc.php index 78dc40d80..291cdd396 100755 --- a/html/includes/graphs/rserver/failed.inc.php +++ b/html/includes/graphs/rserver/failed.inc.php @@ -3,6 +3,7 @@ $scale_min = 0; include("includes/graphs/common.inc.php"); + $graph_max = 1; $ds = "RserverCurrentConns"; @@ -12,7 +13,6 @@ $colour_line = "191970"; $colour_area_max = "FFEE99"; - $nototal = 1; $unit_text = "Conns"; diff --git a/html/includes/graphs/rserver/total.inc.php b/html/includes/graphs/rserver/total.inc.php index 43733df69..e4efdc81f 100755 --- a/html/includes/graphs/rserver/total.inc.php +++ b/html/includes/graphs/rserver/total.inc.php @@ -3,6 +3,7 @@ $scale_min = 0; include("includes/graphs/common.inc.php"); + $graph_max = 1; $ds = "RserverTotalConns"; @@ -12,7 +13,6 @@ $colour_line = "191970"; $colour_area_max = "FFEE99"; - $nototal = 1; $unit_text = "Conns"; diff --git a/html/includes/graphs/smokeping/in.inc.php b/html/includes/graphs/smokeping/in.inc.php index b290dd382..5456fa7c2 100644 --- a/html/includes/graphs/smokeping/in.inc.php +++ b/html/includes/graphs/smokeping/in.inc.php @@ -31,7 +31,6 @@ if($width > "500") $rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." RTT Loss SDev RTT\:SDev \l'"; } - if($src['hostname'] == $config['own_hostname']) { $filename = $config['smokeping']['dir'] . $device['hostname'].'.rrd'; diff --git a/html/includes/graphs/smokeping/out.inc.php b/html/includes/graphs/smokeping/out.inc.php index 8c93970fc..96147b224 100644 --- a/html/includes/graphs/smokeping/out.inc.php +++ b/html/includes/graphs/smokeping/out.inc.php @@ -31,7 +31,6 @@ if($width > "500") $rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." RTT Loss SDev RTT\:SDev \l'"; } - if($device['hostname'] == $config['own_hostname']) { $filename = $config['smokeping']['dir'] . $dest['hostname'].'.rrd'; diff --git a/html/includes/graphs/vserver/auth.inc.php b/html/includes/graphs/vserver/auth.inc.php index d87a5e5aa..39fe9b5c1 100644 --- a/html/includes/graphs/vserver/auth.inc.php +++ b/html/includes/graphs/vserver/auth.inc.php @@ -4,7 +4,7 @@ if (is_numeric($id)) { # $auth= TRUE; $vserver = dbFetchRow("SELECT * FROM `loadbalancer_vservers` AS I, `devices` AS D WHERE I.classmap_id = ? AND I.device_id = D.device_id", array($id)); - + if (is_numeric($vserver['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($vserver['device_id']))) { $device = device_by_id_cache($vserver['device_id']); diff --git a/html/includes/graphs/vserver/bits.inc.php b/html/includes/graphs/vserver/bits.inc.php index c00618836..378d3f89a 100644 --- a/html/includes/graphs/vserver/bits.inc.php +++ b/html/includes/graphs/vserver/bits.inc.php @@ -2,11 +2,11 @@ #include("includes/graphs/common.inc.php"); - $ds_in = "ByteCounts"; $ds_out = "ClientByteCounts"; include("includes/graphs/generic_bytes.inc.php"); + #include("includes/graphs/generic_duplex.inc.php"); ?> diff --git a/html/includes/graphs/vserver/conns.inc.php b/html/includes/graphs/vserver/conns.inc.php index b15be4a9a..6715c89a2 100755 --- a/html/includes/graphs/vserver/conns.inc.php +++ b/html/includes/graphs/vserver/conns.inc.php @@ -3,6 +3,7 @@ $scale_min = 0; include("includes/graphs/common.inc.php"); + $graph_max = 1; $ds = "NumberOfConnections"; @@ -12,7 +13,6 @@ $colour_line = "191970"; $colour_area_max = "FFEE99"; - $nototal = 1; $unit_text = "Conns"; diff --git a/html/includes/graphs/vserver/pkts.inc.php b/html/includes/graphs/vserver/pkts.inc.php index af4427a9a..be538a926 100644 --- a/html/includes/graphs/vserver/pkts.inc.php +++ b/html/includes/graphs/vserver/pkts.inc.php @@ -15,4 +15,5 @@ $graph_max = 1; $unit_text = "Packets"; include("includes/graphs/generic_duplex.inc.php"); + ?>