From 0c50eff22b9e5af3894b8eec395cbdfe01ae0e8c Mon Sep 17 00:00:00 2001 From: Vincent Brillault Date: Mon, 16 Dec 2013 22:58:01 +0100 Subject: Plugin/df: Add support for inode graphs --- plugin/df.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'plugin') diff --git a/plugin/df.php b/plugin/df.php index 16f5749..b0e47ef 100644 --- a/plugin/df.php +++ b/plugin/df.php @@ -26,9 +26,18 @@ $obj->colors = array( 'used' => 'ff0000', ); -$obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']); -$obj->rrd_vertical = 'Bytes'; -$obj->rrd_format = '%5.1lf%sB'; +switch($obj->args['type']) { + case 'df_complex': + $obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']); + $obj->rrd_vertical = 'Bytes'; + $obj->rrd_format = '%5.1lf%sB'; + break; + case 'df_inodes': + $obj->rrd_title = sprintf('Free inodes (%s)', $obj->args['pinstance']); + $obj->rrd_vertical = 'Inodes'; + $obj->rrd_format = '%5.1lf%s'; + break; +} # backwards compatibility if ($CONFIG['version'] < 5) { -- cgit v1.1