diff options
| author | Pim van den Berg | 2011-06-15 22:48:13 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2011-06-15 23:05:08 +0200 |
| commit | e927c4687f311dbc0673c42522d48fc1677ef56a (patch) | |
| tree | 6f13dffb35d05afade16c83c1d97dc7fe14720fb | |
| parent | plugin/contextswitch: collectd 5 compatibility (diff) | |
| download | apt-panopticon_cgp-e927c4687f311dbc0673c42522d48fc1677ef56a.zip apt-panopticon_cgp-e927c4687f311dbc0673c42522d48fc1677ef56a.tar.gz apt-panopticon_cgp-e927c4687f311dbc0673c42522d48fc1677ef56a.tar.bz2 apt-panopticon_cgp-e927c4687f311dbc0673c42522d48fc1677ef56a.tar.xz | |
plugin/entropy: collectd 5 compatibility
| -rw-r--r-- | plugin/entropy.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/entropy.php b/plugin/entropy.php index 01bd183..bc7d308 100644 --- a/plugin/entropy.php +++ b/plugin/entropy.php | |||
| @@ -10,7 +10,7 @@ require_once 'inc/collectd.inc.php'; | |||
| 10 | # entropy/entropy.rrd | 10 | # entropy/entropy.rrd |
| 11 | 11 | ||
| 12 | $obj = new Type_Default($CONFIG); | 12 | $obj = new Type_Default($CONFIG); |
| 13 | $obj->data_sources = array('entropy'); | 13 | $obj->data_sources = array('value'); |
| 14 | $obj->ds_names = array( | 14 | $obj->ds_names = array( |
| 15 | 'entropy' => 'Entropy bits', | 15 | 'entropy' => 'Entropy bits', |
| 16 | ); | 16 | ); |
| @@ -23,5 +23,9 @@ $obj->rrd_title = 'Available entropy'; | |||
| 23 | $obj->rrd_vertical = 'Bits'; | 23 | $obj->rrd_vertical = 'Bits'; |
| 24 | $obj->rrd_format = '%4.0lf'; | 24 | $obj->rrd_format = '%4.0lf'; |
| 25 | 25 | ||
| 26 | # backwards compatibility | ||
| 27 | if ($CONFIG['version'] < 5) | ||
| 28 | $obj->data_sources = array('entropy'); | ||
| 29 | |||
| 26 | collectd_flush($obj->identifiers); | 30 | collectd_flush($obj->identifiers); |
| 27 | $obj->rrd_graph(); | 31 | $obj->rrd_graph(); |
