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>
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>
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 '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 '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.
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
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.
Add the `-P' command line option.
This option may be used to set the pid file, overwriting any settings found
in the config file.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
This option may be used to set the pid file, overwriting any settings found
in the config file.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Add file `NEWS' to make automake happy.
Merge branch 'collectd-3.10'
18 years agosrc/apache.c: Increase the buffer size from 4kByte to 16kByte, since this was a probl...
src/apache.c: Increase the buffer size from 4kByte to 16kByte, since this was a problem twice.
Also, make this limit easier to configure.
Also, make this limit easier to configure.
This patch adds an new plugin called multimeter.
I have a multimeter which can be connected to the serial port. It is
called Metex M4650CR.
No configuration is nesessary, this multimeter is autodetected on
programm start if connected and switched on. Only your serial port has
to be enabled (setserial /dev/ttyS0 autoconfig)
I have a multimeter which can be connected to the serial port. It is
called Metex M4650CR.
No configuration is nesessary, this multimeter is autodetected on
programm start if connected and switched on. Only your serial port has
to be enabled (setserial /dev/ttyS0 autoconfig)
collectd.pod: Correct the information about the different modes.
There are _four_ modes now. Also, be more clear about when and why the `Client'
mode is the default mode.
There are _four_ modes now. Also, be more clear about when and why the `Client'
mode is the default mode.
Merge branch 'origin'
Merge branch 'collectd-3.10'
18 years agoMerge branch 'collectd-3.10' of octo@verplant.org:/var/lib/git/collectd into collectd...
Merge branch 'collectd-3.10' of octo@verplant.org:/var/lib/git/collectd into collectd-3.10
collectd.conf.pod: Fix the synopsis: There is not `Port' option.
[22:23] <@tokkee> octo: Also laut deiner Manpage ist Listen ein Alias fuer Server und es gibt auch ne Option "Port" ;-)
[22:23] <@tokkee> octo: Also laut deiner Manpage ist Listen ein Alias fuer Server und es gibt auch ne Option "Port" ;-)
collectd.conf.in: Added (commented) lines for the `Listen' and `Server' options.
[22:20] <@tokkee> octo: Koenntest du bitte im naechsten Release von collectd in das Config-File auskommentierte Bsp-Zeilen fuer "Server" und "Port" mit rein nehmen?
[22:20] <@octo> tokkee: Ja, kann ich machen..
[22:21] <@tokkee> octo: Thx.
[22:21] <@tokkee> octo: Dann brauch ich wegen so was net mit patchen im Paket anfangen ;-)
[22:20] <@tokkee> octo: Koenntest du bitte im naechsten Release von collectd in das Config-File auskommentierte Bsp-Zeilen fuer "Server" und "Port" mit rein nehmen?
[22:20] <@octo> tokkee: Ja, kann ich machen..
[22:21] <@tokkee> octo: Thx.
[22:21] <@tokkee> octo: Dann brauch ich wegen so was net mit patchen im Paket anfangen ;-)
Merge branch 'master' of /var/lib/git/collectd
Merge branch 'collectd-3.10'
Bumped version to 3.10.1; Updated ChangeLog.
apcups plugin: Close the socket when `connect' failes.
Otherwise people will get `Too many open files' faily soon.
Otherwise people will get `Too many open files' faily soon.
Upgraded liboping to version 0.2.3
Merge branch 'master' of /var/lib/git/collectd
Merge branch 'ff/processes'
Merge branch 'processes' of /var/lib/git/collectd
collection.cgi: The new processes RRD files have been added.
The new files are:
* ps_rss
* ps_cputime
* ps_count
* ps_pagefaults
The new files are:
* ps_rss
* ps_cputime
* ps_count
* ps_pagefaults
processes plugin: The DS-type of the pagefault RRD-file is COUNTER, not GAUGE.
collection.cgi: Improved the interfaces package and error count.
vserver plugin: Use `plugin_complain' and `plugin_relief'.
processes plugin: Renamed the selection option to `Process'.
processes plugin: Improved the storage of counters, so they work when the number of running instances varies.
processes plugin: Implement collecting the number of pagefaults for a selected process.
cpu plugin: Use `plugin_complain' and `plugin_relief'.
disk plugin: Use `plugin_complain' and `plugin_relief'.
apcups plugin: Use `plugin_complain' and `plugin_relief'.
Implemented `plugin_complain' and `plugin_relief' for better error-logging in plugins.
18 years agoprocesses plugin: Implement number of processes and number of threads/LWPs of a speci...
processes plugin: Implement number of processes and number of threads/LWPs of a specific name.
Merge branch 'master' into ff/processes
debian/: Corrected the files needed for building Debian packages.
Bumped version to 3.10.0.
collectd.spec: Added the `ntpd' plugin.
Don't include the debian/ subdirectory in the distribution tarball, since Sebastian has packaged an official package.
Apparently Debian developers prefer not having this directory in the tarball..
Apparently Debian developers prefer not having this directory in the tarball..
Merge branch 'ff/traffic'
collection.cgi: Add the new network RRD-files `if_errors.rrd' and `if_packets.rrd'.
ping plugin: Updated the ping plugin to work with liboping 0.2.2.
liboping: Use `oping.h' rather than the (old) `liboping.h'.
liboping: Updated `oping.h' to version 0.2.2. This has been forgotten previously.
renamed: src/liboping/liboping.h -> src/liboping/oping.h
Merge branch 'install-config'
collectd.conf: Un-comment a valid mode using the automake mechanismn.
Don't overwrite an existing config file. Use `collectd.conf.pkg-orig' instead.
traffic plugin: Store the new `if_packets.rrd' and `if_errors.rrd' in a seperate subdirectory.
This makes it easier for user interfaces to know what host, and what a plugin
subdirectory is.
This makes it easier for user interfaces to know what host, and what a plugin
subdirectory is.
Merge branch 'collectd-3.9'
network: Be more verbose when `network_create_socket' failes due to a wrong `mode'.
On Sat, Jul 08, 2006 at 02:14:05PM +0000, Cryptronic wrote:
> collectd[6889]: network_create_socket (zensoredip, 25826) failed
if this is the only error you get, you most likely need to put
Mode Client
Somewhere before the `Listen' statement.
On Sat, Jul 08, 2006 at 02:14:05PM +0000, Cryptronic wrote:
> collectd[6889]: network_create_socket (zensoredip, 25826) failed
if this is the only error you get, you most likely need to put
Mode Client
Somewhere before the `Listen' statement.
collectd.conf: (Un)comment plugins based on the configure-setting. Install the file in `sysconfdir'.
What's not done yet is checking wether or not the (destination) file already
exists and _don't_ overwrite it.
What's not done yet is checking wether or not the (destination) file already
exists and _don't_ overwrite it.
renamed: contrib/collectd.conf -> src/collectd.conf.in
Merge branch 'master' into processes