From c3c3ced3ffb239415107362ce2a99e9c1035f589 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 16 Dec 2012 13:17:36 +0100 Subject: plugin/ntpd: collectd 5 compatibility --- plugin/ntpd.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'plugin/ntpd.php') diff --git a/plugin/ntpd.php b/plugin/ntpd.php index 18187a9..fc38c32 100644 --- a/plugin/ntpd.php +++ b/plugin/ntpd.php @@ -23,22 +23,26 @@ $obj->rrd_format = '%5.1lf%s'; switch($obj->args['type']) { case 'delay': - $obj->data_sources = array('seconds'); + if ($CONFIG['version'] < 5) + $obj->data_sources = array('seconds'); $obj->rrd_title = sprintf('Delay'); $obj->rrd_vertical = 'Seconds'; break; case 'frequency_offset': - $obj->data_sources = array('ppm'); + if ($CONFIG['version'] < 5) + $obj->data_sources = array('ppm'); $obj->rrd_title = 'Frequency offset'; $obj->rrd_vertical = 'ppm'; break; case 'time_dispersion': - $obj->data_sources = array('seconds'); + if ($CONFIG['version'] < 5) + $obj->data_sources = array('seconds'); $obj->rrd_title = 'Time dispersion'; $obj->rrd_vertical = 'Seconds'; break; case 'time_offset': - $obj->data_sources = array('seconds'); + if ($CONFIG['version'] < 5) + $obj->data_sources = array('seconds'); $obj->rrd_title = 'Time offset'; $obj->rrd_vertical = 'Seconds'; break; -- cgit v1.1