ReleaseNotes: Added 0.4.0 release.
Switched all sysdb.io links to https://
sysdb(7): Documented basic concepts in more detail.
Added more in-depth documentation and examples for hosts/services, how
hostname canonicalization works, and how to use metrics and time-series.
Added more in-depth documentation and examples for hosts/services, how
hostname canonicalization works, and how to use metrics and time-series.
configure: Make plugin related options more consistent.
That is, use the full plugin names (except "backend" prefixes) for the
--enable-* options.
That is, use the full plugin names (except "backend" prefixes) for the
--enable-* options.
collectd::unixsock: Support 'rrdcached' metrics as well.
It's the same as 'rrdtool' :-)
It's the same as 'rrdtool' :-)
timeseries::rrdtool: Added support for RRDCacheD.
After enabling RRDCacheD support, the plugin supports an additional
time-series fetcher callback which may be used to flush outstanding updates to
an RRD file before fetching data from it.
After enabling RRDCacheD support, the plugin supports an additional
time-series fetcher callback which may be used to flush outstanding updates to
an RRD file before fetching data from it.
doc/: Improved documentation around the rrdtool time-series fetcher.
sysdbql(7): Documented supported data types.
frontend: Added support for single quotes in string constants.
Just like in SQL, single quotes may be included in a string by specifying two
adjacent single quotes.
Just like in SQL, single quotes may be included in a string by specifying two
adjacent single quotes.
Added __attribute__((format(printf, ...))) where appropriate.
Also, fixed various (mostly minor) issues identified this way.
Also, fixed various (mostly minor) issues identified this way.
plugin: Added missing argument to sdb_log() call.
sysdbql(7): Documented the ‘TIMESERIES’ command.
sysdbd-collectd-unixsock(5): Documented the new 'Timeseries' options.
Added documentation for the new timeseries::rrdtool plugin.
README: Mention the support for metrics and time-series.
sysdb-description.txt: Mention the support for metrics and time-series.
timeseries: Free the actual time-series object itself as well.
collectd::unixsock: Report an error if TimeseriesBackend != rrdtool.
No other backends are supported yet by the plugin. Support for other types
will require different metric store ID generation.
No other backends are supported yet by the plugin. Support for other types
will require different metric store ID generation.
collectd::unixsock: Record the, configurable, time-series store.
The new config options 'TimeseriesBackend' and 'TimeseriesBaseURL' may be used
to configure the backend store to be used for fetching time-series data for
collectd metrics.
The new config options 'TimeseriesBackend' and 'TimeseriesBaseURL' may be used
to configure the backend store to be used for fetching time-series data for
collectd metrics.
timeseries::rrdtool: Added a plugin to fetch time-series from RRD files.
Obviously, the plugin requires librrd. The configure script checks for librrd
using pkg-config.
Obviously, the plugin requires librrd. The configure script checks for librrd
using pkg-config.
timeseries: Added sdb_timeseries_create().
This function allocates a time-series object and pre-allocates the data array
based on size information passed to the function. All memory is initialized to
zero (except for the length information) such that the object contains valid
(but mostly useless) information.
This function allocates a time-series object and pre-allocates the data array
based on size information passed to the function. All memory is initialized to
zero (except for the length information) such that the object contains valid
(but mostly useless) information.
timeseries: Fixed timeseries_destroy().
Correctly access all information indexed by data_names_len and make sure not
to access array members if the array is NULL.
Correctly access all information indexed by data_names_len and make sure not
to access array members if the array is NULL.
store: Fixed JSON-serialization of time-series data.
Typos caused the end-time and all values to be treated incorrectly.
Typos caused the end-time and all values to be treated incorrectly.
Moved backends from src/backend/ to src/plugins/backend/.
collectd::unixsock: Store metrics instead of services.
integration/simple_query.sh: Test another failure mode.
frontend: Let CONNECTION_QUERY support 'TIMESERIES' queries.
frontend/parser: Added support for the 'TIMESERIES' command.
Syntax is: TIMESERIES <host>.<metric> [START <datetime>] [END <datetime>]
Syntax is: TIMESERIES <host>.<metric> [START <datetime>] [END <datetime>]
store: Added sdb_store_fetch_timeseries().
The function fetches a time-series for a specified host's metric and
serializes it into a JSON buffer.
The function fetches a time-series for a specified host's metric and
serializes it into a JSON buffer.
timeseries: Added 'data_names_len' field.
Else, a user cannot tell how many different sequences are stored in a
data-series.
Else, a user cannot tell how many different sequences are stored in a
data-series.
timeseries: Added sdb_timeseries_destroy().
plugin: Added sdb_plugin_fetch_timeseries().
This function fetches a time-series from a named backend data-store using a
previously registered "time-series fetcher" callback.
This function fetches a time-series from a named backend data-store using a
previously registered "time-series fetcher" callback.
core: Introduced the concept of time-series.
A timeseries describes one or multiple sequences of data-points where each
data-point is a timestamp and a value.
A new type of plugin, "time-series fetchers", has been introduced to access
time-series information from arbitrary data-stores.
A timeseries describes one or multiple sequences of data-points where each
data-point is a timestamp and a value.
A new type of plugin, "time-series fetchers", has been introduced to access
time-series information from arbitrary data-stores.
store: Store "data-store" information alongside metrics.
A metric data-store describes how to access data (e.g. time-series) of a
metric.
A metric data-store describes how to access data (e.g. time-series) of a
metric.
store.h: Removed very outdated comments in the documentation.
README: Updated Travis-CI and coveralls links.
The main repo has been moved from tokkee/sysdb to sysdb/sysdb.
The main repo has been moved from tokkee/sysdb to sysdb/sysdb.
integration tests: Added simple tests for service and metric queries.
To make that work, let the mock_plugin store some metrics as well.
To make that work, let the mock_plugin store some metrics as well.
store_lookup_test: Added various tests for metrics.
store: Added support for storing metric objects.
store: Added core support for “metrics” objects.
This is going to be used to store information about available metrics (in the
broadest sense). A metric is any kind of queryable value like performance
data.
This is going to be used to store information about available metrics (in the
broadest sense). A metric is any kind of queryable value like performance
data.
sysdbql(7): Updated documentation to keep up with the latest changes.
frontend/grammar: Changes ‘FETCH 'name'’ to ‘FETCH host 'name'’.
This also seems more consistent.
This also seems more consistent.
frontend/grammar: Changed ‘LIST …’ to ‘LIST hosts …’.
This seems more consistent.
This seems more consistent.
frontend/parser: Let ‘LIST’ and ‘FETCH’ accept optional filters as well.
This allows for more consistent results across different types of queries.
This allows for more consistent results across different types of queries.
frontend/parser: Simplified handling of MATCHING and FILTER clauses.
Make LOOKUP MATCHING clauses optional.
Make LOOKUP MATCHING clauses optional.
frontend/proto.h: Documented the current frontend protocol.
frontend: Let sdb_fe_<cmd> check the current command.
Now that the code is no longer internal-only, we'll have to be a bit careful
about what the users passes in.
Now that the code is no longer internal-only, we'll have to be a bit careful
about what the users passes in.
frontend: Split up command_handle() into several sdb_fe_<cmd> functions.
One big function is not very nice to handle.
One big function is not very nice to handle.
frontend: Renamed sdb_fe_<cmd> functions to sdb_fe_exec_<cmd>.
That name better describes what the function is doing.
That name better describes what the function is doing.
data: Simplified the implementation of expr_eval().
frontend: Make sure to not read to much from a connection buffer.
The current command, as stored in the connection buffer, is not necessarily
nil-terminated. That's only the case if there's no further data in the buffer
(which will *often* be the case in the current implementation when using
'sysdb' as the client) but the code should never rely on that.
In cases where the function operating on the data does not support specifying
the length of the string to work on, copy the data to a temporary buffer
first.
The current command, as stored in the connection buffer, is not necessarily
nil-terminated. That's only the case if there's no further data in the buffer
(which will *often* be the case in the current implementation when using
'sysdb' as the client) but the code should never rely on that.
In cases where the function operating on the data does not support specifying
the length of the string to work on, copy the data to a temporary buffer
first.
store_expr: Fixed a memory leak in an error condition.
store_expr: Evaluate constant expressions early.
That is, when creating a new expression objects, evaluate it right away if its
left and right operands are constant values.
That is, when creating a new expression objects, evaluate it right away if its
left and right operands are constant values.
data: Document the use of dynamically allocated data in expr_eval().
data: Let sdb_data_expr_eval() check it's arguments.
version-gen.sh: Added .git suffix to default version again.
Release SysDB 0.3.0.
unit tests: Fixed some -Werror=unused-result compiler errors.
ReleaseNotes: Added 0.3.0 release.
data: Support some arithmetic expressions on mismatching types.
The following cases are now supported:
- <integer> or <decimal> <mul> <datetime>
- <datetime> <mul> or <div> or <mod> <integer> or <decimal>
Think of <datetime> having a time unit like seconds. It's perfectly fine to
multiply with or divide seconds by a number. However, since we don't have any
type having the unit Hertz, we cannot support numbers divided by <datetime>.
The following cases are now supported:
- <integer> or <decimal> <mul> <datetime>
- <datetime> <mul> or <div> or <mod> <integer> or <decimal>
Think of <datetime> having a time unit like seconds. It's perfectly fine to
multiply with or divide seconds by a number. However, since we don't have any
type having the unit Hertz, we cannot support numbers divided by <datetime>.
frontend/grammar: Added support for field names in expressions.
store_expr: Added support to include field values in an expression.
Added sdb_store_expr_fieldvalue() to create such an expression object and pass
a stored object to sdb_store_expr_eval() to be able to extract the field value
when evaluation the expression.
Added sdb_store_expr_fieldvalue() to create such an expression object and pass
a stored object to sdb_store_expr_eval() to be able to extract the field value
when evaluation the expression.
store: Added sdb_store_get_field().
This function may be used to retrieve the value of queryable fields of objects
in the store.
For now, all fields except the backend(s) are supported.
This function may be used to retrieve the value of queryable fields of objects
in the store.
For now, all fields except the backend(s) are supported.
sysdbql(7): Document FILTER clauses.
frontend: Added 'FILTER' support to the 'LOOKUP' command.
The new syntax is 'LOOKUP <obj> MATCHING <cond> [FILTER <cond>]'.
The new syntax is 'LOOKUP <obj> MATCHING <cond> [FILTER <cond>]'.
t/integration: Execute test scripts using 'set -x'.
A lot of tests fail rather silently. This helps identify the failing test.
A lot of tests fail rather silently. This helps identify the failing test.
frontend/scanner: Simplified handling of reserved words.
store, frontend: Parse object field matchers.
Field names are identified as ":<field-name>" and all conditional operators
are supported to compare them against an expression.
Field names are identified as ":<field-name>" and all conditional operators
are supported to compare them against an expression.
frontend/parser: Added support for time interval values.
time: Added sdb_strpunit() to parse a time unit.
time: Renamed PRIscTIME to PRIsdbTIME.
Another remnant of the “syscollector” days ;-)
Another remnant of the “syscollector” days ;-)
frontend: Let FETCH/LIST/LOOKUP implementations accept filters.
This is in preparation for letting the parser support filters. It's not
actually used yet.
This is in preparation for letting the parser support filters. It's not
actually used yet.
store: Fixed JSON serialization when skipping hosts due to filters.
Previously, it might have happened that a comma was appended to a list of
hosts even though all subsequent hosts were filtered out. This created invalid
JSON. Now, don't let sdb_store_host_tojson ignore hosts entirely. Instead,
always let it serialize the host passed to the function and only pass on the
filter to child objects. The caller is now responsible for calling the filter
and, at the same time, the caller is able to correctly handle skipped hosts.
Fixed the unit-test which should have caught this.
Previously, it might have happened that a comma was appended to a list of
hosts even though all subsequent hosts were filtered out. This created invalid
JSON. Now, don't let sdb_store_host_tojson ignore hosts entirely. Instead,
always let it serialize the host passed to the function and only pass on the
filter to child objects. The caller is now responsible for calling the filter
and, at the same time, the caller is able to correctly handle skipped hosts.
Fixed the unit-test which should have caught this.
store: Let JSON serializers support (object) filters.
Only objects covered by the specified filter will be included in the JSON
output.
Only objects covered by the specified filter will be included in the JSON
output.
liboconfig: Relicensed to MIT license.
Florian Forster relicensed the code in collectd's Git commit
633c3966f770e4d46651a2fe219a18d8a9907a9f.
<https://github.com/collectd/collectd/commit/633c3966f770e4d46651a2fe219a18d8a9907a9f>
Florian Forster relicensed the code in collectd's Git commit
633c3966f770e4d46651a2fe219a18d8a9907a9f.
<https://github.com/collectd/collectd/commit/633c3966f770e4d46651a2fe219a18d8a9907a9f>
store_lookup: Added conditional for accessing store-object fields.
Fields are "last-update", "age", "interval", and "backend".
"backend" only supports the lookup of objects provided by a named backend but
no conditional checks.
Fields are "last-update", "age", "interval", and "backend".
"backend" only supports the lookup of objects provided by a named backend but
no conditional checks.
store_lookup: Make sure to always initialize the buffer in tostring().
store: Make matchers more generic and applicable to non-hosts as well.
Most of the matchers are actually not specific to hosts and may be re-used for
different purposes (e.g. filters). Make them applicable to arbitrary object
types (again) and only check for the right object type when actually needed.
Added simple unit-tests covering filters applied to all types of objects.
Most of the matchers are actually not specific to hosts and may be re-used for
different purposes (e.g. filters). Make them applicable to arbitrary object
types (again) and only check for the right object type when actually needed.
Added simple unit-tests covering filters applied to all types of objects.
store: Introduced the concept of query filters.
A filter may be used to preselect objects when evaluating a query. Any object
that's used during the evaluation of a matcher will be compared against the
filter. Only matching objects will be considered further.
A filter may be used to preselect objects when evaluating a query. Any object
that's used during the evaluation of a matcher will be compared against the
filter. Only matching objects will be considered further.
store, frontend: Let lookups support arbitrary expressions for comparison.
… rather than simple values.
When comparing object names, the expression has to evaluate to a (constant)
string but conditional attribute comparison supports arbitrary expressions.
Expressions are only evaluated when using them during a comparison even though
we only support constant expressions so far. This will be optimized in the
future.
… rather than simple values.
When comparing object names, the expression has to evaluate to a (constant)
string but conditional attribute comparison supports arbitrary expressions.
Expressions are only evaluated when using them during a comparison even though
we only support constant expressions so far. This will be optimized in the
future.
store_lookup: Catch invalid values when parsing a matcher.
Added a unit-test exposing the segfault we would have seen previously.
Added a unit-test exposing the segfault we would have seen previously.
frontend: Added a parser for arithmetic expressions.
For now, the expressions are used in place of a datum but the parser will
actually evaluate the expression before passing it on to the store during
lookup. Since expressions currently cover constant results only, this is not a
limitation for now.
For now, the expressions are used in place of a datum but the parser will
actually evaluate the expression before passing it on to the store during
lookup. Since expressions currently cover constant results only, this is not a
limitation for now.
store_expr: Added framework for arithmetic expressions.
A store expression describes the parse tree of an arithmetic expression and
provides means to execute it (based on sdb_data_expr_eval()).
A store expression describes the parse tree of an arithmetic expression and
provides means to execute it (based on sdb_data_expr_eval()).
data: Added sdb_data_expr_eval().
This function may be used to evaluate simple operation expressions on data
values. Supported operators are +, -, *, /, %, and (for string and binary
values) concatenation.
This function may be used to evaluate simple operation expressions on data
values. Supported operators are +, -, *, /, %, and (for string and binary
values) concatenation.
Merged branch 'master' of git://git.tokkee.org/sysdb.
Conflicts:
src/frontend/grammar.y
Conflicts:
src/frontend/grammar.y
Query language: Changed 'LOOKUP .. WHERE' to 'LOOKUP .. MATCHING'.
'WHERE' was too SQL-like while it has somewhat different semantics. Using a
different keyword will hopefully avoid any confusion.
'WHERE' was too SQL-like while it has somewhat different semantics. Using a
different keyword will hopefully avoid any confusion.
Merged branch 'master' of git://git.tokkee.org/sysdb.
store, frontend: Renamed sdb_store_lookup() to sdb_store_scan().
It does a full scan of the entire store, so lookup sounds a bit euphemistic.
It does a full scan of the entire store, so lookup sounds a bit euphemistic.
Added the SysDB homepage to all manpages.
README: Added links to documentation and "getting help".
Cleaned up nomenclature in the parser.
Replace the generic "expression" with "condition".
Replace the generic "expression" with "condition".
Added upstream homepages to backend manpages.
sysdbql(7): Updated based on latest changes to the query language.
store, frontend: Switch from <obj>.name to <obj>.
This feels a bit more natural and no longer shadows attributes called "name".
This feels a bit more natural and no longer shadows attributes called "name".
store_lookup: Don't allow 'IS <non-NULL>'.
This would have been silently treated as 'IS NULL'.
This would have been silently treated as 'IS NULL'.
sysdb: Fixed a memory leak in an error condition.
Thanks to clang-analyze for identifying this!
Thanks to clang-analyze for identifying this!
valgrind.suppress: Added a leak inside libnss as seen on Travis CI.
test_lib.sh: Let integration tests use valgrind.suppress as well.
store_lookup_test: Added some tests for attribute.FOO IS NULL.
store, frontend: Added support for matching NULL attributes.
This matches any hosts which are missing the specified attribute.
This matches any hosts which are missing the specified attribute.