diff options
author | Pim van den Berg | 2012-12-16 13:17:36 +0100 |
---|---|---|
committer | Pim van den Berg | 2012-12-16 13:17:36 +0100 |
commit | c3c3ced3ffb239415107362ce2a99e9c1035f589 (patch) | |
tree | 59ec6801f2804a98a8597c98f5acd28fa18cb6b9 /plugin/ntpd.php | |
parent | explicitely defined undefined variables (diff) | |
download | apt-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.php | 12 |
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 | ||
24 | switch($obj->args['type']) { | 24 | switch($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; |