default) counter values are stored as is, i.E<nbsp>e. as an increasing integer
number.
+=item B<SeparateInstances> B<false>|B<true>
+
+If set to B<true>, the plugin instance and type instance will be in their own
+path component, for example C<host.cpu.0.cpu.idle>. If set to B<false> (the
+default), the plugin and plugin instance (and likewise the type and type
+instance) are put into once component, for example C<host.cpu-0.cpu-idle>.
+
=item B<AlwaysAppendDS> B<false>|B<true>
If set the B<true>, append the name of the I<Data Source> (DS) to the "metric"
char escape_char;
_Bool store_rates;
+ _Bool separate_instances;
_Bool always_append_ds;
char send_buf[WG_SEND_BUF_SIZE];
sizeof (n_type_instance), cb->escape_char);
if (n_plugin_instance[0] != '\0')
- ssnprintf (tmp_plugin, sizeof (tmp_plugin), "%s-%s",
- n_plugin, n_plugin_instance);
+ ssnprintf (tmp_plugin, sizeof (tmp_plugin), "%s%c%s",
+ n_plugin,
+ cb->separate_instances ? '.' : '-',
+ n_plugin_instance);
else
sstrncpy (tmp_plugin, n_plugin, sizeof (tmp_plugin));
if (n_type_instance[0] != '\0')
- ssnprintf (tmp_type, sizeof (tmp_type), "%s-%s",
- n_type, n_type_instance);
+ ssnprintf (tmp_type, sizeof (tmp_type), "%s%c%s",
+ n_type,
+ cb->separate_instances ? '.' : '-',
+ n_type_instance);
else
sstrncpy (tmp_type, n_type, sizeof (tmp_type));
cf_util_get_string (child, &cb->postfix);
else if (strcasecmp ("StoreRates", child->key) == 0)
cf_util_get_boolean (child, &cb->store_rates);
+ else if (strcasecmp ("SeparateInstances", child->key) == 0)
+ cf_util_get_boolean (child, &cb->separate_instances);
else if (strcasecmp ("AlwaysAppendDS", child->key) == 0)
cf_util_get_boolean (child, &cb->always_append_ds);
else if (strcasecmp ("EscapeCharacter", child->key) == 0)