From 22bd20de2fd29c96668e7f3e904c824ea441f7c2 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 16 Jun 2013 16:20:26 +0200 Subject: plugin/nut: collectd 5 compatibility for frequency graph --- plugin/nut.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugin/nut.php') diff --git a/plugin/nut.php b/plugin/nut.php index 06314f5..7f0568d 100644 --- a/plugin/nut.php +++ b/plugin/nut.php @@ -17,7 +17,11 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_Default($CONFIG); switch($obj->args['type']) { case 'frequency': - $obj->data_sources = array('value'); + if ($CONFIG['version'] < 5) { + $obj->data_sources = array('frequency'); + } else { + $obj->data_sources = array('value'); + } $obj->ds_names = array('output' => 'Output'); $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); $obj->rrd_vertical = 'Hz'; -- cgit v1.1