Florian Forster [Tue, 19 Aug 2008 05:42:07 +0000 (07:42 +0200)]
tcpconns plugin: Removed legacy variables.
`off' was forgotten and the global `nl' was already commented out.
Florian Forster [Mon, 18 Aug 2008 15:44:16 +0000 (17:44 +0200)]
tcpconns plugin: Various fixes for OpenBSD.
- Renamed the TCP states to be the same as used with other operating systems.
- Improved and added error messages.
- Stripped down the `struct nlist'.
- Cleaned up `conn_read'.
- Support for IPv6 sockets has been improved: Not connected IPv6 sockets are
now ignored, too. No idea what the remote-port previously would have been.
Florian Forster [Mon, 18 Aug 2008 14:24:22 +0000 (16:24 +0200)]
AUTHORS: Added Michael Stapelberg.
Florian Forster [Mon, 18 Aug 2008 14:16:28 +0000 (16:16 +0200)]
build system: Added OpenBSD specific behavior for the tcpconns plugin.
Michael Stapelberg [Sat, 9 Aug 2008 12:42:07 +0000 (14:42 +0200)]
tcpconns plugin: Add compatibility for OpenBSD.
Hi there,
I've just integrated OpenBSD-support into the tcpconns module. Please test this
thouroughly, it's not running for so long on my box (but works fine).
Also, please add -lkvm to the right place in the autoconf-stuff so that when
using tcpconns on OpenBSD, libkvm is linked.
Also, I'm not sure about how much of the license we need to embed. I'll
therefore post the full license information so you can put it in if you feel
like:
/* $collectd: parts of tcpconns.c, 2008/08/08 03:48:30 Michael Stapelberg $ */
/* $OpenBSD: inet.c,v 1.100 2007/06/19 05:28:30 ray Exp $ */
/* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
Best regards,
Michael
Florian Forster [Tue, 12 Aug 2008 09:31:40 +0000 (11:31 +0200)]
Merge branch 'collectd-4.4'
Florian Forster [Tue, 12 Aug 2008 09:31:26 +0000 (11:31 +0200)]
Merge branch 'collectd-4.3' into collectd-4.4
Florian Forster [Tue, 12 Aug 2008 09:30:07 +0000 (11:30 +0200)]
snmp plugin: Issue an error if an instance name is empty.
Peter Holik [Tue, 12 Aug 2008 09:04:27 +0000 (11:04 +0200)]
src/utils_threshold.c: Free allocated memory before returning..
..in an error condition.
Michael Stapelberg [Sat, 9 Aug 2008 12:42:24 +0000 (14:42 +0200)]
memory plugin: The variable is named cache, not cached, at least on libstatgrab >= 0.16
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Boian Berberov [Mon, 11 Aug 2008 14:57:57 +0000 (16:57 +0200)]
configure.in: Look for ip_vs.h in the kernel sources.
Developers,
I am writing an updated ebuild for gentoo and I made this patch that allows
ip_vs.h to be located and the ipvs module to build. Normally I would include
this with the ebuild, but I thought it may be beneficial to send it to you.
Please review it and let me know what you think. I am still inexperienced with
autotools so the patch may not be well put together. If you would consider
applying it or a similar patch, please let me know so I can adjust the ebuild
accordingly.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Fri, 1 Aug 2008 22:50:18 +0000 (00:50 +0200)]
bindings/perl/Collectd.pm: Improved the way access to @plugins is synchronized.
So far, a lock has been placed on @plugins, so that no two threads could
access the list of plugins simultaneously. This could cause problems which in
certain situations could even lead to deadlocks. E.g. when using the perl
plugin in combination with the rrdtool plugin with debugging enabled one would
get hit by the following situation: the perl plugin holds the lock on @plugins
and then dispatches values to the rrdtool plugin from some Perl plugin's read
function. The rrdtool plugin then tries to acquire its cache lock. At the same
time some other plugin dispatches values to the rrdtool plugin as well and
this thread now holds the lock on the rrdtool cache. While holding that lock,
the rrdtool plugin might dispatch a debug logging message and thus calls the
perl plugin's log-callback which tries to get the lock on @plugins thus
causing a deadlock.
This has been resolved by the following two changes:
* Restrict the lock to the list of plugins of one type. This allows to access
e.g. read and log plugins in parallel.
* Unlock the variable before calling the Perl callback function. This
further prevents nested locks.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Mon, 28 Jul 2008 09:06:51 +0000 (11:06 +0200)]
contrib/collection3: Add JavaScript code to unify the timespan of all graphs.
Using the new ``Set all images to this timespan'' button one can now easily
show the same timespan in all graphs. This allows to compare different graphs
much more easily.
Florian Forster [Mon, 28 Jul 2008 09:05:39 +0000 (11:05 +0200)]
contrib/collection3: Update `json.cgi' to use the new config parsing function.
Florian Forster [Sun, 27 Jul 2008 15:23:03 +0000 (17:23 +0200)]
controb/collection3: Implement zooming using the mouse wheel.
Also you can now re-center the graph with a double click.
Florian Forster [Sun, 27 Jul 2008 15:22:26 +0000 (17:22 +0200)]
contrib/collection3: Add a generic `instance' placeholder.
It will be replaced by either the type or plugin instance, depending on
which is defined.. This is handy for temperatures and stuff like that,
where sometimes the type instance doesn't exist.
Florian Forster [Sun, 27 Jul 2008 15:21:04 +0000 (17:21 +0200)]
contrib/collection3: Move configuration logic into Collectd::Graph::Config.
Florian Forster [Sun, 27 Jul 2008 11:08:28 +0000 (13:08 +0200)]
contrib/collection3: Updated the `collection3' stuff in contrib/.
Sebastian Harl [Fri, 25 Jul 2008 14:17:18 +0000 (16:17 +0200)]
examples/myplugin.c: Use sstrncpy instead of strcpy.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Thu, 24 Jul 2008 14:33:25 +0000 (16:33 +0200)]
src/Makefile.am: Add `postgresql_default.conf' to `EXTRA_DIST'.
Sebastian Harl [Wed, 23 Jul 2008 12:31:08 +0000 (14:31 +0200)]
collectd.conf(5): Documented the support for custom queries.
Also, collectd.conf.in has been updated.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Fri, 18 Jul 2008 19:39:29 +0000 (21:39 +0200)]
postgresql plugin: Moved pg_stat_database query to postgresql_default.conf.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Wed, 23 Jul 2008 12:29:56 +0000 (14:29 +0200)]
postgresql plugin: Fixed the expansion of the "hostname" parameter.
If the configured hostname specifies a UNIX domain socket, the parameter now
expands to "localhost" as described earlier.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Fri, 18 Jul 2008 19:38:48 +0000 (21:38 +0200)]
postgresql plugin: Added support for passing parameters to a query.
The parameters are referred to in the query string as $1, $2, ... The value of
a parameter is specified using the new "Param <name>" config option of a
"<Query>" block. <name> may be any of "hostname", "database" or "username"
which will be replaced by the value of the appropriate connection parameters.
The hostname will not evaluate to the the UNIX domain socket path -
"localhost" will be used instead.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Fri, 18 Jul 2008 19:38:03 +0000 (21:38 +0200)]
postgresql plugin: Define default queries in a configuration file.
Instead of writing custom code for each default query, those are now defined
in a configuration file which is parsed using the same mechanism as used for
user-defined queries. This configuration file (postgresql_default.conf) is
installed into $pkgdatadir.
Querying the pg_stat_database view is not currently supported this way. This
would require support for parameters in user-defined queries which is not
(yet) available.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Fri, 18 Jul 2008 19:37:23 +0000 (21:37 +0200)]
postgresql plugin: Added support for custom queries.
The user may now define and use custom queries to collect data. A query is
defined by specifying the SQL query to execute and a definition of the data
type of each result column:
<Query magic>
Query "SELECT magic FROM wizard;"
Column gauge magic
</Query>
The "Column" configuration option specifies the type name and optional type
instance: Column <type> [<type_instance>]. The number and order of the
"Column" option has to match the columns of the query result.
A query is activated by adding the configuration option "Query <name>" to the
appropriate "<Database>" configuration blocks. A query may be used multiple
times.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Fri, 18 Jul 2008 19:36:41 +0000 (21:36 +0200)]
postgresql plugin: Split off memory management into dedicated functions.
Allocation and freeing of c_psql_database_t objects is now handled by the new
functions. This increases readability of the code.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Thu, 24 Jul 2008 08:07:22 +0000 (10:07 +0200)]
src/collectd.conf.in: Add the onewire plugin.
Florian Forster [Wed, 23 Jul 2008 15:20:55 +0000 (17:20 +0200)]
README: Added the `onewire' plugin.
Florian Forster [Wed, 23 Jul 2008 15:18:13 +0000 (17:18 +0200)]
Merge branch 'master' of git://git.verplant.org/collectd
Florian Forster [Wed, 23 Jul 2008 15:17:49 +0000 (17:17 +0200)]
Merge branch 'ff/owfs'
Florian Forster [Wed, 23 Jul 2008 15:16:50 +0000 (17:16 +0200)]
collectd.conf(5): inversed -> inverted
Florian Forster [Wed, 23 Jul 2008 15:15:51 +0000 (17:15 +0200)]
collectd.conf(5): Documented the `onewire' plugin.
Florian Forster [Wed, 23 Jul 2008 14:44:40 +0000 (16:44 +0200)]
onewire plugin: Add a plugin to read onewire sensors.
This plugin allows to read _temperature_ sensors connected over a
onewire bus using the `owcapi' library from the `owfs' project. Other
sensors can be added easily, but without hardware to test this it's
kind of hard to be sure it all works.
ToDo's: Document the plugin, make the `Alias' configuration option work.
Florian Forster [Tue, 15 Jul 2008 15:12:21 +0000 (17:12 +0200)]
Merge branch 'collectd-4.4'
Conflicts:
src/snmp.c
Florian Forster [Tue, 15 Jul 2008 14:39:29 +0000 (16:39 +0200)]
ChangeLog: Updated after the merge.
Florian Forster [Tue, 15 Jul 2008 14:32:37 +0000 (16:32 +0200)]
Merge branch 'collectd-4.3' into collectd-4.4
Florian Forster [Tue, 15 Jul 2008 14:29:39 +0000 (16:29 +0200)]
Bumped version to 4.4.2; Updated ChangeLog.
Sebastian Harl [Sun, 13 Jul 2008 19:33:19 +0000 (21:33 +0200)]
src/Makefile: Pass AM_CPPFLAGS to all plugins setting custom CPPFLAGS.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Sat, 12 Jul 2008 09:36:04 +0000 (11:36 +0200)]
configfile.c: Fixed a typo.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Sat, 12 Jul 2008 09:35:21 +0000 (11:35 +0200)]
collectd.conf(5): Documented the support for wrapping lines.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Sat, 12 Jul 2008 09:34:30 +0000 (11:34 +0200)]
liboconfig/scanner.l: Added support for \r\n line endings.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Sat, 12 Jul 2008 09:33:27 +0000 (11:33 +0200)]
liboconfig/scanner.l: Added support for wrapping lines.
Lines may now be wrapped by using "\" as the last character before the
newline. This allows long lines to be split into multiple lines. This also
applies to quoted strings, which are, however, treated special in that
whitespace at the beginning of the following lines will be ignored. This
allows for nicely indenting the wrapped lines.
The following example:
Foo a very very very long list of options \
that does not fit on one line
Bar "a very very very long string \
which does not fit on one line"
... is equivalent to:
Foo a very very very long list of options that does not fit on one line
Bar "a very very very long string which does not fit on one line"
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Peter Holik [Tue, 15 Jul 2008 06:21:21 +0000 (08:21 +0200)]
ipmi plugin: Fix a typo: sstrerror_r -> sstrerror.
Florian Forster [Mon, 14 Jul 2008 17:38:11 +0000 (19:38 +0200)]
snmp plugin: More format string fixes.
Florian Forster [Mon, 14 Jul 2008 15:35:42 +0000 (17:35 +0200)]
ntpd plugin: Use the standard types `uint8_t' etc. instead of `u_char' etc.
Florian Forster [Mon, 14 Jul 2008 15:27:36 +0000 (17:27 +0200)]
vserver plugin: Use `readdir_r' instead of `readdir'.
`readdir' is not thread safe, so use the (more thread safe) `readdir_r'.
Also, don't use the non-standard `d_type' member of the `dirent'
structure - it's not portable.
I'm aware that this plugin is very Linux specific and Linux most likely
will never use another C library than the GNU libc, but using this
member prevents me from compiling with the most restrictive `strict'
settings..
Florian Forster [Mon, 14 Jul 2008 13:47:02 +0000 (15:47 +0200)]
src/{collectd.h,perl.c}: Poison sprintf after perl.h has been included.
Florian Forster [Mon, 14 Jul 2008 09:57:41 +0000 (11:57 +0200)]
snmp plugin: Fix two format strings.
Florian Forster [Mon, 14 Jul 2008 09:49:06 +0000 (11:49 +0200)]
snmp plugin: Parse strings according to the data source type.
Some broken SNMP implementations returns numbers as a string, e. g. a
temperature could would be returned as "19.2 C". This change uses the
data source type, i. e. `counter' or `gauge' to convert that string into
an integer or a floating point number using strtoll or strtod. In case
of an error (string-pointer is NULL or no conversion could take place)
either zero or NAN is returned.
Florian Forster [Mon, 14 Jul 2008 08:04:37 +0000 (10:04 +0200)]
src/collectd.h: Don't include <pth.h>.
We don't use it, we don't check for it. Why on earth is it still in there..?
Florian Forster [Mon, 14 Jul 2008 07:46:27 +0000 (09:46 +0200)]
Merge branch 'collectd-4.4'
Conflicts:
configure.in
Florian Forster [Mon, 14 Jul 2008 07:44:29 +0000 (09:44 +0200)]
Merge branch 'collectd-4.3' into collectd-4.4
Conflicts:
src/ntpd.c
Florian Forster [Mon, 14 Jul 2008 07:41:55 +0000 (09:41 +0200)]
configure.in: Use pkg-config to detect the upsclient library.
The libupsclient-config script is gone in newer versions, so we use pkg-config
instead.
Florian Forster [Mon, 14 Jul 2008 07:39:47 +0000 (09:39 +0200)]
ntpd plugin: Fix two format strings.
Florian Forster [Tue, 8 Jul 2008 11:08:13 +0000 (13:08 +0200)]
contrib/collection3: Add an basic, extensible, modular graphing front-end.
Florian Forster [Sun, 6 Jul 2008 14:40:33 +0000 (16:40 +0200)]
qmail plugin: Use `readdir_r' instead of `readdir'.
Florian Forster [Sun, 6 Jul 2008 14:17:27 +0000 (16:17 +0200)]
Merge branch 'collectd-4.4'
Conflicts:
src/apache.c
src/apcups.c
src/apple_sensors.c
src/battery.c
src/cpu.c
src/cpufreq.c
src/df.c
src/disk.c
src/dns.c
src/email.c
src/entropy.c
src/hddtemp.c
src/interface.c
src/ipvs.c
src/irq.c
src/load.c
src/mbmon.c
src/memcached.c
src/memory.c
src/multimeter.c
src/mysql.c
src/netlink.c
src/network.c
src/nfs.c
src/nginx.c
src/ntpd.c
src/nut.c
src/ping.c
src/processes.c
src/rrdtool.c
src/serial.c
src/snmp.c
src/swap.c
src/tape.c
src/tcpconns.c
src/users.c
src/utils_cmd_putval.c
src/vserver.c
src/wireless.c
src/xmms.c
Florian Forster [Sun, 6 Jul 2008 13:24:59 +0000 (15:24 +0200)]
email plugin: Don't print `pthread_t'.
It may be a struct, so printing it is not portable.
Florian Forster [Sun, 6 Jul 2008 13:04:41 +0000 (15:04 +0200)]
Merge branch 'collectd-4.3' into collectd-4.4
Sebastian Harl [Sat, 5 Jul 2008 10:06:25 +0000 (12:06 +0200)]
contrib/collection.cgi: Added basic support for "postgresql" statistics.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Sat, 5 Jul 2008 10:03:51 +0000 (12:03 +0200)]
postgresql plugin: Added a plugin to collect PostgreSQL database statistics.
This plugin collects active server connections, transaction numbers, block IO
and table row manipulations of PostgreSQL databases. For this purpose it keeps
persistent connections to all configured databases. The statistics are
collected from PostgreSQL's "statistics collector" subsystem.
Currently, statistics are collected from the pg_stat_database,
pg_stat_user_tables and pg_statio_user_tables views. The following new types
have been introduced: pg_blks, pg_n_tup_c, pg_n_tup_g, pg_numbackends, pg_scan
and pg_xact. The type names are basically the same as the column names in the
queried views to keep things consistent. For the number of tuples, counter and
gauge values exist, so the type names have been prefixed with "_c" and "_g"
respectively.
Sample plugin configuration:
<Plugin postgresql>
<Database foo>
Host "hostname"
Port "5432"
User "username"
Password "secret"
SSLMode "prefer"
KRBSrvName "kerberos_service_name"
</Database>
<Database bar>
Service "service_name"
</Database>
</Plugin>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Wed, 2 Jul 2008 14:29:07 +0000 (16:29 +0200)]
src/utils_complain: Changed c_release() into a macro.
While the c_complain*() functions are usually used in error conditions only,
c_release() is usually used whenever things went right (which should be the
more common case ;-)). In order to minimize the overhead in the latter case,
c_release() has been changed into a macro which checks if the complaint
actually has to be released and calls c_do_release() in that case. This
function then takes care of reporting the release-message (this is the
original implementation of c_release()). So, we remove the overhead of a
function call in the usual case, i.e. when we don't have to report any
messages.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Wed, 2 Jul 2008 14:26:46 +0000 (16:26 +0200)]
src/plugin.c: Initialize plugins before checking if read callbacks are available.
plugin_init_all() checks if any read callbacks are available before starting
the read threads. A few plugins register their read callback from their
init callback though. By initializing the plugins before that the read
threads are still started correctly if all plugins register the read
callback in the init callback.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Benjamin Pineau [Sat, 5 Jul 2008 08:45:09 +0000 (10:45 +0200)]
qmail plugin: Don't recurse into ".", ".." and other directories beginning with a dot.
Also use PATH_MAX instead of 4096.
Florian Forster [Wed, 2 Jul 2008 13:21:55 +0000 (15:21 +0200)]
rrdtool plugin: Use a hack to case the `argv' pointers in a portable way.
Florian Forster [Wed, 2 Jul 2008 13:21:27 +0000 (15:21 +0200)]
Build system: Added the qmail plugin.
Florian Forster [Wed, 2 Jul 2008 13:21:03 +0000 (15:21 +0200)]
qmail plugin: Various cleanups and bugfixes.
Alessandro Iurlano [Wed, 2 Jul 2008 12:23:46 +0000 (14:23 +0200)]
qmail plugin: Added a plugin to count messages in qmail queues.
Hello.
Here is my first collectd plugin.
It shows the two values of qmail queues, messages and todo.
The latter should be zero in normal cases. I included it because it
may help diagnose problems.
Maybe a config parameter could be added for it.
It supports a parameter for the Qmail base directory:
<Plugin qmail_queue>
QmailDir "/var/qmail"
</Plugin>
Feel free to modify it if you need.
Alessandro
Florian Forster [Mon, 30 Jun 2008 16:16:07 +0000 (18:16 +0200)]
src/{exec,types_list,utils_cache}.c: Fix format strings.
Florian Forster [Mon, 30 Jun 2008 16:15:52 +0000 (18:15 +0200)]
ipmi plugin: s/sstrerror_r/sstrerror/.
Florian Forster [Wed, 25 Jun 2008 13:36:09 +0000 (15:36 +0200)]
ChangeLog: Recoded to UTF-8.
Michał Mirosław [Sat, 21 Jun 2008 20:21:56 +0000 (22:21 +0200)]
processes plugin: Use read_file_contents().
src/processes.c: use read_file_contents()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Michał Mirosław [Sat, 21 Jun 2008 20:21:07 +0000 (22:21 +0200)]
src/common.c: Move read_file_contents() to here.
src/common.c: move read_file_contents() from thermal plugin
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Michał Mirosław [Sat, 21 Jun 2008 20:20:24 +0000 (22:20 +0200)]
battery plugin: Use walk_directory().
src/battery.c: use walk_directory()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Michał Mirosław [Sat, 21 Jun 2008 20:19:41 +0000 (22:19 +0200)]
src/common.c: Move walk_directory() to here.
src/common.c: Move walk_directory() from thermal plugin
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Tue, 17 Jun 2008 17:59:14 +0000 (19:59 +0200)]
email plugin: Don't unlink the socket file on startup.
Usually, collectd runs as user root, thus making it an unsafe operation to
unconditionally remove the file even though one should be able to assume
that it "belongs" to collectd.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Mon, 23 Jun 2008 20:53:03 +0000 (22:53 +0200)]
collectd.conf(5), collectd.conf: Added the thermal plugin.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Fri, 20 Jun 2008 12:47:16 +0000 (14:47 +0200)]
src/common.c: Not enough memory is an error, not a debug message!
Sebastian Harl [Mon, 16 Jun 2008 21:03:17 +0000 (23:03 +0200)]
src/Makefile.am: Define HAS_BOOL when building the perl plugin.
This works around a bug in Perl, which despite C99 defining the "bool" type
defines its own version of that type unless HAS_BOOL is defined... :-/
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Mon, 16 Jun 2008 21:02:36 +0000 (23:02 +0200)]
Use -Wall -Werror (AM_CFLAGS) when building any module.
A few plugins have to set custom CFLAGS. When using "<plugin>_la_CFLAGS =",
$(AM_CFLAGS) will no longer be used when compiling <plugin> as that resets the
CFLAGS to the empty string. So, in that case, we have to explicitly add
$(AM_CFLAGS) to the custom CFLAGS of that plugin.
After doing so, a couple of problems have been identified which have been
fixed in this patch as well. That includes a possible SEGFAULT in the snmp
plugin which was missing an argument to WARNING().
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Mon, 16 Jun 2008 21:03:50 +0000 (23:03 +0200)]
configure: Include libesmtp in the summary output.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Sebastian Harl [Mon, 16 Jun 2008 21:35:28 +0000 (23:35 +0200)]
contrib/examples/: Be more verbose about how to handle types.
As suggested by Wolfgang Kroener.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Sat, 14 Jun 2008 15:53:25 +0000 (17:53 +0200)]
Merge branch 'master' of /var/lib/git/collectd
Conflicts:
src/email.c
Michał Mirosław [Sat, 14 Jun 2008 00:29:05 +0000 (02:29 +0200)]
src/common.c: Add end-of-line characters to strsplit()
This fixes plugins that use it to break lines read using fgets()
and forget that "\n" is left at the buffer's end. At least
battery and wireless plugins is affected.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Florian Forster [Sat, 14 Jun 2008 15:51:36 +0000 (17:51 +0200)]
email plugin: Fix a format string.
Florian Forster [Fri, 13 Jun 2008 12:57:39 +0000 (14:57 +0200)]
src/collectd.conf.in: Fix the NotificationExec example.
Florian Forster [Fri, 13 Jun 2008 12:57:10 +0000 (14:57 +0200)]
src/plugin.c: Add assertions to detect if two linked lists are the same.
This will catch errors as just fixed in the exec plugin in the future.
Florian Forster [Fri, 13 Jun 2008 12:56:10 +0000 (14:56 +0200)]
exec plugin: Set notify->meta to NULL before copying the list.
Otherwise we will run into a nasty endless loop.
Florian Forster [Thu, 12 Jun 2008 14:08:58 +0000 (16:08 +0200)]
exec plugin: Added support for notification meta information.
Florian Forster [Thu, 12 Jun 2008 13:44:59 +0000 (15:44 +0200)]
src/plugin.[ch]: Implement `plugin_notification_meta_copy'.
The exec plugin copies the notifications before creating threads, so we need to
be able to copy the meta data to a second notification.
Florian Forster [Thu, 12 Jun 2008 13:27:10 +0000 (15:27 +0200)]
src/utils_threashold.c: Add meta data to the notifications.
The min/max warning/failure values, the current value and name of the
data source are now included in the meta data part of the notification.
Florian Forster [Thu, 12 Jun 2008 13:25:16 +0000 (15:25 +0200)]
src/plugin.[ch]: Use different functions instead of a void pointer.
Florian Forster [Thu, 12 Jun 2008 09:44:23 +0000 (11:44 +0200)]
src/plugin.[ch]: Add `notification meta data' to notification_t.
The plan is to have arbitrary values attached to notifications that user
defined actions can use to get machine parseable values for building
own notification strings or the like.
For example, the threshold checking stuff will (in the near future) add
the current (offending) value as well as the threshold values themselves
to the notification, so that notifying plugins don't need to parse the
(freely formatted) notification string to get that information.
Florian Forster [Thu, 12 Jun 2008 09:40:10 +0000 (11:40 +0200)]
Build system: Check for and include <stdbool.h>.
Florian Forster [Thu, 12 Jun 2008 09:35:39 +0000 (11:35 +0200)]
email plugin: Cast a `size_t' to `unsigned long' to make format checking happy.
Florian Forster [Thu, 12 Jun 2008 08:24:10 +0000 (10:24 +0200)]
Merge branch 'master' of /var/lib/git/collectd
Florian Forster [Thu, 12 Jun 2008 08:23:49 +0000 (10:23 +0200)]
thermal plugin: Updated the submit function to the new infrastructure.
Florian Forster [Thu, 12 Jun 2008 08:22:36 +0000 (10:22 +0200)]
src/thermal.c: Changed file encoding from ISO-8859-2 to UTF-8.
Michał Mirosław [Wed, 11 Jun 2008 21:38:14 +0000 (23:38 +0200)]
thermal plugin: Linux ACPI thermal zone plugin
Hello Florian,
On Wed, Jun 11, 2008 at 02:19:14PM +0200, Florian Forster wrote:
> On Mon, Jun 09, 2008 at 08:33:23PM +0200, Michał Mirosław wrote:
> > Here's temperature monitoring plugin using Linux ACPI thermal zone
> > data from /sys/class/thermal/ or /proc/acpi/thermal_zone/.
> thank you very much for your patch :)
> I have a few (minor) requests for changes though ;)
[cut]
I updated the patch basing on your suggestions. You probably can use
the 'walk_directory()' function in other plugins. And it would be
useful to have some standard functions to use in config callback
like boolean entry parser or common ignorelist entry names/parser.
I could send a patch for some cleanups if nobody is working on that,
yet.
Best Regards,
Michał Mirosław
ACPI thermal zone plugin for collectd 4.4.1
Here's temperature monitoring plugin using Linux ACPI thermal zone
data from /sys/class/thermal/ or /proc/acpi/thermal_zone/. Since
this is the same source of data, only first directory found is used.
Plugin configuration:
<Plugin thermal>
ForceUseProcfs true # default is false (prefer new sysfs interface)
Device "THRM" # default: no selection (include all devices found)
IgnoreSelected true # default is false
</Plugin>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>