diff options
| author | Manuel CISSÉ | 2010-02-23 11:10:57 +0100 |
|---|---|---|
| committer | Pim van den Berg | 2010-03-01 20:33:09 +0100 |
| commit | 8555394637c2040b89435b526f38ddfa6741dbf4 (patch) | |
| tree | 5dd43e1cc3523e0ad63f3fd69361138a7ad10702 /plugin | |
| parent | add fork rate graph to processes plugin (diff) | |
| download | apt-panopticon_cgp-8555394637c2040b89435b526f38ddfa6741dbf4.zip apt-panopticon_cgp-8555394637c2040b89435b526f38ddfa6741dbf4.tar.gz apt-panopticon_cgp-8555394637c2040b89435b526f38ddfa6741dbf4.tar.bz2 apt-panopticon_cgp-8555394637c2040b89435b526f38ddfa6741dbf4.tar.xz | |
add uptime plugin
Diffstat (limited to '')
| -rw-r--r-- | plugin/uptime.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/plugin/uptime.php b/plugin/uptime.php new file mode 100644 index 0000000..4c7db39 --- /dev/null +++ b/plugin/uptime.php | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd Uptime plugin | ||
| 4 | |||
| 5 | require_once 'conf/common.inc.php'; | ||
| 6 | require_once 'type/GenericStacked.class.php'; | ||
| 7 | require_once 'inc/collectd.inc.php'; | ||
| 8 | |||
| 9 | ## LAYOUT | ||
| 10 | # uptime/uptime.rrd | ||
| 11 | |||
| 12 | $obj = new Type_GenericStacked($CONFIG); | ||
| 13 | $obj->data_sources = array('value'); | ||
| 14 | $obj->ds_names = array( | ||
| 15 | 'value' => 'seconds', | ||
| 16 | ); | ||
| 17 | $obj->colors = array( | ||
| 18 | 'value' => '0000f0', | ||
| 19 | ); | ||
| 20 | $obj->width = $width; | ||
| 21 | $obj->heigth = $heigth; | ||
| 22 | $obj->rrd_title = 'Uptime'; | ||
| 23 | $obj->rrd_vertical = 'Seconds'; | ||
| 24 | $obj->rrd_format = '%.1lf'; | ||
| 25 | |||
| 26 | collectd_flush($obj->identifiers); | ||
| 27 | $obj->rrd_graph(); | ||
| 28 | |||
| 29 | ?> | ||
