From 69dbd9d549b7a285ef3ffceee8e368680b756bf4 Mon Sep 17 00:00:00 2001 From: Edmondo Tommasina Date: Wed, 12 May 2010 14:39:03 +0200 Subject: Allow to define alternate options for rrdtool in config file Since I'm using a non standard installation of rrdtool, I always have to define the --font options when colling the rrdtool binary. I tried to implement this change in a general way to define locally rrdtool options in the config.local.php. Signed-off-by: Edmondo Tommasina --- type/Default.class.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'type') diff --git a/type/Default.class.php b/type/Default.class.php index 20b2745..c08745d 100644 --- a/type/Default.class.php +++ b/type/Default.class.php @@ -5,6 +5,7 @@ class Type_Default { var $datadir; var $rrdtool; + var $rrdtool_opts; var $cache; var $args; var $seconds; @@ -26,6 +27,7 @@ class Type_Default { function __construct($config) { $this->datadir = $config['datadir']; $this->rrdtool = $config['rrdtool']; + $this->rrdtool_opts = $config['rrdtool_opts']; $this->cache = $config['cache']; $this->parse_get(); $this->rrd_files(); @@ -156,6 +158,8 @@ class Type_Default { function rrd_options() { $rrdgraph[] = $this->rrdtool; $rrdgraph[] = 'graph - -a PNG'; + if ($this->rrdtool_opts != '') + $rrdgraph[] = $this->rrdtool_opts; $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); $rrdgraph[] = '-l 0'; -- cgit v1.1