diff options
author | Pim van den Berg | 2011-06-15 22:51:25 +0200 |
---|---|---|
committer | Pim van den Berg | 2011-06-15 23:05:39 +0200 |
commit | 3b24d6c7b3a20c69572baeb421c0f441c0f74791 (patch) | |
tree | b3c0b1ff57b6c55e24323e229b9ff7c549839d59 | |
parent | plugin/ping: collectd 5 compatibility (diff) | |
download | apt-panopticon_cgp-3b24d6c7b3a20c69572baeb421c0f441c0f74791.zip apt-panopticon_cgp-3b24d6c7b3a20c69572baeb421c0f441c0f74791.tar.gz apt-panopticon_cgp-3b24d6c7b3a20c69572baeb421c0f441c0f74791.tar.bz2 apt-panopticon_cgp-3b24d6c7b3a20c69572baeb421c0f441c0f74791.tar.xz |
plugin/users: collectd 5 compatibility
Diffstat (limited to '')
-rw-r--r-- | plugin/users.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/users.php b/plugin/users.php index 2b5397e..a4558b5 100644 --- a/plugin/users.php +++ b/plugin/users.php | |||
@@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; | |||
10 | # users/users.rrd | 10 | # users/users.rrd |
11 | 11 | ||
12 | $obj = new Type_Default($CONFIG); | 12 | $obj = new Type_Default($CONFIG); |
13 | $obj->data_sources = array('users'); | 13 | $obj->data_sources = array('value'); |
14 | $obj->ds_names = array( | 14 | $obj->ds_names = array( |
15 | 'users' => 'Users', | 15 | 'users' => 'Users', |
16 | ); | 16 | ); |
@@ -23,5 +23,9 @@ $obj->rrd_title = 'Users'; | |||
23 | $obj->rrd_vertical = 'Users'; | 23 | $obj->rrd_vertical = 'Users'; |
24 | $obj->rrd_format = '%.1lf'; | 24 | $obj->rrd_format = '%.1lf'; |
25 | 25 | ||
26 | # backwards compatibility | ||
27 | if ($CONFIG['version'] < 5) | ||
28 | $obj->data_sources = array('users'); | ||
29 | |||
26 | collectd_flush($obj->identifiers); | 30 | collectd_flush($obj->identifiers); |
27 | $obj->rrd_graph(); | 31 | $obj->rrd_graph(); |