projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
network plugin: Cast data sources to their respective types.
[collectd.git]
/
src
/
utils_rrdcreate.c
diff --git
a/src/utils_rrdcreate.c
b/src/utils_rrdcreate.c
index
c4e9d8b
..
4ecec59
100644
(file)
--- a/
src/utils_rrdcreate.c
+++ b/
src/utils_rrdcreate.c
@@
-213,6
+213,10
@@
static int ds_get (char ***ret, /* {{{ */
type = "COUNTER";
else if (d->type == DS_TYPE_GAUGE)
type = "GAUGE";
type = "COUNTER";
else if (d->type == DS_TYPE_GAUGE)
type = "GAUGE";
+ else if (d->type == DS_TYPE_DERIVE)
+ type = "DERIVE";
+ else if (d->type == DS_TYPE_ABSOLUTE)
+ type = "ABSOLUTE";
else
{
ERROR ("rrdtool plugin: Unknown DS type: %i",
else
{
ERROR ("rrdtool plugin: Unknown DS type: %i",
@@
-225,14
+229,14
@@
static int ds_get (char ***ret, /* {{{ */
sstrncpy (min, "U", sizeof (min));
}
else
sstrncpy (min, "U", sizeof (min));
}
else
- ssnprintf (min, sizeof (min), "%
l
f", d->min);
+ ssnprintf (min, sizeof (min), "%f", d->min);
if (isnan (d->max))
{
sstrncpy (max, "U", sizeof (max));
}
else
if (isnan (d->max))
{
sstrncpy (max, "U", sizeof (max));
}
else
- ssnprintf (max, sizeof (max), "%
l
f", d->max);
+ ssnprintf (max, sizeof (max), "%f", d->max);
status = ssnprintf (buffer, sizeof (buffer),
"DS:%s:%s:%i:%s:%s",
status = ssnprintf (buffer, sizeof (buffer),
"DS:%s:%s:%i:%s:%s",