diff options
| author | Pim van den Berg | 2011-04-10 19:49:27 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2011-04-10 19:49:27 +0200 |
| commit | d86d1743d7fa3aabed3ed241e899b22db9430f15 (patch) | |
| tree | ca881963741d76e3f2f2500bad2c096357cc9e91 | |
| parent | use tinstance for legend label when data_sources is not set by plugin (diff) | |
| download | apt-panopticon_cgp-d86d1743d7fa3aabed3ed241e899b22db9430f15.zip apt-panopticon_cgp-d86d1743d7fa3aabed3ed241e899b22db9430f15.tar.gz apt-panopticon_cgp-d86d1743d7fa3aabed3ed241e899b22db9430f15.tar.bz2 apt-panopticon_cgp-d86d1743d7fa3aabed3ed241e899b22db9430f15.tar.xz | |
plugin: add tail plugin
Diffstat (limited to '')
| -rw-r--r-- | plugin/tail.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugin/tail.php b/plugin/tail.php new file mode 100644 index 0000000..addad67 --- /dev/null +++ b/plugin/tail.php | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | # Collectd tail 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 | |||
| 10 | $obj = new Type_GenericStacked($CONFIG); | ||
| 11 | $obj->width = $width; | ||
| 12 | $obj->heigth = $heigth; | ||
| 13 | |||
| 14 | $obj->rrd_title = sprintf('tail: %s (%s)', $obj->args['pinstance'], $obj->args['type']); | ||
| 15 | $obj->rrd_format = '%5.1lf%s'; | ||
| 16 | |||
| 17 | collectd_flush($obj->identifiers); | ||
| 18 | $obj->rrd_graph(); | ||
