commit version 22.12.12447
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
$ds_in = "INOCTETS";
|
||||
$ds_out = "OUTOCTETS";
|
||||
|
||||
$graph_return = array('descr' => 'Device total traffic in bits/sec.');
|
||||
$graph_return['descr'] = 'Device total traffic in bits/sec.';
|
||||
|
||||
// init
|
||||
$i = 0;
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,14 +6,14 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage graphs
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
|
||||
*
|
||||
*/
|
||||
|
||||
$sql = "SELECT * FROM `processors` WHERE `processor_type` != 'hr-average' AND `device_id` = ?";
|
||||
if (isset($vars['filter_id']))
|
||||
{
|
||||
$sql .= generate_query_values($vars['filter_id'], 'processor_id');
|
||||
$sql .= generate_query_values_and($vars['filter_id'], 'processor_id');
|
||||
}
|
||||
$procs = dbFetchRows($sql, array($device['device_id']));
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -164,8 +163,6 @@ $rrd_options .= $rrd_options_lc;
|
||||
$rrd_options .= $rrd_options_bg;
|
||||
|
||||
$rrd_options .= " COMMENT:'\l'"; # matt.ayre: annotation showing smokeping parameters
|
||||
$rrd_options .= " COMMENT:'probes\:\t$pings ICMP Echo Pings ($description) every ${interval}s\l'";
|
||||
|
||||
$rrd_options .= " COMMENT:'probes\:\t$pings ICMP Echo Pings ($description) every {$interval}s\l'";
|
||||
|
||||
|
||||
?>
|
||||
// EOF
|
||||
|
@ -15,18 +15,22 @@ $scale_max = "100";
|
||||
|
||||
include_once($config['html_dir']."/includes/graphs/common.inc.php");
|
||||
|
||||
if($width > 500)
|
||||
if($width > 350)
|
||||
{
|
||||
$descr_len = 22;
|
||||
$padding = 45;
|
||||
$text_width = 7;
|
||||
} else {
|
||||
$descr_len = 12;
|
||||
$padding = 39;
|
||||
$text_width = 6;
|
||||
}
|
||||
$descr_len += round(($width - 250) / 8);
|
||||
$legend_len = ($vars['width'] + $padding) / $text_width;
|
||||
$descr_len = $legend_len - 31;
|
||||
|
||||
$iter = 0;
|
||||
$colours = 'mixed-10c';
|
||||
$rrd_options .= " COMMENT:'".str_pad('Size Used %used', $descr_len+31, ' ', STR_PAD_LEFT)."\\l'";
|
||||
//$rrd_options .= " COMMENT:' Size Used %age\\l'";
|
||||
$rrd_options .= " COMMENT:'".str_pad('Size Used % Used', $legend_len, ' ', STR_PAD_LEFT)."\\l'";
|
||||
$graph_return['legend_lines'] = 1;
|
||||
|
||||
|
||||
foreach (dbFetchRows("SELECT * FROM storage where device_id = ?", array($device['device_id'])) as $storage)
|
||||
{
|
||||
@ -47,7 +51,14 @@ foreach (dbFetchRows("SELECT * FROM storage where device_id = ?", array($device[
|
||||
$rrd_options .= " GPRINT:".$storage['storage_id']."used:LAST:%6.2lf%sB";
|
||||
$rrd_options .= " GPRINT:".$storage['storage_id']."perc:LAST:%5.2lf%%\\l";
|
||||
$iter++;
|
||||
$graph_return['legend_lines']++;
|
||||
$graph_return['rrds'][] = $rrd;
|
||||
} else {
|
||||
$graph_return['missing_rrds'][] = $rrd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// EOF
|
||||
|
Reference in New Issue
Block a user