From cd94ef34134d8f06af83ec97119018b4e80346a0 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 20 Sep 2009 13:36:25 +0200 Subject: initial import of cgp Collectd Graph Panel is a frontend for Collectd written in PHP. The goal of CGP is to provide an easy-to-use frontend for Collectd, starting with page that shows an overview of all the hosts you are managing with Collectd. In this initial import there is support for the plugins that are default enabled in Collectd. The supported plugins are located in the plugin directory. --- plugin/swap.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 plugin/swap.php (limited to 'plugin/swap.php') diff --git a/plugin/swap.php b/plugin/swap.php new file mode 100644 index 0000000..dfd9ba1 --- /dev/null +++ b/plugin/swap.php @@ -0,0 +1,50 @@ +datadir = $CONFIG['datadir']; +$obj->path_format = '{host}/{plugin}/{type}-{tinstance}.rrd'; +$obj->args = array( + 'host' => $host, + 'plugin' => $plugin, + 'pinstance' => $pinstance, + 'type' => $type, + 'tinstance' => $tinstance, +); +$obj->data_sources = array('value'); +$obj->order = array('free', 'cached', 'used'); +$obj->ds_names = array( + 'free' => 'Free ', + 'cached' => 'Cached ', + 'used' => 'Used ', +); +$obj->colors = array( + 'free' => '00e000', + 'cached' => '0000ff', + 'used' => 'ff0000', +); +$obj->width = $width; +$obj->heigth = $heigth; +$obj->seconds = $seconds; + +$obj->rrd_title = "Swap utilization on $host"; +$obj->rrd_vertical = 'Bytes'; +$obj->rrd_format = '%5.1lf%s'; + +$obj->rrd_graph(); + +?> -- cgit v1.1