diff --git a/html/graph.php b/html/graph.php index a44032bd3e..cae36ad6c3 100755 --- a/html/graph.php +++ b/html/graph.php @@ -53,7 +53,17 @@ include("includes/graphs/graph.inc.php"); $end = utime(); $run = $end - $start;; -if($debug) { echo("runtime ".$run." secs"); } +if($debug) { echo("
Runtime ".$run." secs"); + + echo('
MySQL: Cell '.($db_stats['fetchcell']+0).'/'.round($db_stats['fetchcell_sec']+0,3).'s'. + ' Row '.($db_stats['fetchrow']+0). '/'.round($db_stats['fetchrow_sec']+0,3).'s'. + ' Rows '.($db_stats['fetchrows']+0).'/'.round($db_stats['fetchrows_sec']+0,3).'s'. + ' Column '.($db_stats['fetchcol']+0). '/'.round($db_stats['fetchcol_sec']+0,3).'s'); + + +} + + ?> 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 3420caa902..9f0e3309f4 100644 --- a/html/includes/graphs/device/smokeping_all_common_avg.inc.php +++ b/html/includes/graphs/device/smokeping_all_common_avg.inc.php @@ -40,9 +40,10 @@ foreach ($smokeping_files[$direction][$device['hostname']] as $source => $filena $filename = $config['smokeping']['dir'] . $filename; $rrd_options .= " DEF:median$i=".$filename.":median:AVERAGE "; + $rrd_options .= " CDEF:dm$i=median$i,UN,0,median$i,IF"; $rrd_options .= " DEF:loss$i=".$filename.":loss:AVERAGE"; $rrd_options .= " CDEF:ploss$i=loss$i,$pings,/,100,*"; - $rrd_options .= " CDEF:dm$i=median$i"; +# $rrd_options .= " CDEF:dm$i=median$i"; # $rrd_options .= " CDEF:dm$i=median$i,0,".$max->{$start}.",LIMIT"; /// start emulate Smokeping::calc_stddev @@ -81,6 +82,7 @@ $descr = str_replace(":", "\:", substr(str_pad("Average", $descr_len),0,$descr_l $rrd_options .= " CDEF:ploss_all=0".$ploss_list.",$i,/"; $rrd_options .= " CDEF:dm_all=0".$dm_list.",$i,/"; +# $rrd_options .= " CDEF:dm_all_clean=dm_all,UN,NaN,dm_all,IF"; $rrd_options .= " CDEF:sd_all=0".$sd_list.",$i,/"; $rrd_options .= " CDEF:dmlow_all=dm_all,sd_all,2,/,-"; diff --git a/html/includes/graphs/smokeping/out.inc.php b/html/includes/graphs/smokeping/out.inc.php index aac74179e8..8c93970fc2 100644 --- a/html/includes/graphs/smokeping/out.inc.php +++ b/html/includes/graphs/smokeping/out.inc.php @@ -36,7 +36,7 @@ if($device['hostname'] == $config['own_hostname']) { $filename = $config['smokeping']['dir'] . $dest['hostname'].'.rrd'; } else { - $filename = $config['smokeping']['dir'] . $device['hostname'] .'~'.$dest['hostname'].'.rrd'; + $filename = $config['smokeping']['dir'] . $dest['hostname'] .'~'.$device['hostname'].'.rrd'; } if (!isset($config['graph_colours'][$colourset][$iter])) { $iter = 0; } diff --git a/html/pages/device/latency.inc.php b/html/pages/device/latency.inc.php index 5f3074523d..466006cdaf 100644 --- a/html/pages/device/latency.inc.php +++ b/html/pages/device/latency.inc.php @@ -103,6 +103,7 @@ if($vars['view'] == "incoming") foreach($smokeping_files['out'][$device['hostname']] AS $host) { $hostname = str_replace(".rrd", "", $host); + list($hostname) = explode("~", $hostname); $host = device_by_name($hostname); if(is_numeric($host['device_id'])) { diff --git a/html/pages/graphs.inc.php b/html/pages/graphs.inc.php index ddff5ebc3f..682f266cdd 100644 --- a/html/pages/graphs.inc.php +++ b/html/pages/graphs.inc.php @@ -216,6 +216,19 @@ if (!$auth) echo(generate_graph_tag($graph_array)); echo(""); + if(isset($config['graph_descr'][$vars['type']])) + { + + print_optionbar_start(); + + echo('
+
+
'); + echo($config['graph_descr'][$vars['type']]); + print_optionbar_end(); + + } + if($vars['showcommand']) { $_GET = $graph_array; diff --git a/includes/static-config.php b/includes/static-config.php index fe937da287..120fb46b49 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -1023,7 +1023,7 @@ $config['graph_types']['device']['netscaler_tcp_pkts']['section'] = 'load balanc $config['graph_types']['device']['netscaler_tcp_pkts']['order'] = '0'; $config['graph_types']['device']['netscaler_tcp_pkts']['descr'] = 'TCP Packets'; - +$config['graph_descr']['device_smokeping_in_all'] = "This is an aggregate graph of the incoming smokeping tests to this host. The line corresponds to the average RTT. The shaded area around each line denotes the standard deviation."; ### Device Types diff --git a/scripts/mysql_stats.php b/scripts/mysql_stats.php index b161439601..6107d0f366 100755 --- a/scripts/mysql_stats.php +++ b/scripts/mysql_stats.php @@ -40,8 +40,8 @@ if (!array_key_exists('SCRIPT_FILENAME', $_SERVER) # here, you can define them in another file named the same as this file, with a # .cnf extension. # ============================================================================ -$mysql_user = 'user'; -$mysql_pass = 'password'; +$mysql_user = 'observium'; +$mysql_pass = 'flobbleobservium'; $mysql_host = 'localhost'; $mysql_port = 3306; $mysql_ssl = FALSE; # Whether to use SSL to connect to MySQL.