aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/df.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/df.php')
-rw-r--r--plugin/df.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/plugin/df.php b/plugin/df.php
deleted file mode 100644
index 2c0dfd8..0000000
--- a/plugin/df.php
+++ /dev/null
@@ -1,48 +0,0 @@
1<?php
2
3# Collectd Df plugin
4
5require_once 'conf/common.inc.php';
6require_once 'type/GenericStacked.class.php';
7
8# LAYOUT
9#
10# df-X/df_complex-free.rrd
11# df-X/df_complex-reserved.rrd
12# df-X/df_complex-used.rrd
13
14$obj = new Type_GenericStacked($CONFIG, $_GET);
15$obj->data_sources = array('value');
16$obj->order = array('reserved', 'free', 'used');
17$obj->legend = array(
18 'reserved' => 'Reserved',
19 'free' => 'Free',
20 'used' => 'Used',
21);
22$obj->colors = array(
23 'reserved' => 'aaaaaa',
24 'free' => '00ff00',
25 'used' => 'ff0000',
26);
27
28switch($obj->args['type']) {
29 case 'df_complex':
30 default:
31 $obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']);
32 $obj->rrd_vertical = 'Bytes';
33 $obj->rrd_format = '%5.1lf%sB';
34 break;
35 case 'df_inodes':
36 $obj->rrd_title = sprintf('Free inodes (%s)', $obj->args['pinstance']);
37 $obj->rrd_vertical = 'Inodes';
38 $obj->rrd_format = '%5.1lf%s';
39 break;
40}
41
42# backwards compatibility
43if ($CONFIG['version'] < 5) {
44 $obj->data_sources = array('free', 'used');
45 $obj->rrd_title = sprintf('Free space (%s)', $obj->args['tinstance']);
46}
47
48$obj->rrd_graph();