aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/load.php
blob: 17002ea722b917f9f58ca45ed6c1bbe4c2e2f53a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

# Collectd Load plugin

require_once 'conf/common.inc.php';
require_once 'type/Default.class.php';

## LAYOUT
# load/load.rrd

$obj = new Type_Default;
$obj->datadir = $CONFIG['datadir'];
$obj->path_format = '{host}/{plugin}/{type}.rrd';
$obj->args = array(
	'host' => $host,
	'plugin' => $plugin,
	'pinstance' => $pinstance,
	'type' => $type,
	'tinstance' => $tinstance,
);
$obj->data_sources = array('shortterm', 'midterm', 'longterm');
$obj->ds_names = array(
	'shortterm' => ' 1 min',
	'midterm' => ' 5 min',
	'longterm' => '15 min',
);
$obj->colors = array(
	'shortterm' => '00ff00',
	'midterm' => '0000ff',
	'longterm' => 'ff0000',
);
$obj->width = $width;
$obj->heigth = $heigth;
$obj->seconds = $seconds;
$obj->rrd_title = "System load on $host";
$obj->rrd_vertical = 'System load';
$obj->rrd_format = '%.2lf';

$obj->rrd_graph();

?>