aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/ntpd.php
diff options
context:
space:
mode:
authorPim van den Berg2012-12-16 13:17:36 +0100
committerPim van den Berg2012-12-16 13:17:36 +0100
commitc3c3ced3ffb239415107362ce2a99e9c1035f589 (patch)
tree59ec6801f2804a98a8597c98f5acd28fa18cb6b9 /plugin/ntpd.php
parentexplicitely defined undefined variables (diff)
downloadapt-panopticon_cgp-c3c3ced3ffb239415107362ce2a99e9c1035f589.zip
apt-panopticon_cgp-c3c3ced3ffb239415107362ce2a99e9c1035f589.tar.gz
apt-panopticon_cgp-c3c3ced3ffb239415107362ce2a99e9c1035f589.tar.bz2
apt-panopticon_cgp-c3c3ced3ffb239415107362ce2a99e9c1035f589.tar.xz
plugin/ntpd: collectd 5 compatibility
Diffstat (limited to 'plugin/ntpd.php')
-rw-r--r--plugin/ntpd.php12
1 files changed, 8 insertions, 4 deletions
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';
23 23
24switch($obj->args['type']) { 24switch($obj->args['type']) {
25 case 'delay': 25 case 'delay':
26 $obj->data_sources = array('seconds'); 26 if ($CONFIG['version'] < 5)
27 $obj->data_sources = array('seconds');
27 $obj->rrd_title = sprintf('Delay'); 28 $obj->rrd_title = sprintf('Delay');
28 $obj->rrd_vertical = 'Seconds'; 29 $obj->rrd_vertical = 'Seconds';
29 break; 30 break;
30 case 'frequency_offset': 31 case 'frequency_offset':
31 $obj->data_sources = array('ppm'); 32 if ($CONFIG['version'] < 5)
33 $obj->data_sources = array('ppm');
32 $obj->rrd_title = 'Frequency offset'; 34 $obj->rrd_title = 'Frequency offset';
33 $obj->rrd_vertical = 'ppm'; 35 $obj->rrd_vertical = 'ppm';
34 break; 36 break;
35 case 'time_dispersion': 37 case 'time_dispersion':
36 $obj->data_sources = array('seconds'); 38 if ($CONFIG['version'] < 5)
39 $obj->data_sources = array('seconds');
37 $obj->rrd_title = 'Time dispersion'; 40 $obj->rrd_title = 'Time dispersion';
38 $obj->rrd_vertical = 'Seconds'; 41 $obj->rrd_vertical = 'Seconds';
39 break; 42 break;
40 case 'time_offset': 43 case 'time_offset':
41 $obj->data_sources = array('seconds'); 44 if ($CONFIG['version'] < 5)
45 $obj->data_sources = array('seconds');
42 $obj->rrd_title = 'Time offset'; 46 $obj->rrd_title = 'Time offset';
43 $obj->rrd_vertical = 'Seconds'; 47 $obj->rrd_vertical = 'Seconds';
44 break; 48 break;