Merge branch 'collectd-4.9'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Mon, 22 Mar 2010 18:27:33 +0000 (19:27 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Mon, 22 Mar 2010 18:27:33 +0000 (19:27 +0100)
src/collectd.conf.pod
src/netapp.c
src/openvpn.c

index 26cad5f..a12a48b 100644 (file)
@@ -2776,6 +2776,13 @@ Available options:
 
 Specifies the location of the status file.
 
+=item B<ImprovedNamingSchema> B<true>|B<false>
+
+When enabled, the filename of the status file will be used as plugin instance
+and the client's "common name" will be used as type instance. This is required
+when reading multiple status files. Enabling this option is recommended, but to
+maintain backwards compatibility this option is disabled by default.
+
 =item B<Compression> B<true>|B<false>
 
 Sets whether or not statistics about the compression used by OpenVPN should be
index abd5612..fc65358 100644 (file)
@@ -1490,7 +1490,7 @@ static void cna_handle_volume_snap_usage(const host_config_t *host, /* {{{ */
        {
                ERROR ("netapp plugin: cna_handle_volume_snap_usage: "
                                "na_elem_child (\"snapshots\") failed "
-                               "for host %s.", hostname);
+                               "for host %s.", host->name);
                na_elem_free(data);
                return;
        }
@@ -1525,7 +1525,7 @@ static int cna_handle_volume_usage_data (const host_config_t *host, /* {{{ */
        {
                ERROR ("netapp plugin: cna_handle_volume_usage_data: "
                                "na_elem_child (\"volumes\") failed "
-                               "for host %s.", hostname);
+                               "for host %s.", host->name);
                return (-1);
        }
 
index 1ac5083..9c717dd 100644 (file)
@@ -263,15 +263,15 @@ static int multi1_read (char *name, FILE *fh)
 
                if (new_naming_schema)
                {
-                       iostats_submit (fields[0],          /* "Common Name" */
-                                       NULL,               /* unused when in multimode */
+                       iostats_submit (name,               /* vpn instance */
+                                       fields[0],          /* "Common Name" */
                                        atoll (fields[2]),  /* "Bytes Received" */
                                        atoll (fields[3])); /* "Bytes Sent" */
                }
                else
                {
-                       iostats_submit (name,               /* vpn instance */
-                                       fields[0],          /* "Common Name" */
+                       iostats_submit (fields[0],          /* "Common Name" */
+                                       NULL,               /* unused when in multimode */
                                        atoll (fields[2]),  /* "Bytes Received" */
                                        atoll (fields[3])); /* "Bytes Sent" */
                }