mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	descriptions on graph page (none created yet)
git-svn-id: http://www.observium.org/svn/observer/trunk@2931 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
		@@ -53,7 +53,17 @@ include("includes/graphs/graph.inc.php");
 | 
			
		||||
 | 
			
		||||
$end = utime(); $run = $end - $start;;
 | 
			
		||||
 | 
			
		||||
if($debug) { echo("runtime ".$run." secs"); }
 | 
			
		||||
if($debug) { echo("<br />Runtime ".$run." secs"); 
 | 
			
		||||
 | 
			
		||||
    echo('<br />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');
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
 
 | 
			
		||||
@@ -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,/,-";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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; }
 | 
			
		||||
 
 | 
			
		||||
@@ -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']))
 | 
			
		||||
         {
 | 
			
		||||
 
 | 
			
		||||
@@ -216,6 +216,19 @@ if (!$auth)
 | 
			
		||||
  echo(generate_graph_tag($graph_array));
 | 
			
		||||
  echo("</div>");
 | 
			
		||||
 | 
			
		||||
  if(isset($config['graph_descr'][$vars['type']]))
 | 
			
		||||
  {
 | 
			
		||||
 | 
			
		||||
    print_optionbar_start();
 | 
			
		||||
 | 
			
		||||
    echo('<div style="float: left; height: 100%;">
 | 
			
		||||
          <div style="padding: 10px"><img src="images/16/information.png" /></div>
 | 
			
		||||
          </div>');
 | 
			
		||||
    echo($config['graph_descr'][$vars['type']]);
 | 
			
		||||
    print_optionbar_end();
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if($vars['showcommand']) 
 | 
			
		||||
  {
 | 
			
		||||
    $_GET = $graph_array;
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user