diff options
Diffstat (limited to 'plugin/tail.php')
-rw-r--r-- | plugin/tail.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugin/tail.php b/plugin/tail.php index 0d3ca46..3afcc2e 100644 --- a/plugin/tail.php +++ b/plugin/tail.php | |||
@@ -12,5 +12,20 @@ $obj = new Type_Default($CONFIG); | |||
12 | $obj->rrd_title = sprintf('tail: %s (%s)', $obj->args['pinstance'], $obj->args['type']); | 12 | $obj->rrd_title = sprintf('tail: %s (%s)', $obj->args['pinstance'], $obj->args['type']); |
13 | $obj->rrd_format = '%5.1lf%s'; | 13 | $obj->rrd_format = '%5.1lf%s'; |
14 | 14 | ||
15 | # backwards compatibility | ||
16 | if ($CONFIG['version'] < 5) { | ||
17 | if (strcmp($obj->args['type'], 'gauge') != 0) { | ||
18 | $obj->data_sources = array('count'); | ||
19 | if (count($obj->ds_names) == 1) { | ||
20 | $obj->ds_names['count'] = $obj->ds_names['value']; | ||
21 | unset($obj->ds_names['value']); | ||
22 | } | ||
23 | if (count($obj->colors) == 1) { | ||
24 | $obj->colors['count'] = $obj->colors['value']; | ||
25 | unset($obj->colors['value']); | ||
26 | } | ||
27 | } | ||
28 | } | ||
29 | |||
15 | collectd_flush($obj->identifiers); | 30 | collectd_flush($obj->identifiers); |
16 | $obj->rrd_graph(); | 31 | $obj->rrd_graph(); |