Merge branch 'collectd-5.6'
authorFlorian Forster <octo@collectd.org>
Tue, 6 Sep 2016 06:42:41 +0000 (08:42 +0200)
committerFlorian Forster <octo@collectd.org>
Tue, 6 Sep 2016 06:42:41 +0000 (08:42 +0200)
src/collectd.conf.pod
src/daemon/plugin.c
src/target_set.c
src/utils_mount.c

index d5045c1..2919099 100644 (file)
@@ -9410,7 +9410,7 @@ Available options:
 
 =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
index 1bee8cd..c6efc3f 100644 (file)
@@ -2401,7 +2401,7 @@ int plugin_dispatch_multivalue (value_list_t const *template, /* {{{ */
                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);
index fee5ffd..4f00cbb 100644 (file)
@@ -181,7 +181,7 @@ static int ts_create (const oconfig_item_t *ci, void **user_data) /* {{{ */
     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
@@ -206,8 +206,7 @@ static int ts_create (const oconfig_item_t *ci, void **user_data) /* {{{ */
         && (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;
     }
 
index b8dabb1..e527c25 100644 (file)
 # 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 */