sysdbd: Set a default interval of 60 seconds.
Use sdb_error_chomp() to remove newlines from multi-part messages.
The actual logging callback should take care of handling that appropriately in
these cases as well.
The actual logging callback should take care of handling that appropriately in
these cases as well.
utils error, strbuf: Added sdb_error_chomp(), sdb_strbuf_chomp().
These functions may be used to remove all consecutive newline characters from
the end of the respective strings.
These functions may be used to remove all consecutive newline characters from
the end of the respective strings.
Removed newline at the end of sdb_log()'ed strings.
The actual logging callback should take care of handling that appropriately.
The actual logging callback should take care of handling that appropriately.
utils strbuf: Copy va_lists rather than using them twice.
After a va_list has been passed to a function that uses va_arg(), the value of
the va_list is undefined. Thus, rather copy the list before using it for the
first time to make sure we've got a valid va_list object on the second usage.
After a va_list has been passed to a function that uses va_arg(), the value of
the va_list is undefined. Thus, rather copy the list before using it for the
first time to make sure we've got a valid va_list object on the second usage.
utils error: Use string buffers rather than static strings.
utils strbuf: Added an automatically growing string implementation.
Whenever writing to the buffer, it will ensure that enough space is allocated
to store all of the string.
Whenever writing to the buffer, it will ensure that enough space is allocated
to store all of the string.
mk-livestatus backend: Use '::' to separate instance in callback names.
This is just to be consistent with the other plugins.
This is just to be consistent with the other plugins.
Renamed puppet-storeconfigs backend to puppet::store-configs.
Renamed collectd backend to collectd::unixsock.
plugin, daemon: Use '::' in plugin names to indicate subdirectories.
That is, behave similar to Perl when encountering a '::' in a plugin's name and
translate that to a slash. "foo::bar" will thus become PKGLIBDIR/foo/bar.so.
This will be used to name plugins accessing the same backend using different
methods and to have an, imho, nicer name for those.
The daemon will now use that to prepend "backend::" to the name of backends.
This is no different to the behavior before but only uses different names that
will be displayed in log messages.
That is, behave similar to Perl when encountering a '::' in a plugin's name and
translate that to a slash. "foo::bar" will thus become PKGLIBDIR/foo/bar.so.
This will be used to name plugins accessing the same backend using different
methods and to have an, imho, nicer name for those.
The daemon will now use that to prepend "backend::" to the name of backends.
This is no different to the behavior before but only uses different names that
will be displayed in log messages.
configure.ac: Renamed package tarname to all lowercase 'sysdb'.
This name is used throughout the project, e.g., as file or directory names.
This name is used throughout the project, e.g., as file or directory names.
Moved sdb_strerror() from utils/string.h to utils/error.h.
Renamed error recording / logging functions.
sdb_error_set() now is sdb_log(); the sdb_error_start(), _append(), _finish()
triple is now called sdb_error_set(), _append(), _log(). These names better
describe what's actually going on.
sdb_error_set() now is sdb_log(); the sdb_error_start(), _append(), _finish()
triple is now called sdb_error_set(), _append(), _log(). These names better
describe what's actually going on.
Use the sdb_error* function throughout the project.
utils error: Make sure to destroy memory allocated for error information.
utils error: Added module for error reporting.
This module will transparently store error information for each thread (similar
to errno). Support functions to store and retrieve error messages are available
on top of that. Once the error message has been passed to SysDB, it will log
the entire message. Currently, only printing to the standard error channel are
available.
This module will transparently store error information for each thread (similar
to errno). Support functions to store and retrieve error messages are available
on top of that. Once the error message has been passed to SysDB, it will log
the entire message. Currently, only printing to the standard error channel are
available.
Renamed sysdbd.conf to sysdbd.conf.sample.
Also, unconditionally install that file; the user is expected to not change the
.sample file but rather use her own custom sysdbd.conf (there is no generic
config file anyway that could be shipped and enabled by default).
Also, unconditionally install that file; the user is expected to not change the
.sample file but rather use her own custom sysdbd.conf (there is no generic
config file anyway that could be shipped and enabled by default).
sysdbd.conf: Added sample configuration for each plugin.
Merged branch 'master' of git://git.tokkee.org/sysdb.git.
README: Added a note about flex/bison.
configure: Also check for xmlto (in addition to xsltproc).
This is also needed by the asciidoc tool-chain (in our situation?).
This is also needed by the asciidoc tool-chain (in our situation?).
configure: Don't use -Wunreachable-code.
This seems to cause errors with some versions of GCC when using assertions
that (after optimization, inlining, and code-analysis) will never be true.
This seems to cause errors with some versions of GCC when using assertions
that (after optimization, inlining, and code-analysis) will never be true.
backends, daemon: Don't shadow global 'socket' and 'daemon' symbols.
store, llist: Don't shadow the global symbol 'clone'.
configure: Improved the check for disabled puppet-storeconfigs.
sdb_plugin.m4: Provide more details if a plugin is disabled by default.
The default value passed to AC_SDB_PLUGIN might contain additional information
about why the plugin has been disabled by default. This information should be
forwarded to the user.
The default value passed to AC_SDB_PLUGIN might contain additional information
about why the plugin has been disabled by default. This information should be
forwarded to the user.
configure: Don't pre-set enable_<plugin> variables.
This would cause AC_SDB_PLUGIN to assume that the respective --enable-<plugin>
option was given on the command-line and, thus, behave unexpected when this is
not the case.
This would cause AC_SDB_PLUGIN to assume that the respective --enable-<plugin>
option was given on the command-line and, thus, behave unexpected when this is
not the case.
puppet-storeconfigs backend: Check database connection in collect callback.
utils dbi: Added sdb_dbi_client_check_conn().
This functions checks the database connection and tries to reconnect if there
was a problem. The return code determines if the connection was usable
afterwards.
This functions checks the database connection and tries to reconnect if there
was a problem. The return code determines if the connection was usable
afterwards.
utils dbi: Avoid segfault when executing queries when not connected.
Apparently, the libdbi functions don't check for that condition.
Apparently, the libdbi functions don't check for that condition.
Renamed the project to SysDB (System DataBase).
This name more closely resembles the actual intent / goal of the project.
The prefix for defines / function / etc. has been changed to sdb_.
This name more closely resembles the actual intent / goal of the project.
The prefix for defines / function / etc. has been changed to sdb_.
Added missing daemon/config.h.
store: Fixed host lock handling.
Release the lock before returning in error conditions.
Release the lock before returning in error conditions.
Puppet storeconfigs backend: Query facts and store them as host attributes.
store: Added support for host attributes.
Attributes are a list of key / value pairs assigned to a host object. They may
be used to store arbitrary properties, settings, or other characteristics of a
host.
Later on, this information will also be used to filter, group, or
hierarchically order hosts.
Attributes are a list of key / value pairs assigned to a host object. They may
be used to store arbitrary properties, settings, or other characteristics of a
host.
Later on, this information will also be used to filter, group, or
hierarchically order hosts.
store: Print the right update timestamp when dumping services.
MK Livestatus backend: Added support for querying services.
This is done using the livestatus 'GET services' command.
This is done using the livestatus 'GET services' command.
MK Livestatus backend: Converted to use sc_unixsock_client_process_lines().
This removes the need to do the parsing of returned lines in the backend code.
This removes the need to do the parsing of returned lines in the backend code.
collectd backend: Converted to use sc_unixsock_client_process_lines().
This removes the need to do the parsing of returned lines in the backend code.
This removes the need to do the parsing of returned lines in the backend code.
object.h: Added SC_OBJECT_WRAPPER_STATIC().
This may be used to initialize static sc_object_wrapper_t objects.
This may be used to initialize static sc_object_wrapper_t objects.
store: Changed various parameters to 'const char *'.
None of these parameters will be modified, so all to pass in constant strings.
None of these parameters will be modified, so all to pass in constant strings.
utils dbi + unixsock: Pass user-data object to data processing callbacks.
This may be used to access, for example, state information throughout each
call.
This may be used to access, for example, state information throughout each
call.
utils unixsock: Added sc_unixsock_client_process_lines().
This function may be used to process data returned from the socket line by
line. The function will split each line into columns. The data-types of each
column may be specified by the caller.
This is similar to the DBI query abstraction function (sc_dbi_exec_query()) in
that in takes care of all the annoying data parsing and conversion stuff.
This function may be used to process data returned from the socket line by
line. The function will split each line into columns. The data-types of each
column may be specified by the caller.
This is similar to the DBI query abstraction function (sc_dbi_exec_query()) in
that in takes care of all the annoying data parsing and conversion stuff.
utils data: Added module providing a data-type to store arbitrary backend data
This has been ripped out of the DBI module to make the functionality available
to other modules as well through a uniform interface.
This has been ripped out of the DBI module to make the functionality available
to other modules as well through a uniform interface.
syscollectord: Include extra version information in startup/shutdown messages.
Added initial version of the MK Livestatus backend.
This backend uses the MK Livestatus interface available for Nagios, Icinga,
Shinken and possibly other software, to retrieve host information from those
monitoring systems.
This backend uses the MK Livestatus interface available for Nagios, Icinga,
Shinken and possibly other software, to retrieve host information from those
monitoring systems.
utils unixsock: Added wrappers for clearerr(), feof(), and ferror().
utils unixsock: Added sc_unixsock_client_shutdown().
This function is a wrapper around shutdown(3). After shutting down send /
receive operations, the client will automatically re-connect on the next
send() / recv() call.
This function is a wrapper around shutdown(3). After shutting down send /
receive operations, the client will automatically re-connect on the next
send() / recv() call.
store: Return a positive value when to-be-stored host/service is too old.
This allows to let the caller decide what to do in that case.
This allows to let the caller decide what to do in that case.
store: Don't return an error if an updated host is too old.
This may happen, if multiple backends report the same host (which is perfectly
fine and the desired behavior in fact).
This may happen, if multiple backends report the same host (which is perfectly
fine and the desired behavior in fact).
utils unixsock: Fixed EOF handling in recv().
Added initial version of the puppet-storeconfigs backend.
This backend currently retrieves host information from Puppet by querying its
Store-Configs database using DBI.
This backend currently retrieves host information from Puppet by querying its
Store-Configs database using DBI.
sc_plugin.m4: Added support for dashes in plugin names to AC_SC_PLUGIN().
utils dbi: Added initial version.
This module provides helper functions for using libdbi. Currently, data types
and functions for managing connection options, a database connection as well
as a generic query helper are available.
The query helper (sc_dbi_exec_query()) uses a specified callback function to
handle each row as returned from the SQL query. A custom data-type (based on
the libdbi data-types) is used to pass the query results to the handler
callback.
This module provides helper functions for using libdbi. Currently, data types
and functions for managing connection options, a database connection as well
as a generic query helper are available.
The query helper (sc_dbi_exec_query()) uses a specified callback function to
handle each row as returned from the SQL query. A custom data-type (based on
the libdbi data-types) is used to pass the query results to the handler
callback.
Initial commit.
This is the initial version of 'syscollector', a system management / inventory
collection service. The current version provides a configurable plugin
infrastructure to query host / service objects.
The system is made up of the following components:
- libsyscollector: the library providing the core functionality to manage
plugins and the data store
* core/object: base "class" for objects being stored in any part of the
library; an object contains information about a reference count and the
actual data being stored (in derived "classes"); it may be used to ease
memory management when using instances in different parts of the
software
* core/plugin: infrastructure for registering and calling plugin
callbacks; each registered plugin has its own context which stores
information that should be available to different parts of the software
without having the plugin to care much about it; for now, configuration,
init, shutdown and collector (backend) callbacks are supported
* core/store: implementation of the system object store; currently, host
and service entries are supported; each host includes a list of services
assigned to it; the store objects are derived from the core object
implementation
* utils/llist: a linked list implementation, currently supporting sorted
insertions, searching and shifting objects and iterators; the list
stores core object instances
* utils/string: collection of string utilities; currently a wrapper around
strerror_r() is available only
* utils/time: implementation of a custom time type which is a single
integer value storing the time since the epoch in nanoseconds
resolution; this is provided for simplified time calculations and
comparisons
* utils/unixsock: helper functions to connect to and communicate with a
UNIX domain socket
- backends: plugins implementing collector callbacks
* collectd: this backend retrieves host and service information from
collectd, the system statistics collection daemon, through its unixsock
interface
- daemon: 'syscollectord' is a daemon based on libsyscollector which
periodically queries all backends
- liboconfig: the configuration parsing library used by collectd; this is
used by 'syscollectord' for parsing its configuration and it's used by
libsyscollector to pass on configuration to the plugins
This is the initial version of 'syscollector', a system management / inventory
collection service. The current version provides a configurable plugin
infrastructure to query host / service objects.
The system is made up of the following components:
- libsyscollector: the library providing the core functionality to manage
plugins and the data store
* core/object: base "class" for objects being stored in any part of the
library; an object contains information about a reference count and the
actual data being stored (in derived "classes"); it may be used to ease
memory management when using instances in different parts of the
software
* core/plugin: infrastructure for registering and calling plugin
callbacks; each registered plugin has its own context which stores
information that should be available to different parts of the software
without having the plugin to care much about it; for now, configuration,
init, shutdown and collector (backend) callbacks are supported
* core/store: implementation of the system object store; currently, host
and service entries are supported; each host includes a list of services
assigned to it; the store objects are derived from the core object
implementation
* utils/llist: a linked list implementation, currently supporting sorted
insertions, searching and shifting objects and iterators; the list
stores core object instances
* utils/string: collection of string utilities; currently a wrapper around
strerror_r() is available only
* utils/time: implementation of a custom time type which is a single
integer value storing the time since the epoch in nanoseconds
resolution; this is provided for simplified time calculations and
comparisons
* utils/unixsock: helper functions to connect to and communicate with a
UNIX domain socket
- backends: plugins implementing collector callbacks
* collectd: this backend retrieves host and service information from
collectd, the system statistics collection daemon, through its unixsock
interface
- daemon: 'syscollectord' is a daemon based on libsyscollector which
periodically queries all backends
- liboconfig: the configuration parsing library used by collectd; this is
used by 'syscollectord' for parsing its configuration and it's used by
libsyscollector to pass on configuration to the plugins