mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
sloped graphs for collectd (why weren't we already doing this? it's standard observium format :))
git-svn-id: http://www.observium.org/svn/observer/trunk@2144 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -550,8 +550,8 @@ function collectd_draw_rrd($host, $plugin, $pinst = null, $type, $tinst = null,
|
|||||||
$graph[] = sprintf('GPRINT:%s_avg:LAST:%%5.1lf%%s\\l', $k);
|
$graph[] = sprintf('GPRINT:%s_avg:LAST:%%5.1lf%%s\\l', $k);
|
||||||
}
|
}
|
||||||
|
|
||||||
#$rrd_cmd = array(RRDTOOL, 'graph', '-', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'], '-t', $rrdfile);
|
#$rrd_cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'], '-t', $rrdfile);
|
||||||
$rrd_cmd = array(RRDTOOL, 'graph', '-', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']);
|
$rrd_cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']);
|
||||||
if($config['rrd_width'] <= "300") {
|
if($config['rrd_width'] <= "300") {
|
||||||
$small_opts = array ('--font', "LEGEND:7:mono", '--font', "AXIS:6:mono", "--font-render-mode", "normal");
|
$small_opts = array ('--font', "LEGEND:7:mono", '--font', "AXIS:6:mono", "--font-render-mode", "normal");
|
||||||
$rrd_cmd = array_merge($rrd_cmd, $small_opts);
|
$rrd_cmd = array_merge($rrd_cmd, $small_opts);
|
||||||
@@ -590,8 +590,8 @@ function collectd_draw_generic($timespan, $host, $plugin, $pinst = null, $type,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
$rrd_file = sprintf('%s/%s%s%s/%s%s%s', $host, $plugin, is_null($pinst) ? '' : '-', $pinst, $type, is_null($tinst) ? '' : '-', $tinst);
|
$rrd_file = sprintf('%s/%s%s%s/%s%s%s', $host, $plugin, is_null($pinst) ? '' : '-', $pinst, $type, is_null($tinst) ? '' : '-', $tinst);
|
||||||
#$rrd_cmd = array(RRDTOOL, 'graph', '-', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'], '-t', $rrd_file);
|
#$rrd_cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'], '-t', $rrd_file);
|
||||||
$rrd_cmd = array(RRDTOOL, 'graph', '-', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']);
|
$rrd_cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']);
|
||||||
|
|
||||||
if($config['rrd_width'] <= "300") {
|
if($config['rrd_width'] <= "300") {
|
||||||
$small_opts = array ('--font', 'LEGEND:7:mono', '--font', 'AXIS:6:mono', '--font-render-mode', 'normal');
|
$small_opts = array ('--font', 'LEGEND:7:mono', '--font', 'AXIS:6:mono', '--font-render-mode', 'normal');
|
||||||
@@ -643,10 +643,10 @@ function collectd_draw_meta_stack(&$opts, &$sources) {
|
|||||||
if (isset($opts['logarithmic']) && $opts['logarithmic'])
|
if (isset($opts['logarithmic']) && $opts['logarithmic'])
|
||||||
array_unshift($opts['rrd_opts'], '-o');
|
array_unshift($opts['rrd_opts'], '-o');
|
||||||
|
|
||||||
# $cmd = array(RRDTOOL, 'graph', '-', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'],
|
# $cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'],
|
||||||
# '-t', $opts['title']);
|
# '-t', $opts['title']);
|
||||||
|
|
||||||
$cmd = array(RRDTOOL, 'graph', '-', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']);
|
$cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']);
|
||||||
|
|
||||||
if($config['rrd_width'] <= "300") {
|
if($config['rrd_width'] <= "300") {
|
||||||
$small_opts = array ('--font', 'LEGEND:7:mono', '--font', 'AXIS:6:mono', '--font-render-mode', 'normal');
|
$small_opts = array ('--font', 'LEGEND:7:mono', '--font', 'AXIS:6:mono', '--font-render-mode', 'normal');
|
||||||
@@ -741,10 +741,10 @@ function collectd_draw_meta_line(&$opts, &$sources) {
|
|||||||
if (isset($opts['logarithmic']) && $opts['logarithmic'])
|
if (isset($opts['logarithmic']) && $opts['logarithmic'])
|
||||||
array_unshift($opts['rrd_opts'], '-o');
|
array_unshift($opts['rrd_opts'], '-o');
|
||||||
|
|
||||||
# $cmd = array(RRDTOOL, 'graph', '-', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'], '-t', $opts['title']);
|
# $cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'], '-t', $opts['title']);
|
||||||
# $cmd = array_merge($cmd, $config['rrd_opts_array'], $opts['rrd_opts']);
|
# $cmd = array_merge($cmd, $config['rrd_opts_array'], $opts['rrd_opts']);
|
||||||
|
|
||||||
$cmd = array(RRDTOOL, 'graph', '-', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']);
|
$cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']);
|
||||||
|
|
||||||
if($config['rrd_width'] <= "300") {
|
if($config['rrd_width'] <= "300") {
|
||||||
$small_opts = array ('--font', 'LEGEND:7:mono', '--font', 'AXIS:6:mono', '--font-render-mode', 'normal');
|
$small_opts = array ('--font', 'LEGEND:7:mono', '--font', 'AXIS:6:mono', '--font-render-mode', 'normal');
|
||||||
|
|||||||
Reference in New Issue
Block a user