Example #1
0
File: df.php Project: Spechal/l5cgp
<?php

namespace Spechal\Lcgp;

$config = \Config::get('lcgp::collectd');
// host comes from the controller that load the plugin
$config['host'] = $host;
$config['plugin'] = 'df';
$obj = new CollectdGraphStacked($config);
$obj->setOrder(array('reserved', 'free', 'used'));
$obj->setDataSourceNames(array('reserved' => 'Reserved', 'free' => 'Free', 'used' => 'Used'));
$obj->setColors(array('reserved' => 'AAAAAA', 'free' => '00FF00', 'used' => 'FF0000'));
$obj->setTitle('Free space (' . $obj->getArg('plugin_instance') . ')');
$obj->setVertical('Bytes');
$obj->setFormat('%5.1lf%sB');
$graphs[$config['plugin']][] = $obj->rrd_graph();
Example #2
0
<?php

namespace Spechal\Lcgp;

$config = \Config::get('lcgp::collectd');
// host comes from the controller that load the plugin
$config['host'] = $host;
$config['plugin'] = 'tcpconns';
$obj = new CollectdGraphStacked($config);
$obj->setTitle('TCP Connections (' . $obj->getArg('plugin_instance') . ')');
$obj->setVertical('#');
$obj->setFormat('%5.1lf');
$graphs[$config['plugin']][] = $obj->rrd_graph();
Example #3
0
<?php

namespace Spechal\Lcgp;

$config = \Config::get('lcgp::collectd');
// host comes from the controller that load the plugin
$config['host'] = $host;
$config['plugin'] = 'cpu';
$obj = new CollectdGraphStacked($config);
$obj->setOrder(array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'));
$obj->setDataSourceNames(array('idle' => 'Idle', 'nice' => 'Nice', 'user' => 'User', 'wait' => 'I/O Wait', 'system' => 'System', 'softirq' => 'SoftIRQ', 'interrupt' => 'Interrupt', 'steal' => 'Steal'));
$obj->setColors(array('idle' => 'E8E8E8', 'nice' => '00E000', 'user' => '0000FF', 'wait' => 'FFB000', 'system' => 'FF0000', 'softirq' => 'FF00FF', 'interrupt' => 'A000A0', 'steal' => '000000'));
$obj->setTitle('CPU-' . $obj->getArg('plugin_instance') . ' Usage');
$obj->setVertical('Jiffies');
$obj->setFormat('%5.2lf');
$obj->addRRDOption('-u 100');
$obj->setScale(0);
$graphs[$config['plugin']][] = $obj->rrd_graph();