diff options
| author | Pim van den Berg | 2013-06-16 16:20:26 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2013-06-16 16:20:26 +0200 |
| commit | 22bd20de2fd29c96668e7f3e904c824ea441f7c2 (patch) | |
| tree | 0e0d4f7a145ac5c3fa8a411d36123d2b90733c3f /plugin/nut.php | |
| parent | plugin/openvpn: add datasize support (diff) | |
| download | apt-panopticon_cgp-22bd20de2fd29c96668e7f3e904c824ea441f7c2.zip apt-panopticon_cgp-22bd20de2fd29c96668e7f3e904c824ea441f7c2.tar.gz apt-panopticon_cgp-22bd20de2fd29c96668e7f3e904c824ea441f7c2.tar.bz2 apt-panopticon_cgp-22bd20de2fd29c96668e7f3e904c824ea441f7c2.tar.xz | |
plugin/nut: collectd 5 compatibility for frequency graph
Diffstat (limited to '')
| -rw-r--r-- | plugin/nut.php | 6 |
1 files changed, 5 insertions, 1 deletions
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'; | |||
| 17 | $obj = new Type_Default($CONFIG); | 17 | $obj = new Type_Default($CONFIG); |
| 18 | switch($obj->args['type']) { | 18 | switch($obj->args['type']) { |
| 19 | case 'frequency': | 19 | case 'frequency': |
| 20 | $obj->data_sources = array('value'); | 20 | if ($CONFIG['version'] < 5) { |
| 21 | $obj->data_sources = array('frequency'); | ||
| 22 | } else { | ||
| 23 | $obj->data_sources = array('value'); | ||
| 24 | } | ||
| 21 | $obj->ds_names = array('output' => 'Output'); | 25 | $obj->ds_names = array('output' => 'Output'); |
| 22 | $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); | 26 | $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); |
| 23 | $obj->rrd_vertical = 'Hz'; | 27 | $obj->rrd_vertical = 'Hz'; |
