Code

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

src/collectd.conf.pod
src/netapp.c
src/openvpn.c

index b1544e8d74850a972c7c9c13c772f6d97a7ad57b..facb058959e488018aab5c7ed8f5cb67d55f4eff 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<CollectCompression> B<true>|B<false>
 
 Sets whether or not statistics about the compression used by OpenVPN should be
index abd5612799a39d81aaa40a9bdb33fd4da9cd71d4..fc65358264f31856e7d14817be7d0c23ae8db529 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 8c0f82db12d30a2e84c43fcfc6217d774e3bb931..2aca4145cdae3d36c2e1ead682b9ab0343a418b6 100644 (file)
@@ -299,15 +299,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" */
                        }