projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b22ffd9
)
aggregation plugin: Improve two error messages.
author
Florian Forster
<octo@collectd.org>
Sun, 11 Nov 2012 08:20:58 +0000
(09:20 +0100)
committer
Florian Forster
<octo@collectd.org>
Sun, 11 Nov 2012 08:20:58 +0000
(09:20 +0100)
src/aggregation.c
patch
|
blob
|
history
diff --git
a/src/aggregation.c
b/src/aggregation.c
index
e50557d
..
db33c17
100644
(file)
--- a/
src/aggregation.c
+++ b/
src/aggregation.c
@@
-192,13
+192,21
@@
static int agg_instance_update (agg_instance_t *inst, /* {{{ */
gauge_t *rate;
if (ds->ds_num != 1)
gauge_t *rate;
if (ds->ds_num != 1)
- return (-1);
+ {
+ ERROR ("aggregation plugin: The \"%s\" type (data set) has more than one "
+ "data source. This is currently not supported by this plugin. "
+ "Sorry.", ds->type);
+ return (EINVAL);
+ }
rate = uc_get_rate (ds, vl);
if (rate == NULL)
{
rate = uc_get_rate (ds, vl);
if (rate == NULL)
{
- ERROR ("aggregation plugin: uc_get_rate() failed.");
- return (-1);
+ char ident[6 * DATA_MAX_NAME_LEN];
+ FORMAT_VL (ident, sizeof (ident), vl);
+ ERROR ("aggregation plugin: Unable to read the current rate of \"%s\".",
+ ident);
+ return (ENOENT);
}
if (isnan (rate[0]))
}
if (isnan (rate[0]))