Skip to content

Commit

Permalink
Plugin/df: Add support for inode graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Feandil authored and pommi committed Feb 10, 2014
1 parent 39ca2ff commit 0c50eff
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions plugin/df.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,18 @@
'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) {
Expand Down

1 comment on commit 0c50eff

@bogdanr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#64

Please sign in to comment.