diff options
author | Pim van den Berg | 2014-03-22 16:54:24 +0100 |
---|---|---|
committer | Pim van den Berg | 2014-03-22 16:54:24 +0100 |
commit | fecc70eceb3208e77b02b7ef17bef2c2b467a293 (patch) | |
tree | 85cc963870d1a60f907711b36eb29de9cfde9fcd /plugin/dbi.php | |
parent | type/Default: merge file2identifier function into rrd_files (diff) | |
parent | Create dbi.php (diff) | |
download | apt-panopticon_cgp-fecc70eceb3208e77b02b7ef17bef2c2b467a293.zip apt-panopticon_cgp-fecc70eceb3208e77b02b7ef17bef2c2b467a293.tar.gz apt-panopticon_cgp-fecc70eceb3208e77b02b7ef17bef2c2b467a293.tar.bz2 apt-panopticon_cgp-fecc70eceb3208e77b02b7ef17bef2c2b467a293.tar.xz |
Merge pull request #51 from bobonlog/master
dbi.php
Diffstat (limited to 'plugin/dbi.php')
-rw-r--r-- | plugin/dbi.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugin/dbi.php b/plugin/dbi.php new file mode 100644 index 0000000..cd650f2 --- /dev/null +++ b/plugin/dbi.php | |||
@@ -0,0 +1,18 @@ | |||
1 | <?php | ||
2 | |||
3 | # Collectd dbi plugin | ||
4 | |||
5 | require_once 'conf/common.inc.php'; | ||
6 | require_once 'type/Default.class.php'; | ||
7 | require_once 'inc/collectd.inc.php'; | ||
8 | |||
9 | |||
10 | |||
11 | $obj = new Type_Default($CONFIG); | ||
12 | |||
13 | |||
14 | $obj->rrd_title = sprintf('%s', $obj->args['pinstance'], $obj->args['type']); | ||
15 | $obj->rrd_format = '%5.1lf%s'; | ||
16 | |||
17 | collectd_flush($obj->identifiers); | ||
18 | $obj->rrd_graph(); | ||