aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/users.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/users.php')
-rw-r--r--plugin/users.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/plugin/users.php b/plugin/users.php
new file mode 100644
index 0000000..dfcaee3
--- /dev/null
+++ b/plugin/users.php
@@ -0,0 +1,37 @@
1<?php
2
3# Collectd Users plugin
4
5require_once $CONFIG['webdir'].'/conf/config.php';
6require_once $CONFIG['webdir'].'/type/Default.class.php';
7
8## LAYOUT
9# users/users.rrd
10
11$obj = new Type_Default;
12$obj->datadir = $CONFIG['datadir'];
13$obj->path_format = '{host}/{plugin}/{type}.rrd';
14$obj->args = array(
15 'host' => $host,
16 'plugin' => $plugin,
17 'pinstance' => $pinstance,
18 'type' => $type,
19 'tinstance' => $tinstance,
20);
21$obj->data_sources = array('users');
22$obj->ds_names = array(
23 'users' => 'Users',
24);
25$obj->colors = array(
26 'users' => '0000f0',
27);
28$obj->width = $width;
29$obj->heigth = $heigth;
30$obj->seconds = $seconds;
31$obj->rrd_title = "Users on $host";
32$obj->rrd_vertical = 'Users';
33$obj->rrd_format = '%.1lf';
34
35$obj->rrd_graph();
36
37?>