diff options
author | Pim van den Berg | 2012-09-07 15:19:50 +0200 |
---|---|---|
committer | Pim van den Berg | 2012-09-07 15:27:25 +0200 |
commit | 238e13fdaef8eb931e6665edcd24c4039f4dd1ff (patch) | |
tree | 5700efd337ddc7fb8f708259076ff1b6d7534bce /plugin/powerdns.php | |
parent | add support for varnish plugin categories (diff) | |
download | apt-panopticon_cgp-238e13fdaef8eb931e6665edcd24c4039f4dd1ff.zip apt-panopticon_cgp-238e13fdaef8eb931e6665edcd24c4039f4dd1ff.tar.gz apt-panopticon_cgp-238e13fdaef8eb931e6665edcd24c4039f4dd1ff.tar.bz2 apt-panopticon_cgp-238e13fdaef8eb931e6665edcd24c4039f4dd1ff.tar.xz |
plugin: add powerdns plugin
This is a very basic PowerDNS plugin.
Diffstat (limited to '')
-rw-r--r-- | plugin/powerdns.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugin/powerdns.php b/plugin/powerdns.php new file mode 100644 index 0000000..c8508cc --- /dev/null +++ b/plugin/powerdns.php | |||
@@ -0,0 +1,18 @@ | |||
1 | <?php | ||
2 | |||
3 | # Collectd PowerDNS 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 | $obj = new Type_Default($CONFIG); | ||
11 | $obj->width = $width; | ||
12 | $obj->heigth = $heigth; | ||
13 | |||
14 | $obj->rrd_title = sprintf('PowerDNS %s (%s)', $obj->args['type'], $obj->args['pinstance']); | ||
15 | $obj->rrd_format = '%5.1lf%s'; | ||
16 | |||
17 | collectd_flush($obj->identifiers); | ||
18 | $obj->rrd_graph(); | ||