aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc
diff options
context:
space:
mode:
authorPim van den Berg2009-12-31 11:42:56 +0100
committerPim van den Berg2009-12-31 13:07:13 +0100
commit95c70c919837f588389f525fe2cf4aba479e9f91 (patch)
treeef242a0273458ffcadf8357fd8dd4d64b2fb7105 /inc
parentalways show 'on $host' in the rrd title (diff)
downloadapt-panopticon_cgp-95c70c919837f588389f525fe2cf4aba479e9f91.zip
apt-panopticon_cgp-95c70c919837f588389f525fe2cf4aba479e9f91.tar.gz
apt-panopticon_cgp-95c70c919837f588389f525fe2cf4aba479e9f91.tar.bz2
apt-panopticon_cgp-95c70c919837f588389f525fe2cf4aba479e9f91.tar.xz
rewrite of type classes
A constructor is added to the Type_Default class. The constructor will parse GET values (such as host, plugin, pinstance, type, tinstance, seconds), create an array of all needed rrd files to generate a graph and substract identifiers from these rrd files. Because of the constructor (and related functions) it is not needed to define an array of tinstances to be grouped and shown in one graph. Also $obj->args don't have to be defined per plugin. This will result in smaller plugin files. The type classes are based on the fact that a plugin has multiple type instances OR multiple rrd data sources. This is called the source and is retrieved by rrd_get_sources in each rrd_gen_graph function. Also variables in function rrd_gen_graph have been renamed to better ones.
Diffstat (limited to 'inc')
-rw-r--r--inc/collectd.inc.php17
1 files changed, 0 insertions, 17 deletions
diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php
index 3ef9102..2a44fba 100644
--- a/inc/collectd.inc.php
+++ b/inc/collectd.inc.php
@@ -221,21 +221,4 @@ function collectd_flush($identifier) {
221 } 221 }
222} 222}
223 223
224# generate identifiers from args
225function ident_from_args($args) {
226 if (is_array($args['tinstance'])) {
227 foreach($args['tinstance'] as $ti) {
228 $instances[] = collectd_identifier($args['host'],
229 $args['plugin'], $args['pinstance'],
230 $args['type'], $ti);
231 }
232 } else {
233 $instances[] = collectd_identifier($args['host'],
234 $args['plugin'], $args['pinstance'],
235 $args['type'], $args['tinstance']);
236 }
237
238 return $instances;
239}
240
241?> 224?>