Code

sysdb.git
11 years agoAdded initial version of the MK Livestatus backend.
Sebastian Harl [Tue, 11 Dec 2012 10:00:11 +0000 (11:00 +0100)]
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.

11 years agoutils unixsock: Added wrappers for clearerr(), feof(), and ferror().
Sebastian Harl [Tue, 11 Dec 2012 09:58:13 +0000 (10:58 +0100)]
utils unixsock: Added wrappers for clearerr(), feof(), and ferror().

11 years agoutils unixsock: Added sc_unixsock_client_shutdown().
Sebastian Harl [Tue, 11 Dec 2012 09:55:36 +0000 (10:55 +0100)]
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.

11 years agostore: Return a positive value when to-be-stored host/service is too old.
Sebastian Harl [Tue, 11 Dec 2012 09:43:42 +0000 (10:43 +0100)]
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.

11 years agostore: Don't return an error if an updated host is too old.
Sebastian Harl [Tue, 11 Dec 2012 08:42:23 +0000 (09:42 +0100)]
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).

11 years agoutils unixsock: Fixed EOF handling in recv().
Sebastian Harl [Tue, 11 Dec 2012 08:06:57 +0000 (09:06 +0100)]
utils unixsock: Fixed EOF handling in recv().

11 years agoAdded initial version of the puppet-storeconfigs backend.
Sebastian Harl [Mon, 10 Dec 2012 14:41:45 +0000 (15:41 +0100)]
Added initial version of the puppet-storeconfigs backend.

This backend currently retrieves host information from Puppet by querying its
Store-Configs database using DBI.

11 years agosc_plugin.m4: Added support for dashes in plugin names to AC_SC_PLUGIN().
Sebastian Harl [Mon, 10 Dec 2012 14:40:38 +0000 (15:40 +0100)]
sc_plugin.m4: Added support for dashes in plugin names to AC_SC_PLUGIN().

11 years agoutils dbi: Added initial version.
Sebastian Harl [Mon, 10 Dec 2012 14:37:48 +0000 (15:37 +0100)]
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.

11 years agoInitial commit. sysdb-0.0.0
Sebastian Harl [Wed, 5 Dec 2012 15:10:48 +0000 (16:10 +0100)]
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