format_json, format_kairosdb: Don't enable beatification of JSON.
The code depends on the last character in the buffer being ']'. If
"beautification" is enabled, it will add a newline at the end, which
breaks the "append" mechanic.
format_json: Add support for appending metric_family_t's to the buffer.
With this change, multiple metric_family_t's can be added to a buffer
sequentially. The implementation that did not use libyajl has been
removed because it was unused (it only implemented marshalling of
value_list_t).
format_stackdriver: Check for counter reset in format_time_series().
Previously, this check was done in format_typed_value() when the time
series data was already partially written to the buffer. Doing the check
there would result in invalid JSON output.
Additionally, the comparison was the wrong way around, causing the
assertion to fail for all counter metrics.
common: Create the metric_family_t and metric_t types.
A "metric family" is a set of metrics, all with the same name (but
different labels and/or label values). The identity is split between the
two types: the "metric family" holds the "name" while the "metric" holds
the labels. Likewise, the "metric family" holds the metric type, the
"metric" holds the metric value.
This commit contains all required changes to compile the daemon, but
pretty much everything else still fails to build. The tests have not yet
updated either.
The "cpu plugin" has been updated as a proof-of-concept implementation.
* Struct "metric_t": unnecessary fields "type", "plugin", "ds" have
been removed. The field "value_ds_type" has been renamed to
"value_type".
* The reference counted, multiple instance "meta_data_list_head_t" type
has been removed. Manually doing the reference counting all over the
place is error prone and it seems like premature optimization.
* The "<type>_destroy" functions must handle NULL gracefully. Removed
NULL-checks around their invocation to improve readability.
* Struct "metric_t": unnecessary fields "type", "plugin", "ds" have
been removed. The field "value_ds_type" has been renamed to
"value_type".
* The reference counted, multiple instance "meta_data_list_head_t" type
has been removed. Manually doing the reference counting all over the
place is error prone and it seems like premature optimization.
* The "<type>_destroy" functions must handle NULL gracefully. Removed
NULL-checks around their invocation to improve readability.
* Struct "metric_t": unnecessary fields "type", "plugin", "ds" have
been removed. The field "value_ds_type" has been renamed to
"value_type".
* The reference counted, multiple instance "meta_data_list_head_t" type
has been removed. Manually doing the reference counting all over the
place is error prone and it seems like premature optimization.
* The "<type>_destroy" functions must handle NULL gracefully. Removed
NULL-checks around their invocation to improve readability.
* Struct "metric_t": unnecessary fields "type", "plugin", "ds" have
been removed. The field "value_ds_type" has been renamed to
"value_type".
* The reference counted, multiple instance "meta_data_list_head_t" type
has been removed. Manually doing the reference counting all over the
place is error prone and it seems like premature optimization.
* The "<type>_destroy" functions must handle NULL gracefully. Removed
NULL-checks around their invocation to improve readability.
* Struct "metric_t": unnecessary fields "type", "plugin", "ds" have
been removed. The field "value_ds_type" has been renamed to
"value_type".
* The reference counted, multiple instance "meta_data_list_head_t" type
has been removed. Manually doing the reference counting all over the
place is error prone and it seems like premature optimization.
* The "<type>_destroy" functions must handle NULL gracefully. Removed
NULL-checks around their invocation to improve readability.
barometer, python plugins: Reworked some code in src/daemon/plugin.[ch].
Unfortunately it's all a bit messy and entangled. Since this is such
an early WIP, I didn't spend the (substantial) time needed to pick this
into separate changes. The changes in this commit are:
* Create a consistent naming schema for the identity functions:
* Rename "create_identity" to "identity_create_legacy".
* Rename "clone_identity" to "identity_clone".
* Rename "destroy_identity" to "identity_destroy".
* Add "identity_create" to allocate a new identity_t.
* Copy key and value strings within "identity_add_label".
* Make use of "identity_create" and "identity_add_label" in
"identity_clone", "identity_create_legacy" and others that used
to fiddle with the AVL tree directly.
* Remove the "_p" suffix used for pointers. This is quite unusual for
the collectd codebase.
cmds: Reworked some code in src/daemon/plugin.[ch].
Unfortunately it's all a bit messy and entangled. Since this is such
an early WIP, I didn't spend the (substantial) time needed to pick this
into separate changes. The changes in this commit are:
* Create a consistent naming schema for the identity functions:
* Rename "create_identity" to "identity_create_legacy".
* Rename "clone_identity" to "identity_clone".
* Rename "destroy_identity" to "identity_destroy".
* Add "identity_create" to allocate a new identity_t.
* Copy key and value strings within "identity_add_label".
* Make use of "identity_create" and "identity_add_label" in
"identity_clone", "identity_create_legacy" and others that used
to fiddle with the AVL tree directly.
* Remove the "_p" suffix used for pointers. This is quite unusual for
the collectd codebase.
This commit is where the major transform takes palce; the internal
representation is changed, and the read plugins use that indirectly
when they submit a value list transparently.
The baromerter read plugin has been converted to using metric_t
representation natively.
The write plugins have to be adapted to use these new single data
source metrics.
This commit is where the major transform takes palce; the internal
representation is changed, and the read plugins use that indirectly
when they submit a value list transparently.
The baromerter read plugin has been converted to using metric_t
representation natively.
The write plugins have to be adapted to use these new single data
source metrics.
This commit is where the major transform takes palce; the internal
representation is changed, and the read plugins use that indirectly
when they submit a value list transparently.
The baromerter read plugin has been converted to using metric_t
representation natively.
The write plugins have to be adapted to use these new single data
source metrics.
This commit is where the major transform takes palce; the internal
representation is changed, and the read plugins use that indirectly
when they submit a value list transparently.
The baromerter read plugin has been converted to using metric_t
representation natively.
The write plugins have to be adapted to use these new single data
source metrics.
This commit is where the major transform takes palce; the internal
representation is changed, and the read plugins use that indirectly
when they submit a value list transparently.
The baromerter read plugin has been converted to using metric_t
representation natively.
The write plugins have to be adapted to use these new single data
source metrics.
This commit is where the major transform takes palce; the internal
representation is changed, and the read plugins use that indirectly
when they submit a value list transparently.
The baromerter read plugin has been converted to using metric_t
representation natively.
The write plugins have to be adapted to use these new single data
source metrics.