diff options
author | Pim van den Berg | 2010-01-12 19:58:47 +0100 |
---|---|---|
committer | Pim van den Berg | 2010-01-12 20:19:47 +0100 |
commit | 924495bb2d732548083de9e54bf93eebe7f0d910 (patch) | |
tree | 1f9deb6f85c00cf568d6738752bb21a6a3658521 /type | |
parent | update changelog to v0.2 (diff) | |
download | apt-panopticon_cgp-924495bb2d732548083de9e54bf93eebe7f0d910.zip apt-panopticon_cgp-924495bb2d732548083de9e54bf93eebe7f0d910.tar.gz apt-panopticon_cgp-924495bb2d732548083de9e54bf93eebe7f0d910.tar.bz2 apt-panopticon_cgp-924495bb2d732548083de9e54bf93eebe7f0d910.tar.xz |
make rrdtool executable configurable
Diffstat (limited to 'type')
-rw-r--r-- | type/Default.class.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/type/Default.class.php b/type/Default.class.php index 0c992e2..ad880b3 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | class Type_Default { | 5 | class Type_Default { |
6 | var $datadir; | 6 | var $datadir; |
7 | var $rrdtool; | ||
7 | var $args; | 8 | var $args; |
8 | var $seconds; | 9 | var $seconds; |
9 | var $data_sources = array('value'); | 10 | var $data_sources = array('value'); |
@@ -21,8 +22,9 @@ class Type_Default { | |||
21 | var $tinstances; | 22 | var $tinstances; |
22 | var $identifiers; | 23 | var $identifiers; |
23 | 24 | ||
24 | function __construct($datadir) { | 25 | function __construct($config) { |
25 | $this->datadir = $datadir; | 26 | $this->datadir = $config['datadir']; |
27 | $this->rrdtool = $config['rrdtool']; | ||
26 | $this->parse_get(); | 28 | $this->parse_get(); |
27 | $this->rrd_files(); | 29 | $this->rrd_files(); |
28 | $this->identifiers = $this->file2identifier($this->files); | 30 | $this->identifiers = $this->file2identifier($this->files); |
@@ -124,7 +126,8 @@ class Type_Default { | |||
124 | } | 126 | } |
125 | 127 | ||
126 | function rrd_options() { | 128 | function rrd_options() { |
127 | $rrdgraph[] = '/usr/bin/rrdtool graph - -a PNG'; | 129 | $rrdgraph[] = $this->rrdtool; |
130 | $rrdgraph[] = 'graph - -a PNG'; | ||
128 | $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); | 131 | $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); |
129 | $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); | 132 | $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); |
130 | $rrdgraph[] = '-l 0'; | 133 | $rrdgraph[] = '-l 0'; |