Specifies the location of the status file.
- =item B<Compression> B<true>|B<false>
+=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
collected. This information is only available in I<single> mode. Enabled by
if (fields_num < 4)
continue;
- if (new_naming_schema)
+ if (collect_user_count)
+ /* If so, sum all users, ignore the individuals*/
{
- iostats_submit (name, /* vpn instance */
- fields[0], /* "Common Name" */
- atoll (fields[2]), /* "Bytes Received" */
- atoll (fields[3])); /* "Bytes Sent" */
+ sum_users += 1;
}
- else
+ if (collect_individual_users)
{
- iostats_submit (fields[0], /* "Common Name" */
- NULL, /* unused when in multimode */
- atoll (fields[2]), /* "Bytes Received" */
- atoll (fields[3])); /* "Bytes Sent" */
+ 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" */
+ }
}
read = 1;