From 3b24d6c7b3a20c69572baeb421c0f441c0f74791 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Wed, 15 Jun 2011 22:51:25 +0200 Subject: plugin/users: collectd 5 compatibility --- plugin/users.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugin') 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'; # users/users.rrd $obj = new Type_Default($CONFIG); -$obj->data_sources = array('users'); +$obj->data_sources = array('value'); $obj->ds_names = array( 'users' => 'Users', ); @@ -23,5 +23,9 @@ $obj->rrd_title = 'Users'; $obj->rrd_vertical = 'Users'; $obj->rrd_format = '%.1lf'; +# backwards compatibility +if ($CONFIG['version'] < 5) + $obj->data_sources = array('users'); + collectd_flush($obj->identifiers); $obj->rrd_graph(); -- cgit v1.1