collectd.git
17 years agoBumped version to 3.11.2; Updated ChangeLog. collectd-3.11.2
Florian Forster [Sun, 11 Feb 2007 11:52:16 +0000 (12:52 +0100)]
Bumped version to 3.11.2; Updated ChangeLog.

17 years ago{email,multimeter,users} plugin: Don't pass NULL-pointers to `plugin_submit'.
Florian Forster [Sun, 11 Feb 2007 11:39:46 +0000 (12:39 +0100)]
{email,multimeter,users} plugin: Don't pass NULL-pointers to `plugin_submit'.

17 years agoplugin.c: Catch NULL-pointers and fix it or ignore the values.
Florian Forster [Sun, 11 Feb 2007 11:39:22 +0000 (12:39 +0100)]
plugin.c: Catch NULL-pointers and fix it or ignore the values.

Some systems, such as Solaris, cannot handle NULL-pointers being passed to
`printf ("%s", NULL);' or the like. This caused a crash when sending the users
plugin's values over the network under Solaris.

17 years agoREADME: Updated the informatioin about plugins and prerequisites. collectd-3.11.1
Florian Forster [Sat, 10 Feb 2007 10:16:44 +0000 (11:16 +0100)]
README: Updated the informatioin about plugins and prerequisites.

17 years agodns plugin: Only include and build with `utils_dns.c' if it's actually used.
Florian Forster [Sat, 10 Feb 2007 09:40:30 +0000 (10:40 +0100)]
dns plugin: Only include and build with `utils_dns.c' if it's actually used.

17 years agoconfigure.in: Don't link all objects with `libkstat' and `libdevinfo'.
Florian Forster [Sat, 10 Feb 2007 09:39:50 +0000 (10:39 +0100)]
configure.in: Don't link all objects with `libkstat' and `libdevinfo'.

17 years agoconfigure.in: Bump to 3.11.1; Improve the detection of `netinet/udp.h'.
Florian Forster [Sat, 10 Feb 2007 09:15:52 +0000 (10:15 +0100)]
configure.in: Bump to 3.11.1; Improve the detection of `netinet/udp.h'.

17 years agoChangeLog: Added changes for version 3.11.1.
Florian Forster [Sat, 10 Feb 2007 08:22:21 +0000 (09:22 +0100)]
ChangeLog: Added changes for version 3.11.1.

17 years agoMerge branch 'pull/collectd-3.11' into collectd-3.11
Florian Forster [Fri, 9 Feb 2007 16:55:49 +0000 (17:55 +0100)]
Merge branch 'pull/collectd-3.11' into collectd-3.11

17 years agosrc/utils_mount.c: Fix defines so `cu_mount_getlist' works under Solaris.
Florian Forster [Fri, 9 Feb 2007 16:39:01 +0000 (17:39 +0100)]
src/utils_mount.c: Fix defines so `cu_mount_getlist' works under Solaris.

17 years agoMerge branch 'sh/freebsd'
Florian Forster [Wed, 7 Feb 2007 12:58:55 +0000 (13:58 +0100)]
Merge branch 'sh/freebsd'

17 years agosrc/utils_dns.c: Fix the handling of the `struct udphdr' under the GNU libc and other...
Florian Forster [Wed, 7 Feb 2007 12:58:23 +0000 (13:58 +0100)]
src/utils_dns.c: Fix the handling of the `struct udphdr' under the GNU libc and other systems.

17 years agoprocesses.c, utils_dns.c: Fix compile errors on GNU/kFreeBSD.
Sebastian Harl [Mon, 5 Feb 2007 21:42:26 +0000 (22:42 +0100)]
processes.c, utils_dns.c: Fix compile errors on GNU/kFreeBSD.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agocollectd.spec: Updated for version 3.11
Iain Lea [Tue, 16 Jan 2007 06:59:50 +0000 (07:59 +0100)]
collectd.spec: Updated for version 3.11

Never received any feedback from you and every release still contains a spec
file that is out of date... here is the spec file updated to build ok on fedora
core 3-6.

17 years agoemail plugin: Ignore size if it less than or equal to zero. collectd-3.11.0
Sebastian Harl [Sun, 24 Dec 2006 13:22:49 +0000 (14:22 +0100)]
email plugin: Ignore size if it less than or equal to zero.

Some daemons (e.g. postgrey) don't provide any size information.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agosensors plugin: Avoid assertion in ignorelist_match () when not configured.
Sebastian Harl [Sat, 23 Dec 2006 13:01:14 +0000 (14:01 +0100)]
sensors plugin: Avoid assertion in ignorelist_match () when not configured.

If the sensors plugin is not configured (i.e. default settings are used) the
ignorelist (sensors_list) is never created causing the assertion in
ignorelist_match () to fail. This fixes it.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agoBumped version to 3.11.0; Updated ChangeLog.
Florian Forster [Fri, 22 Dec 2006 14:15:38 +0000 (15:15 +0100)]
Bumped version to 3.11.0; Updated ChangeLog.

17 years agosrc/collectd.h: Don't mess with the syslog-stuff if it's present.
Michael Shigorin [Fri, 22 Dec 2006 14:06:42 +0000 (15:06 +0100)]
src/collectd.h: Don't mess with the syslog-stuff if it's present.

No idea where it came from, but it's not necessary, thus remove it. This even
resolves a conflice with some newer glibc version.

17 years agoAUTHORS: Converted to UTF-8 and added Lubos' efforts.
Florian Forster [Fri, 22 Dec 2006 13:59:04 +0000 (14:59 +0100)]
AUTHORS: Converted to UTF-8 and added Lubos' efforts.

17 years agoAdded the `mbmon' plugin to the ChangeLog for 3.11.0
Florian Forster [Fri, 22 Dec 2006 09:44:13 +0000 (10:44 +0100)]
Added the `mbmon' plugin to the ChangeLog for 3.11.0

.. and Flavio Stanchina to the list of contributors.

17 years agoMerge branch 'fs/mbmon'
Florian Forster [Fri, 22 Dec 2006 09:39:18 +0000 (10:39 +0100)]
Merge branch 'fs/mbmon'

17 years agoMerge branch 'ls/sensors'
Florian Forster [Fri, 22 Dec 2006 09:38:07 +0000 (10:38 +0100)]
Merge branch 'ls/sensors'

17 years agombmon plugin: Change the definition of the RRD files.
Florian Forster [Thu, 21 Dec 2006 21:49:22 +0000 (22:49 +0100)]
mbmon plugin: Change the definition of the RRD files.

Change the RRD files to be of the same format as the `apple_sensors' or the
`sensors extended' formats.

17 years agoMerge branch 'sh/email'
Florian Forster [Thu, 21 Dec 2006 20:12:24 +0000 (21:12 +0100)]
Merge branch 'sh/email'

17 years agoemail plugin: Unlock mutexes before submitting the data.
Sebastian Harl [Tue, 19 Dec 2006 09:19:56 +0000 (10:19 +0100)]
email plugin: Unlock mutexes before submitting the data.

All values are copied to local data structures in email_read () before they
are submitted. Thus the mutex can be unlocked before data is sent to the rrd
files or the network.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agoMerge branch 'collectd-3.10'
Florian Forster [Thu, 21 Dec 2006 19:40:49 +0000 (20:40 +0100)]
Merge branch 'collectd-3.10'

Conflicts:

ChangeLog

17 years agoBumped version to 3.10.4; Updated ChangeLog. collectd-3.10.4
Florian Forster [Thu, 21 Dec 2006 19:37:02 +0000 (20:37 +0100)]
Bumped version to 3.10.4; Updated ChangeLog.

17 years agoBug#404018: Close the file descriptor when binding to a socket fails.
Florian Forster [Thu, 21 Dec 2006 12:38:52 +0000 (13:38 +0100)]
Bug#404018: Close the file descriptor when binding to a socket fails.

This closes the second part of the bug reported by Max Kellermann.

17 years agoBug#404018: Break out of the `while (loop)'-loop when no socket can be opened.
Florian Forster [Thu, 21 Dec 2006 12:27:56 +0000 (13:27 +0100)]
Bug#404018: Break out of the `while (loop)'-loop when no socket can be opened.

This fixes the first part of the bug reported by Max Kellermann.

17 years agoNew plugin "mbmon" to collect motherboard status information:
Flavio Stanchina [Wed, 20 Dec 2006 14:45:58 +0000 (15:45 +0100)]
New plugin "mbmon" to collect motherboard status information:
temperatures, voltages and cooling fan speeds.

Signed-off-by: Flavio Stanchina <flavio@stanchina.net>
17 years agoemail plugin: Made read_{char,line} functions static.
Sebastian Harl [Mon, 18 Dec 2006 14:18:35 +0000 (15:18 +0100)]
email plugin: Made read_{char,line} functions static.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agoemail plugin: Write "0" values as well to distinguish from NaN's.
Sebastian Harl [Mon, 18 Dec 2006 14:17:48 +0000 (15:17 +0100)]
email plugin: Write "0" values as well to distinguish from NaN's.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agocollectd{,.conf}.pod: Extended and clarified documentation of the email plugin.
Sebastian Harl [Wed, 13 Dec 2006 12:37:58 +0000 (13:37 +0100)]
collectd{,.conf}.pod: Extended and clarified documentation of the email plugin.

* Added a description of the protocol and the DS's to the manpage.
* Make clear that the group of the UNIX socket is always changed when running
  as root.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agosensors plugin: Simplify the reload machanism.
Florian Forster [Wed, 13 Dec 2006 08:00:08 +0000 (09:00 +0100)]
sensors plugin: Simplify the reload machanism.

Instead of calling `stat' in the `read' function and then, eventually, calling
the reload stuff, just call the reload function every time and have it return
without doing anything if the config didn't change. This way the reload logic
is not in the read function.

17 years agoMerge branches 'sh/email' and 'ls/processes'
Florian Forster [Wed, 13 Dec 2006 07:05:27 +0000 (08:05 +0100)]
Merge branches 'sh/email' and 'ls/processes'

17 years agosensors plugin: Reload lm_sensors' configuration when changed
Lubos Stanek [Mon, 11 Dec 2006 22:35:16 +0000 (23:35 +0100)]
sensors plugin: Reload lm_sensors' configuration when changed

Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
17 years agosensors plugin: Made sensors.conf path configurable
Lubos Stanek [Mon, 11 Dec 2006 22:34:30 +0000 (23:34 +0100)]
sensors plugin: Made sensors.conf path configurable

Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
17 years agosensors plugin: syslog() and DBG() calls unification
Lubos Stanek [Mon, 11 Dec 2006 22:33:55 +0000 (23:33 +0100)]
sensors plugin: syslog() and DBG() calls unification

Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
17 years agoprocesses plugin: Do not complain of a disappeared task's proc dir
Lubos Stanek [Mon, 11 Dec 2006 15:03:00 +0000 (16:03 +0100)]
processes plugin: Do not complain of a disappeared task's proc dir

Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
17 years agoemail plugin: Prepend the module name to any syslog messages
Sebastian Harl [Tue, 12 Dec 2006 10:11:49 +0000 (11:11 +0100)]
email plugin: Prepend the module name to any syslog messages

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agoemail plugin: Kill threads before closing the associated socket
Sebastian Harl [Tue, 12 Dec 2006 09:50:12 +0000 (10:50 +0100)]
email plugin: Kill threads before closing the associated socket

If the socket is closed before the thread is terminated it might cause some
confusing error messages if the thread wants to read from the socket.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
17 years agoSA plugin: Documentation updates
Alexander Wirt [Sat, 9 Dec 2006 18:44:25 +0000 (19:44 +0100)]
SA plugin: Documentation updates

Signed-off-by: Alexander Wirt <formorer@formorer.de>
17 years agoSA plugin: Added reconnect support (collectd_retries), code cleanup
Alexander Wirt [Sat, 9 Dec 2006 18:43:25 +0000 (19:43 +0100)]
SA plugin: Added reconnect support (collectd_retries), code cleanup

The plugin now tries to reconnect if connection isn't possible
(default is 3 tries), this can adjusted with the collectd_retries
config parameter.

Signed-off-by: Alexander Wirt <formorer@formorer.de>
18 years agosrc/Makefile.am: Added utils_dns.h to dns_la_SOURCES.
Sebastian Harl [Fri, 8 Dec 2006 15:55:28 +0000 (16:55 +0100)]
src/Makefile.am: Added utils_dns.h to dns_la_SOURCES.

Without this change the .tar.{bz2,gz} does not contain utils_dns.h.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agocontrib/collection.cgi: Added support for the email plugin.
Sebastian Harl [Fri, 8 Dec 2006 15:10:38 +0000 (16:10 +0100)]
contrib/collection.cgi: Added support for the email plugin.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoemail plugin: Do not allocate memory for the return value in read_line ().
Sebastian Harl [Fri, 8 Dec 2006 14:13:26 +0000 (15:13 +0100)]
email plugin: Do not allocate memory for the return value in read_line ().

The read_line () function now uses the provided buffer to save the return
value to. In case no complete line could be read, read_line () is called
recursively until '\n' has been found or end-of-file has been reached.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoemail plugin: Use a thread pool.
Sebastian Harl [Fri, 8 Dec 2006 14:12:42 +0000 (15:12 +0100)]
email plugin: Use a thread pool.

Up to now the email plugin created a thread for each connection. This thread
was destroyed after the connection has been closed. Now, a pool containing
MaxConns threads is created and a new connection is assigned to a free thread.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoemail plugin: Prevent a segfault in read_line ().
Sebastian Harl [Fri, 8 Dec 2006 14:12:00 +0000 (15:12 +0100)]
email plugin: Prevent a segfault in read_line ().

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoSpamAssassin plugin: Reclicense again und remove debugging die
Alexander Wirt [Thu, 7 Dec 2006 10:36:35 +0000 (11:36 +0100)]
SpamAssassin plugin: Reclicense again und remove debugging die

Due to some misunderstanding Artistic was not the right license so
I should GPL now instead of Artistic.
Additionally I removed a debugging "die" that should never have been checked
in into my svn repo (Thanks tokkee).

Signed-off-by: Alexander Wirt <formorer@formorer.de>
18 years agoSpamAssassin plugin: Update license foo and add timout
Alexander Wirt [Thu, 7 Dec 2006 10:15:28 +0000 (11:15 +0100)]
SpamAssassin plugin: Update license foo and add timout

Also updated example.cf to reflect the new timeout option
(default is 2 sec.). The whole thing is now dual licensed
(Artistic and Apache License).

Signed-off-by: Alexander Wirt <formorer@formorer.de>
18 years agoemail plugin: Added some information about this plugin and it's config options to...
Florian Forster [Wed, 6 Dec 2006 12:33:35 +0000 (13:33 +0100)]
email plugin: Added some information about this plugin and it's config options to the manpages.

Also updated the README file, fixed a little indentation in `src/collectd.h'
and force the base of the `SocketPerms' to be eight (i. e. assume octal numbers
when setting the permission).

18 years agoMerge branch 'master' of octo@verplant.org:/var/lib/git/collectd
Florian Forster [Wed, 6 Dec 2006 08:59:20 +0000 (09:59 +0100)]
Merge branch 'master' of octo@verplant.org:/var/lib/git/collectd

18 years agodns plugin: Documented plugin in the README file and the manpages.
Florian Forster [Wed, 6 Dec 2006 08:14:55 +0000 (09:14 +0100)]
dns plugin: Documented plugin in the README file and the manpages.

18 years agocontrib/collection.cgi: Added graphs for `opcode' RRD-files (from the dns plugin)
Florian Forster [Wed, 6 Dec 2006 07:55:09 +0000 (08:55 +0100)]
contrib/collection.cgi: Added graphs for `opcode' RRD-files (from the dns plugin)

18 years agosrc/utils_dns.c: Implemented a handler for `DLT_LINUX_SLL'.
Florian Forster [Tue, 5 Dec 2006 20:42:16 +0000 (21:42 +0100)]
src/utils_dns.c: Implemented a handler for `DLT_LINUX_SLL'.

This is the ``Linux cooked capture encapsulation'', which is at least returned
when capturing the `any' device under Linux. This patch will strip off the
header and pass the packet to the IPv4 or IPv6 handler, whichever one is
ppropriate.

18 years agoMerge branch 'aw/spamassassin'
Florian Forster [Tue, 5 Dec 2006 19:59:14 +0000 (20:59 +0100)]
Merge branch 'aw/spamassassin'

18 years agoMerge branch 'ls/shutdown'
Florian Forster [Tue, 5 Dec 2006 19:53:45 +0000 (20:53 +0100)]
Merge branch 'ls/shutdown'

18 years agosensors plugin: declare variables only if SENSORS_HAVE_READ
Lubos Stanek [Tue, 5 Dec 2006 18:09:33 +0000 (19:09 +0100)]
sensors plugin: declare variables only if SENSORS_HAVE_READ

Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
18 years agoMerge branch 'ls/shutdown'
Florian Forster [Tue, 5 Dec 2006 17:08:15 +0000 (18:08 +0100)]
Merge branch 'ls/shutdown'

18 years agosensors plugin: fix shutdown for SENSORS_HAVE_READ
Lubo¹ Stanìk [Tue, 5 Dec 2006 15:34:28 +0000 (16:34 +0100)]
sensors plugin: fix shutdown for SENSORS_HAVE_READ

Sorry, too many changes for me to observe at once.

Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
18 years agosensors plugin: shutdown implementation
Lubo¹ Stanìk [Tue, 5 Dec 2006 15:23:10 +0000 (16:23 +0100)]
sensors plugin: shutdown implementation

Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
18 years agosensors plugin: SENSORS_HAVE_READ unification
Lubo¹ Stanìk [Tue, 5 Dec 2006 15:15:55 +0000 (16:15 +0100)]
sensors plugin: SENSORS_HAVE_READ unification

Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
18 years agoMerge branch 'sh/shutdown'
Florian Forster [Tue, 5 Dec 2006 17:00:57 +0000 (18:00 +0100)]
Merge branch 'sh/shutdown'

18 years agoemail plugin: Shutdown cleanly.
Sebastian Harl [Mon, 4 Dec 2006 12:53:16 +0000 (13:53 +0100)]
email plugin: Shutdown cleanly.

Using a shutdown function the email plugin closes any sockets, terminates all
running threads and removes the UNIX socket.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoemail plugin: "Calculate" UNIX_PATH_MAX if it is not defined.
Sebastian Harl [Mon, 4 Dec 2006 22:26:18 +0000 (23:26 +0100)]
email plugin: "Calculate" UNIX_PATH_MAX if it is not defined.

Some systems (e.g. Darwin) do not seem to define UNIX_PATH_MAX at all. Thus I
calculate it from the size of the sun_path character array of struct
sockaddr_un in this case.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoemail plugin: Make UNIX socket path configurable at compile time.
Sebastian Harl [Mon, 4 Dec 2006 22:58:44 +0000 (23:58 +0100)]
email plugin: Make UNIX socket path configurable at compile time.

The prefix for the UNIX socket can be configured using the
COLLECTD_SOCKET_PREFIX macro. "email" will be prepended to it.

If you configure collectd using

  CFLAGS="-DCOLLECTD_SOCKET_PREFIX='\"$path-\"'" ./configure

the socket will be found at "$path-email".

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agodns plugin: Remove unnecessary poll code and use the (blocking) `pcap_loop' function...
Florian Forster [Mon, 4 Dec 2006 21:47:34 +0000 (22:47 +0100)]
dns plugin: Remove unnecessary poll code and use the (blocking) `pcap_loop' function instead.

Not only does this simplify things *a lot* on *BSD and Mac OS X, because you
can't always call `poll' on their filedescriptors, it also simplifies the code
a lot and thus removes potential error sources.

18 years agodns plugin: Use the standard member names for `struct in6_addr' accesses.
Florian Forster [Mon, 4 Dec 2006 20:17:49 +0000 (21:17 +0100)]
dns plugin: Use the standard member names for `struct in6_addr' accesses.

The 32bit members apparently are Linux or glibc specific, so don't use them.

18 years agoImported Alexander's SpamAssassin-plugin to contrib/SpamAssassin/
Florian Forster [Mon, 4 Dec 2006 12:13:17 +0000 (13:13 +0100)]
Imported Alexander's SpamAssassin-plugin to contrib/SpamAssassin/

18 years agoconfigure.in: Set the default case for `--with--libpthread' to `yes'.
Florian Forster [Mon, 4 Dec 2006 11:56:37 +0000 (12:56 +0100)]
configure.in: Set the default case for `--with--libpthread' to `yes'.

Also removed the `regex' output at the end of the configure run, because it was
empty.

18 years agoplugin.[ch]: Added support for an optional plugin shutdown function.
Sebastian Harl [Mon, 4 Dec 2006 10:30:29 +0000 (11:30 +0100)]
plugin.[ch]: Added support for an optional plugin shutdown function.

A plugin may register a shutdown function using plugin_register_shutdown ().
This function is called when collectd terminates either during normal
termination or after SIGINT or SIGTERM have been received.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agodns plugin: Fixed a compile error if pcap.h is not found.
Sebastian Harl [Mon, 4 Dec 2006 10:04:17 +0000 (11:04 +0100)]
dns plugin: Fixed a compile error if pcap.h is not found.

If pcap.h is not found, the compiler complains about some "defined but not
used" warnings. As we're using -Werror this causes the build to abort.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoChangeLog: Collected the changes so far.
Florian Forster [Sun, 3 Dec 2006 18:29:58 +0000 (19:29 +0100)]
ChangeLog: Collected the changes so far.

The new version needs to be released soon!

18 years agoMerge branch 'ff/processes'
Florian Forster [Sun, 3 Dec 2006 18:05:15 +0000 (19:05 +0100)]
Merge branch 'ff/processes'

18 years agoemail plugin: Limit the `MaxConns' option by a hardcoded value.
Florian Forster [Sun, 3 Dec 2006 17:43:53 +0000 (18:43 +0100)]
email plugin: Limit the `MaxConns' option by a hardcoded value.

Because typos (and ``typos'', i. e. dumb users) happen, it's better to not
allow INT_MAX connections. The problem is that on 32bit machines this would
 a) create 2147483648 threads
 b) allocate (at least) 512 GBytes of memory
which would result in certain death of either the daemon or the system.

This patch limits the number of connections (and thus threads and allocated
memory) to 16384, which ought to be enough for most people. Those, who need
more connections (and can accomplish this, even though there are quite narrow
OS limits) will need to recompile themselves.

18 years agoemail plugin: Made socket settings configurable.
Sebastian Harl [Sun, 3 Dec 2006 13:11:21 +0000 (14:11 +0100)]
email plugin: Made socket settings configurable.

Added config file support to the email plugin.

The following options are available:
* "SocketGroup <group name>"
  Set the group the UNIX socket belongs to to <group name>.
* "SocketPerms <perms>"
  Set the permissions of the UNIX socket to <perms>. No validation is done.
  The user has to make sure reasonable values are given.
* "MaxConns <conns>"
  The maximum number of concurrent connections is set to <conns>.

<perms> and <conns> may be given as decimal (no prefix), octal (prefix "0") or
sedecimal (a.k.a. hexadecimal, prefix "0x") values.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoemail plugin: Make it possible to build the plugin write-only.
Florian Forster [Sun, 3 Dec 2006 09:38:52 +0000 (10:38 +0100)]
email plugin: Make it possible to build the plugin write-only.

So far the plugin simply imported `pthread.h'. If this headerfile (or the
library for that case) was not present, building the plugin would fail. This
patch makes `libpthread' a soft dependency, i. e. it's only necessary if you
want to read from the socket. Without `libpthread' being available the plugin
can still be used in server processes.

18 years agoMerge branches 'ff/dns' and 'sh/email' into next
Florian Forster [Sat, 2 Dec 2006 18:17:50 +0000 (19:17 +0100)]
Merge branches 'ff/dns' and 'sh/email' into next

Conflicts:

configure.in
src/Makefile.am

18 years agodns plugin: Improved config checks for the pthread library.
Florian Forster [Sat, 2 Dec 2006 18:11:22 +0000 (19:11 +0100)]
dns plugin: Improved config checks for the pthread library.

The checks for the pthread-library have been extended to match the other
libraries being used. The dns plugin (in particular `utils_dns.c') has been
verified to build without `libpcap' being present.

18 years agodns plugin: Added the dns plugin to the sample `collectd.conf'.
Florian Forster [Sat, 2 Dec 2006 18:09:32 +0000 (19:09 +0100)]
dns plugin: Added the dns plugin to the sample `collectd.conf'.

18 years agoemail plugin: Use strtok_r() instead of strtok().
Sebastian Harl [Thu, 30 Nov 2006 11:02:46 +0000 (12:02 +0100)]
email plugin: Use strtok_r() instead of strtok().

strtok() internally uses a static buffer and thus is not thread-safe.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoemail plugin: Change owner and mode of the UNIX socket if possible.
Sebastian Harl [Thu, 30 Nov 2006 11:02:10 +0000 (12:02 +0100)]
email plugin: Change owner and mode of the UNIX socket if possible.

Set the owner and mode to COLLECTD_GRP_NAME (defaulting to "collectd") and 0770
respectively. A couple of different daemons running as different users might
want to connect to it.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoemail plugin: Minor code cleanup.
Sebastian Harl [Thu, 30 Nov 2006 11:01:32 +0000 (12:01 +0100)]
email plugin: Minor code cleanup.

Removed debugging output and whitespaces at end of lines.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agosrc/utils_ignorelist.c: Fix build-problems when building without regex support.
Florian Forster [Sat, 2 Dec 2006 16:51:58 +0000 (17:51 +0100)]
src/utils_ignorelist.c: Fix build-problems when building without regex support.

18 years agodns plugin: Check for `libpthread' and link the plugin against it.
Florian Forster [Sat, 2 Dec 2006 16:51:16 +0000 (17:51 +0100)]
dns plugin: Check for `libpthread' and link the plugin against it.

18 years agodns plugin: Use `pthread_sigmask' rather than `signal'.
Florian Forster [Sat, 2 Dec 2006 16:50:37 +0000 (17:50 +0100)]
dns plugin: Use `pthread_sigmask' rather than `signal'.

18 years agodns plugin: Use threads rather than two processes and a pipe.
Florian Forster [Sat, 2 Dec 2006 15:30:38 +0000 (16:30 +0100)]
dns plugin: Use threads rather than two processes and a pipe.

This is not only much simpler, code wise, but also more elegant and hopefully
faster. This code is alpha quality at best.

18 years agoNew plugin "email" to collectd ham, spam, ... statistics
Sebastian Harl [Tue, 28 Nov 2006 12:39:51 +0000 (13:39 +0100)]
New plugin "email" to collectd ham, spam, ... statistics

This plugin collects email count and size for each type (e.g. ham, spam,
virus, ...) of emails, spam score values and the count of successful spam
checks (e.g.  BAYES_99, SUBJECT_DRUG_GAP_C, ...).

These information are provided by external programs which communicate with the
plugin thru a UNIX socket and a simple line-based protocol:

/* e-mail type (e.g. ham, spam, virus, ...) and size */
e:<type>:<bytes>

/* spam score */
s:<value>

/* successful spam checks */
c:<type1>[,<type2>,...]

At most MAX_CONNS (currently set to 5) clients can connect to the plugin
simultaneously. Each connection is handled by a separate thread. Any input
line is limited to 256 characters (including the newline character) which
ought to be enough for anybody[tm] by definition. "c"-lines have to be split
up if they grow longer.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
18 years agoconfigure.in: Removed `src/libconfig' from the list of subdirs requireing configuration.
Florian Forster [Tue, 28 Nov 2006 14:42:56 +0000 (15:42 +0100)]
configure.in: Removed `src/libconfig' from the list of subdirs requireing configuration.

18 years agoMerge branch 'ff/dns'
Florian Forster [Tue, 21 Nov 2006 17:14:36 +0000 (18:14 +0100)]
Merge branch 'ff/dns'

Conflicts:

configure.in
contrib/collection.cgi

18 years agodf plugin: Match `spec_device' rather than `device' when matching the `Device' ignore...
Lubos Stanek [Tue, 21 Nov 2006 16:13:56 +0000 (17:13 +0100)]
df plugin: Match `spec_device' rather than `device' when matching the `Device' ignorelist.

18 years agosrc/Makefile.am: Install the `collectd.conf' with restricted permissions, 0640.
Florian Forster [Tue, 21 Nov 2006 16:10:52 +0000 (17:10 +0100)]
src/Makefile.am: Install the `collectd.conf' with restricted permissions, 0640.

Thanks to Lubos for suggesting this :)

18 years agodf plugin: Fix a nasty bug in the config routine. It effectively disabled the `Ignore...
Lubos Stanek [Tue, 21 Nov 2006 16:00:54 +0000 (17:00 +0100)]
df plugin: Fix a nasty bug in the config routine. It effectively disabled the `IgnoreSelected' option.

18 years agosensors plugin: Declare static arrays only if they're being used, i. e. if libsensors...
Florian Forster [Tue, 21 Nov 2006 10:08:51 +0000 (11:08 +0100)]
sensors plugin: Declare static arrays only if they're being used, i. e. if libsensors exists.

18 years agoprocesses plugin: Implemented detailed process statistics for Darwin/Mac OS X
Florian Forster [Tue, 21 Nov 2006 10:03:57 +0000 (11:03 +0100)]
processes plugin: Implemented detailed process statistics for Darwin/Mac OS X

18 years agocollectd.conf(5): Documented the new selection options of the df-plugin.
Florian Forster [Mon, 20 Nov 2006 18:49:09 +0000 (19:49 +0100)]
collectd.conf(5): Documented the new selection options of the df-plugin.

18 years agoconfigure.in: Remove the `--with-regex' option and check for `regex.h' everywhere.
Florian Forster [Mon, 20 Nov 2006 18:18:53 +0000 (19:18 +0100)]
configure.in: Remove the `--with-regex' option and check for `regex.h' everywhere.

18 years agodf plugin: Make use of the new ignorelist functionality.
Florian Forster [Mon, 20 Nov 2006 17:16:34 +0000 (18:16 +0100)]
df plugin: Make use of the new ignorelist functionality.

18 years agosrc/utils_ignorelist.c: Allow the `entry' argument to be NULL/empty.
Florian Forster [Mon, 20 Nov 2006 17:15:39 +0000 (18:15 +0100)]
src/utils_ignorelist.c: Allow the `entry' argument to be NULL/empty.

Also assert the object to be non-empty.

18 years agosrc/utils_ignorelist.[ch]: Remove the `ignorelist_num' function and associated code.
Florian Forster [Mon, 20 Nov 2006 16:47:26 +0000 (17:47 +0100)]
src/utils_ignorelist.[ch]: Remove the `ignorelist_num' function and associated code.