From e927c4687f311dbc0673c42522d48fc1677ef56a Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Wed, 15 Jun 2011 22:48:13 +0200 Subject: plugin/entropy: collectd 5 compatibility --- plugin/entropy.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/entropy.php b/plugin/entropy.php index 01bd183..bc7d308 100644 --- a/plugin/entropy.php +++ b/plugin/entropy.php @@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; # entropy/entropy.rrd $obj = new Type_Default($CONFIG); -$obj->data_sources = array('entropy'); +$obj->data_sources = array('value'); $obj->ds_names = array( 'entropy' => 'Entropy bits', ); @@ -23,5 +23,9 @@ $obj->rrd_title = 'Available entropy'; $obj->rrd_vertical = 'Bits'; $obj->rrd_format = '%4.0lf'; +# backwards compatibility +if ($CONFIG['version'] < 5) + $obj->data_sources = array('entropy'); + collectd_flush($obj->identifiers); $obj->rrd_graph(); -- cgit v1.1