=item B<TypeInstance> I<String>
-=item B<MetaDataSet> I<String> I<String>
+=item B<MetaData> I<String> I<String>
Set the appropriate field to the given string. The strings for plugin instance
and type instance may be empty, the strings for host and plugin may not be
case DS_TYPE_GAUGE:
vl->values[0].gauge = va_arg (ap, gauge_t);
if (store_percentage)
- vl->values[0].gauge *= sum ? (100.0 / sum) : 0;
+ vl->values[0].gauge *= sum ? (100.0 / sum) : NAN;
break;
case DS_TYPE_ABSOLUTE:
vl->values[0].absolute = va_arg (ap, absolute_t);
else if (strcasecmp ("TypeInstance", child->key) == 0)
status = ts_config_add_string (&data->type_instance, child,
/* may be empty = */ 1);
- else if (strcasecmp ("MetaDataSet", child->key) == 0)
+ else if (strcasecmp ("MetaData", child->key) == 0)
status = ts_config_add_meta (&data->meta, child,
/* may be empty = */ 1);
else
&& (data->meta == NULL))
{
ERROR ("Target `set': You need to set at least one of `Host', "
- "`Plugin', `PluginInstance', `TypeInstance', "
- "`MetaDataSet' or `MetaDataEval'.");
+ "`Plugin', `PluginInstance', `TypeInstance', `MetaData'.");
status = -1;
}
# include "config.h"
#endif
+#define _GNU_SOURCE
+
+#include "collectd.h"
+
+#include "utils_mount.h"
+
#if HAVE_XFS_XQM_H
-# define _GNU_SOURCE
# include <xfs/xqm.h>
#define XFS_SUPER_MAGIC_STR "XFSB"
#define XFS_SUPER_MAGIC2_STR "BSFX"
#endif
-#include "collectd.h"
-
-#include "utils_mount.h"
-
#include "common.h" /* sstrncpy() et alii */
#include "plugin.h" /* ERROR() macro */