aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
authorPim van den Berg2013-05-29 13:20:24 -0700
committerPim van den Berg2013-05-29 13:20:24 -0700
commit3efedca3ff5f9b990f11523fd91856b0f29234c1 (patch)
tree58937b9f5704b63e6d38ca7b29130941dc401bf5 /plugin
parentupdate changelog to v0.4.1 (diff)
parentplugin/nut: collectd 5 compatibility for timeleft graph (diff)
downloadapt-panopticon_cgp-3efedca3ff5f9b990f11523fd91856b0f29234c1.zip
apt-panopticon_cgp-3efedca3ff5f9b990f11523fd91856b0f29234c1.tar.gz
apt-panopticon_cgp-3efedca3ff5f9b990f11523fd91856b0f29234c1.tar.bz2
apt-panopticon_cgp-3efedca3ff5f9b990f11523fd91856b0f29234c1.tar.xz
Merge pull request #8 from mce35/nut
plugin/nut: collectd 5 compatibility for timeleft graph
Diffstat (limited to 'plugin')
-rw-r--r--plugin/nut.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/nut.php b/plugin/nut.php
index a1ade0e..06314f5 100644
--- a/plugin/nut.php
+++ b/plugin/nut.php
@@ -43,7 +43,11 @@ switch($obj->args['type']) {
43 $obj->rrd_format = '%5.1lf%s'; 43 $obj->rrd_format = '%5.1lf%s';
44 break; 44 break;
45 case 'timeleft': 45 case 'timeleft':
46 $obj->data_sources = array('timeleft'); 46 if ($CONFIG['version'] < 5) {
47 $obj->data_sources = array('timeleft');
48 } else {
49 $obj->data_sources = array('value');
50 }
47 $obj->ds_names = array('timeleft' => 'Timeleft'); 51 $obj->ds_names = array('timeleft' => 'Timeleft');
48 $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']); 52 $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']);
49 $obj->rrd_vertical = 'Seconds'; 53 $obj->rrd_vertical = 'Seconds';