common.c: Implemented `ntohll' and `htonll'.
load plugin: Made the data source variable `static'.
Also removed the `filename' member from `data_set_t' because it's not used.
Also removed the `filename' member from `data_set_t' because it's not used.
load plugin: Converted to the new plugin structure.
rrdtool plugin: First implementation of an rrdtool write plugin.
Many functions have been moved from `common.c' to a new file `rrdtool.c'. The
new plugin compiles, but has not yet been testet.
Many functions have been moved from `common.c' to a new file `rrdtool.c'. The
new plugin compiles, but has not yet been testet.
plugins: Implement a first version of the new plugin mechanismn.
Instead of the impractical `plugin_register' function, provide a variety of
different register functions, so plugin can `hook in' at various stages of the
daemon.
The most important new hook is likely the `write' hook which will allow for
generic `output plugins' to be plugged in.
Instead of the impractical `plugin_register' function, provide a variety of
different register functions, so plugin can `hook in' at various stages of the
daemon.
The most important new hook is likely the `write' hook which will allow for
generic `output plugins' to be plugged in.
src/utils_llist.[ch]: Added a generic linked list implementation.
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.
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.
Merge branch 'aw/spamassassin'
Merge branch 'ls/shutdown'
sensors plugin: declare variables only if SENSORS_HAVE_READ
Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
Merge branch 'ls/shutdown'
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>
Sorry, too many changes for me to observe at once.
Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
sensors plugin: shutdown implementation
Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
sensors plugin: SENSORS_HAVE_READ unification
Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
Signed-off-by: Stanek Lubos <kolektor@atlas.cz>
Merge branch 'sh/shutdown'
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>
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>
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>
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>
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.
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.
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.
The 32bit members apparently are Linux or glibc specific, so don't use them.
Imported Alexander's SpamAssassin-plugin to contrib/SpamAssassin/
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.
Also removed the `regex' output at the end of the configure run, because it was
empty.
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>
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>
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>
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>
ChangeLog: Collected the changes so far.
The new version needs to be released soon!
The new version needs to be released soon!
Merge branch 'ff/processes'
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.
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.
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>
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>
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.
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.
Merge branches 'ff/dns' and 'sh/email' into next
Conflicts:
configure.in
src/Makefile.am
Conflicts:
configure.in
src/Makefile.am
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.
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.
dns plugin: Added the dns plugin to the sample `collectd.conf'.
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>
strtok() internally uses a static buffer and thus is not thread-safe.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
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>
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>
email plugin: Minor code cleanup.
Removed debugging output and whitespaces at end of lines.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Removed debugging output and whitespaces at end of lines.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
src/utils_ignorelist.c: Fix build-problems when building without regex support.
dns plugin: Check for `libpthread' and link the plugin against it.
dns plugin: Use `pthread_sigmask' rather than `signal'.
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.
This is not only much simpler, code wise, but also more elegant and hopefully
faster. This code is alpha quality at best.
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>
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>
17 years agoconfigure.in: Removed `src/libconfig' from the list of subdirs requireing configuration.
configure.in: Removed `src/libconfig' from the list of subdirs requireing configuration.
Merge branch 'ff/dns'
Conflicts:
configure.in
contrib/collection.cgi
Conflicts:
configure.in
contrib/collection.cgi
18 years agodf plugin: Match `spec_device' rather than `device' when matching the `Device' ignore...
df plugin: Match `spec_device' rather than `device' when matching the `Device' ignorelist.
src/Makefile.am: Install the `collectd.conf' with restricted permissions, 0640.
Thanks to Lubos for suggesting this :)
Thanks to Lubos for suggesting this :)
18 years agodf plugin: Fix a nasty bug in the config routine. It effectively disabled the `Ignore...
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...
sensors plugin: Declare static arrays only if they're being used, i. e. if libsensors exists.
processes plugin: Implemented detailed process statistics for Darwin/Mac OS X
collectd.conf(5): Documented the new selection options of the df-plugin.
configure.in: Remove the `--with-regex' option and check for `regex.h' everywhere.
df plugin: Make use of the new ignorelist functionality.
src/utils_ignorelist.c: Allow the `entry' argument to be NULL/empty.
Also assert the object to be non-empty.
Also assert the object to be non-empty.
src/utils_ignorelist.[ch]: Remove the `ignorelist_num' function and associated code.
src/utils_ignorelist.[ch]: Renamed some functions. Internal changes.
Mostly renamed variables, but also changed some return values and inserted
asserts where appropriate.
Mostly renamed variables, but also changed some return values and inserted
asserts where appropriate.
Ignorelist: Renamed `src/config_list.[ch]' to `src/utils_ignorelist.[ch]'.
The interface has been changed to use the `ignorelist'-prefix rather than
`configlist', which is a confusing term for this functionality.
The interface has been changed to use the `ignorelist'-prefix rather than
`configlist', which is a confusing term for this functionality.
More improvementa on the ignorelist functionality.
I am sending the updated version of config_list.
I repaired the error freeing unallocated memory, modified regex for dynamically
allocated error message buffer and replaced '|' with '/'.
I am sending the updated version of config_list.
I repaired the error freeing unallocated memory, modified regex for dynamically
allocated error message buffer and replaced '|' with '/'.
Improve and generalize the ignorelist functionality.
Change contrib/init.d-rh7 to sleep for a second between restarts.
Break out of the `nanosleep' loop if `loop' is set to non-zero.
plugin_read_all: Check the `loop' variable after each iteration and return early if the daemon is shutting down.
Lubos Stanek has reported that the daemon may stop too slow, resulting in it
being killed by impatient init-scripts. With this patch `plugin_read_all'
checks the `loop' variable before entering each plugin's read-function. If the
loop-variable is set to non-zero it will return early, allowing the daemon to
shutdown more instantly.
Lubos Stanek has reported that the daemon may stop too slow, resulting in it
being killed by impatient init-scripts. With this patch `plugin_read_all'
checks the `loop' variable before entering each plugin's read-function. If the
loop-variable is set to non-zero it will return early, allowing the daemon to
shutdown more instantly.
18 years agosensors plugin: Improved the documentation in the sample configfile and the `collectd...
sensors plugin: Improved the documentation in the sample configfile and the `collectd.conf(5)' manpage.
sensors plugin: Some code cleanup.
Very long lines have been broken into several shorter ones. `strncmp' has been
replaced with `strcmp' where reasonable. Variables have been renamed and all
variable declarations have been moved to the top of the block, as required by
ANSI C prior to C99.
Very long lines have been broken into several shorter ones. `strncmp' has been
replaced with `strcmp' where reasonable. Variables have been renamed and all
variable declarations have been moved to the top of the block, as required by
ANSI C prior to C99.
Merge branch 'master' into ls/sensors
Merge branch 'processes'
Merge branch 'master' into ff/dns
dns plugin: Corrected the handling of signals, i. e. don't catch them.
Merge branch 'collectd-3.10'
Bumped version to 3.10.3; Updated ChangeLog.
Merge branch 'collectd-3.10'
ntpd plugin: Use the `NI_MAXHOST' define for the fixed-size buffer `peername'.
ntpd plugin: Fix buffer reallocation when the message is send in more than one packet.
Merge branch 'collectd-3.10'
debian/: Removed one last unneccessary file.
debian/: Imported the files from Sebastian's Debian package, part 2.
debian/: Imported the files from Sebastian's Debian package.
configure.in, utils_mount.c: Improved the detection of the different `getmntent' variants.
The check provided by `autoconf' has been completely removed, since it doesn't
provide the information we need and it's internals seem to change more often
than is practical.
The check provided by `autoconf' has been completely removed, since it doesn't
provide the information we need and it's internals seem to change more often
than is practical.
Bumped version to 3.10.2; Updated ChangeLog.
Merge branch 'ff/mysql'
mysql plugin: Don't give up when connecting to the database fails during `init'.
Instead a connection attempt is made in increasing intervals, up to one day.
Instead a connection attempt is made in increasing intervals, up to one day.
Merge branch 'ff/ntpd'
sensors plugin: Improved the extended naming.
And changed indentation to be the same as anywhere else in the program.
And changed indentation to be the same as anywhere else in the program.
collectd.conf.pod: Corrected typos and punctuations.
collectd.conf.in: Correct the example entry for the sensors plugin.
ntpd plugin: Pass a `struct sockaddr' to `getnameinfo', rather than a `struct in_addr'.
Thanks to Lubos Stanek for pointing me in the right direction :)
Thanks to Lubos Stanek for pointing me in the right direction :)
Merge branch 'master' into ff/dns
Merge branch 'collectd-3.10'
Merge branches 'ff/ping', 'ff/macosx-swap' and 'ff/netbsd' into collectd-3.10
collection.cgi: Label the values displayed as `Temperature' in the temperature graph.
collectd(1): Improved the information about sensors plugin's DSes.
dns plugin: Create traffic graphs for captured DNS packets.
sensors plugin: Improve the support for multiple chips and add an ignore functionality.
Date: Tue, 24 Oct 2006 19:09:35 +0200
From: Lubo?? Stan??k <lubek@users.sourceforge.net>
To: collectd@verplant.org
Subject: Re: [collectd] 3.10.1 - proposed patch to extend sensors plugin
Enhancements:
- precise sensor feature selection (chip-bus-address/type-feature) in the
ExtendedSensorNaming mode
- more sensor features (finite list)
- honor sensors.conf's ignored
- config Sensor option
- config IgnoreSelected option
- config ExtendedSensorNaming option
- modified DS'es to include proper information about type in the
ExtendedSensorNaming mode
- /type- differs from yours because of the conflict between the type and the
old DS in the ExtendedSensorNaming mode
- the contrib/collection.cgi is modified to support both modes
Date: Tue, 24 Oct 2006 19:09:35 +0200
From: Lubo?? Stan??k <lubek@users.sourceforge.net>
To: collectd@verplant.org
Subject: Re: [collectd] 3.10.1 - proposed patch to extend sensors plugin
Enhancements:
- precise sensor feature selection (chip-bus-address/type-feature) in the
ExtendedSensorNaming mode
- more sensor features (finite list)
- honor sensors.conf's ignored
- config Sensor option
- config IgnoreSelected option
- config ExtendedSensorNaming option
- modified DS'es to include proper information about type in the
ExtendedSensorNaming mode
- /type- differs from yours because of the conflict between the type and the
old DS in the ExtendedSensorNaming mode
- the contrib/collection.cgi is modified to support both modes
dns plugin: Collect and transfer byte counters for queries and replies.
Renamed more variables and functions and such from `named' -> `dns'
Renamed the `named'-plugin to `dns'-plugin.
src/utils_mount.c: Correct syntax errors in error-strings.
swap plugin: Removed unused variable `status' which aborted the build with gcc.
src/utils_mount.c: Prefer `getvfsstat' over `getfsstat' if both are present.
Apparently the `getfsstat' syscall is deprecated, so don't use it unless there
is no alternative.
Apparently the `getfsstat' syscall is deprecated, so don't use it unless there
is no alternative.
src/urils_mount.c: Use `getvfsstat' on NetBSD, if available.
processes plugin: Only define `ps_list_register' if it is actually used.
ping plugin: Add the hosts during initialization, not when reading the config file.
Since adding a host to liboping might block when no nameserver can be reached
or another problem occures (normally this means network misconfiguration) it's
not the best idea to do this when reading the config file. At that point we
didn't fork to the background yet, so the boot process may hang which is not good.
Also, hosts that cannot be added right away are tried again in increasing intervals.
Since adding a host to liboping might block when no nameserver can be reached
or another problem occures (normally this means network misconfiguration) it's
not the best idea to do this when reading the config file. At that point we
didn't fork to the background yet, so the boot process may hang which is not good.
Also, hosts that cannot be added right away are tried again in increasing intervals.
Merge branch 'sh-pidfile'
Completed the documentation of the new `-P' commandline option.
Additionally the `have_pidfile' variable was eliminated.
Additionally the `have_pidfile' variable was eliminated.