From a5242158176268e733d1f481602aa5ec298dada7 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 26 Jun 2011 21:14:51 +0200 Subject: type/Default: dont use t as ti when no ti is set Use 'value' instead. --- plugin/entropy.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'plugin/entropy.php') diff --git a/plugin/entropy.php b/plugin/entropy.php index bc7d308..bc1c95f 100644 --- a/plugin/entropy.php +++ b/plugin/entropy.php @@ -12,10 +12,10 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_Default($CONFIG); $obj->data_sources = array('value'); $obj->ds_names = array( - 'entropy' => 'Entropy bits', + 'value' => 'Entropy bits', ); $obj->colors = array( - 'entropy' => '0000f0', + 'value' => '0000f0', ); $obj->width = $width; $obj->heigth = $heigth; @@ -24,8 +24,15 @@ $obj->rrd_vertical = 'Bits'; $obj->rrd_format = '%4.0lf'; # backwards compatibility -if ($CONFIG['version'] < 5) +if ($CONFIG['version'] < 5) { $obj->data_sources = array('entropy'); + $obj->ds_names['entropy'] = $obj->ds_names['value']; + unset($obj->ds_names['value']); + + $obj->colors['entropy'] = $obj->colors['value']; + unset($obj->colors['value']); +} + collectd_flush($obj->identifiers); $obj->rrd_graph(); -- cgit v1.1