Code

collectd.git
16 years agoMerge branch 'ff/ascent'
Florian Forster [Wed, 9 Apr 2008 09:01:12 +0000 (11:01 +0200)]
Merge branch 'ff/ascent'

16 years agocollectd.conf(5): Documented the `ascent' plugin.
Florian Forster [Wed, 9 Apr 2008 09:00:54 +0000 (11:00 +0200)]
collectd.conf(5): Documented the `ascent' plugin.

Also updated the `README' file and the sample configuration.

16 years agoascent plugin: Store latency in seconds, not milli seconds.
Florian Forster [Wed, 9 Apr 2008 08:44:58 +0000 (10:44 +0200)]
ascent plugin: Store latency in seconds, not milli seconds.

16 years agoascent plugin: Fix classes/races and ignore unhandled tags.
Florian Forster [Tue, 8 Apr 2008 13:00:01 +0000 (15:00 +0200)]
ascent plugin: Fix classes/races and ignore unhandled tags.

Classes and races were exchanged, this was fixed.

16 years agomigrate-3-4.px: Use 'rrdtool tune' instead of 'sed' to rename DS's.
Sebastian Harl [Fri, 4 Apr 2008 20:05:48 +0000 (22:05 +0200)]
migrate-3-4.px: Use 'rrdtool tune' instead of 'sed' to rename DS's.

Either the output format of 'rrdtool dump' has changed or there was an
error in the regex used with sed in the first place. Anyway, in some cases
the 'if_octects' DS's did not get translated. 'rrdtool tune' should be
able to handle it correctly in any case.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoexec plugin: Removed whitespaces at EOL.
Florian Forster [Tue, 8 Apr 2008 07:49:23 +0000 (09:49 +0200)]
exec plugin: Removed whitespaces at EOL.

16 years agoexec plugin: Separate stdout and stderr.
Peter Holik [Tue, 1 Apr 2008 14:12:10 +0000 (16:12 +0200)]
exec plugin: Separate stdout and stderr.

Hi!

Digitemp sends errors to stderr, but collectd handles stdout and stderr
as the same and reports parsing errors.

My idea is to seperate stdout and stderr.

I also removed the special pipe handling checking for stdin...
because exec plugin will alway have a fd > 2 for pipes !!
(fd 0,1 and 2 (stdin, stdout, stderr) are used by collectd with /dev/null if demonized)

now strings from stderr will be reportet by ERROR

cu Peter

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoascent plugin: Added handling of `sessions'.
Florian Forster [Tue, 8 Apr 2008 07:42:48 +0000 (09:42 +0200)]
ascent plugin: Added handling of `sessions'.

I. e. per-player information.

16 years agoascent plugin: New plugin to collect AscentEmu server statistics.
Florian Forster [Mon, 7 Apr 2008 10:02:18 +0000 (12:02 +0200)]
ascent plugin: New plugin to collect AscentEmu server statistics.

16 years agoipmi plugin: Add ignorelist functionality.
Florian Forster [Fri, 4 Apr 2008 12:25:33 +0000 (14:25 +0200)]
ipmi plugin: Add ignorelist functionality.

16 years agoipmi plugin: Improve error messages when removing a sensor.
Florian Forster [Fri, 4 Apr 2008 09:02:38 +0000 (11:02 +0200)]
ipmi plugin: Improve error messages when removing a sensor.

Don't tell the user to file a bug report, when a sensor is removed because IPMI
reported an error. Tell him to file a bug report, though, if collectd doesn't
know how to handle the value.

16 years agoipmi plugin: Add a stupi bug which prevented basically all sensors from being collected.
Florian Forster [Fri, 4 Apr 2008 08:54:40 +0000 (10:54 +0200)]
ipmi plugin: Add a stupi bug which prevented basically all sensors from being collected.

16 years agosrc/collectd.conf.in: Added a `LoadPlugin' line for the ipmi plugin.
Florian Forster [Fri, 4 Apr 2008 08:54:15 +0000 (10:54 +0200)]
src/collectd.conf.in: Added a `LoadPlugin' line for the ipmi plugin.

16 years agoconfigure.in: Add the OpenIPMI library to the status output.
Florian Forster [Fri, 4 Apr 2008 08:53:47 +0000 (10:53 +0200)]
configure.in: Add the OpenIPMI library to the status output.

16 years agoMerge branch 'collectd-4.3'
Florian Forster [Thu, 3 Apr 2008 07:39:03 +0000 (09:39 +0200)]
Merge branch 'collectd-4.3'

16 years agoMerge branch 'collectd-4.2' into collectd-4.3
Florian Forster [Thu, 3 Apr 2008 07:38:56 +0000 (09:38 +0200)]
Merge branch 'collectd-4.2' into collectd-4.3

16 years agoCOPYING: Added the file (including the GPLv2).
Florian Forster [Thu, 3 Apr 2008 07:35:28 +0000 (09:35 +0200)]
COPYING: Added the file (including the GPLv2).

Newer versions of automake copy the GPLv3 when invoked with ``--add-missing''
which is not what we want.

16 years agoipmi plugin: Add a plugin to read sensor values via IPMI.
Florian Forster [Wed, 2 Apr 2008 15:49:44 +0000 (17:49 +0200)]
ipmi plugin: Add a plugin to read sensor values via IPMI.

The plugin is very basic and still basically alpha quality. You cannot
configure anything yet, neither where to connect to (the local, SMI connection
is used right now) nor what sensors to collect (collects all it can make sense
of). I hope to be able to do that on friday or some other workday in the near
future.

16 years agoMerge branch 'collectd-4.3'
Florian Forster [Tue, 1 Apr 2008 13:06:56 +0000 (15:06 +0200)]
Merge branch 'collectd-4.3'

16 years agoMerge branch 'collectd-4.2' into collectd-4.3
Florian Forster [Tue, 1 Apr 2008 13:05:45 +0000 (15:05 +0200)]
Merge branch 'collectd-4.2' into collectd-4.3

Conflicts:

configure.in
src/plugin.c

16 years agounixsock plugin: Do not unregister a write-callback in us_shutdown().
Sebastian Harl [Mon, 31 Mar 2008 09:31:38 +0000 (11:31 +0200)]
unixsock plugin: Do not unregister a write-callback in us_shutdown().

The unixsock plugin no longer registers a write-callback. Basically,
unregistering a non-existent callback does not do any harm, However, if no
write-callback has been registered at all, the appropriate linked list has
never been created and the process will segfault when trying to access it.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoconfigure.in: Set CPPFLAGS when checking headers.
Florian Forster [Tue, 1 Apr 2008 12:11:35 +0000 (14:11 +0200)]
configure.in: Set CPPFLAGS when checking headers.

When checking for <upsclient.h> (and the headers of a few other libraries) the
library specific CFLAGS were added to the global CFLAGS variable. This variable
is used when checking for ``header usability'', but not when checking for
``header presence'' for some reason.

This commit uses the global CPPFLAGS variable instead, which is used in both
checks. Libraries that benefit from this commit are:
- libcurl,
- libmysql(client),
- libnetsnmp,
- libupsclient.

Resolves #6

16 years agoapache plugin: Increase the size of the read-buffer dynamically.
Florian Forster [Tue, 1 Apr 2008 08:40:39 +0000 (10:40 +0200)]
apache plugin: Increase the size of the read-buffer dynamically.

Why guess the size if you can just adapt to whatever comes in? The memory isn't
freed ever, though.

16 years agosrc/plugin.c: plugin_dispatch_values: Improve the error messages.
Florian Forster [Mon, 31 Mar 2008 15:03:56 +0000 (17:03 +0200)]
src/plugin.c: plugin_dispatch_values: Improve the error messages.

If no write plugin was loaded or no DS was defined, the
`plugin_dispatch_values' used to fail silently. This is of course not good, so
this commit introduces error messages for this case, so that users can see why
their setup is not working properly.

Also, the ``no such DS type'' message was promoted from DEBUG to INFO.

16 years agosrc/common.c: Make really sure BYTE_ORDER and BIG_ENDIAN are defined.
Florian Forster [Mon, 31 Mar 2008 13:51:13 +0000 (15:51 +0200)]
src/common.c: Make really sure BYTE_ORDER and BIG_ENDIAN are defined.

If both, BYTE_ORDER and BIG_ENDIAN, are undefined, the statement
  #if BYTE_ORDER == BIG_ENDIAN
will be evaluated to `true', which may cause `ntohll' and `htonll' to behave
weird.

16 years agosrc/utils_tail.c: Call `stat' after reading till the end of file.
Florian Forster [Mon, 31 Mar 2008 13:00:35 +0000 (15:00 +0200)]
src/utils_tail.c: Call `stat' after reading till the end of file.

The old code used stat(2) to determine if the file was moved and reopened the
file before reading anything. This way lines, that were added to the file
before it was moved, would have been missed. This commit changes that behavior
so that the file is read until EOF and _then_ stat(2) is used to check if the
file has been moved away.

16 years agoplugin.c: Tell the user if a plugin could not be found.
Sebastian Harl [Mon, 31 Mar 2008 08:46:42 +0000 (10:46 +0200)]
plugin.c: Tell the user if a plugin could not be found.

Up to now this error was silently ignored, letting the user believe that
everything went fine.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollection.cgi: Make sure to pass valid variable names to rrdgraph.
Sebastian Harl [Sun, 30 Mar 2008 18:00:45 +0000 (20:00 +0200)]
collection.cgi: Make sure to pass valid variable names to rrdgraph.

Variable names used with DEF, VDEF, etc. must be made up of the
characters "A-Z, a-z, 0-9, -, _". In meta_graph_generic_stack() variable
names have been generated from the instance name which may, however,
contain illegal characters. Now, all illegal characters will be replaced
with "_" and a number will be prepended to the variable name to make
sure the name is still unique.

Thanks to Joerg Jaspert for pointing this out and helpful debugging
information.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agohddtemp plugin: Prefix all messages with "hddtemp plugin:".
Florian Forster [Mon, 31 Mar 2008 06:29:25 +0000 (08:29 +0200)]
hddtemp plugin: Prefix all messages with "hddtemp plugin:".

16 years agocollection.cgi: Added "meta graph" for "dns_qtype" and "dns_rcode".
Sebastian Harl [Sun, 30 Mar 2008 15:25:16 +0000 (17:25 +0200)]
collection.cgi: Added "meta graph" for "dns_qtype" and "dns_rcode".

This will merge all query types and return codes into a single graph each.

get_n_colors() has been taken from the version 3 script to get the colors for
the graphs. get_random_color() imho is not suitable for that purpose as it can
return colors that are hardly different - which would result in graphs that
are hard to read. get_n_colors() now returns a hash-ref suitable to be passed
to meta_graph_generic_stack().

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollection.cgi: Added support for "wireless" values.
Sebastian Harl [Sun, 30 Mar 2008 17:35:14 +0000 (19:35 +0200)]
collection.cgi: Added support for "wireless" values.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agorrdtool plugin: Reduce the filesize of files created per default.
Thorsten von Eicken [Sun, 30 Mar 2008 17:16:20 +0000 (19:16 +0200)]
rrdtool plugin: Reduce the filesize of files created per default.

When creating an RRD file, the rrdtool plugin doesn't do what it's supposed to
do. Instead of creating 5 RRAs it creates 4 and in doing so it skips the first
one. The result is about 2x the number of datapoints total. The fix below works
for me. It's for 4.2.2 but it looks like this hasn't changed in the latest 4.3
beta.

Resolves: #5

16 years agocollection.cgi: Updated "dns" types to version 4.x.
Sebastian Harl [Sun, 30 Mar 2008 13:45:04 +0000 (15:45 +0200)]
collection.cgi: Updated "dns" types to version 4.x.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agopowerdns plugin: Fixes for the connection handling.
Florian Forster [Sun, 30 Mar 2008 11:00:58 +0000 (13:00 +0200)]
powerdns plugin: Fixes for the connection handling.

The connection stuff has been fixed to actually work with the daemon. The data
received is not yet handled completely. I'm waiting for feedback from Luke on
that..

References #1

16 years agopowerdns plugin: Code cleanups.
Florian Forster [Sun, 24 Feb 2008 21:20:34 +0000 (22:20 +0100)]
powerdns plugin: Code cleanups.

16 years agopowerdns plugin: Added a plugin to read statistics from PowerDNS' control socket.
Luke Heberling [Sun, 24 Feb 2008 16:44:12 +0000 (17:44 +0100)]
powerdns plugin: Added a plugin to read statistics from PowerDNS' control socket.

16 years agoBumped version to 4.3.2; Updated ChangeLog. collectd-4.3.2
Florian Forster [Sat, 29 Mar 2008 10:07:13 +0000 (11:07 +0100)]
Bumped version to 4.3.2; Updated ChangeLog.

16 years agoMerge branch 'collectd-4.2' into collectd-4.3
Florian Forster [Sat, 29 Mar 2008 09:52:45 +0000 (10:52 +0100)]
Merge branch 'collectd-4.2' into collectd-4.3

Conflicts:

ChangeLog
version-gen.sh

16 years agoBumped version to 4.2.6 collectd-4.2.6
Florian Forster [Sat, 29 Mar 2008 09:34:46 +0000 (10:34 +0100)]
Bumped version to 4.2.6

16 years agodisk plugin: Implement an ignorelist.
Florian Forster [Sat, 29 Mar 2008 08:59:17 +0000 (09:59 +0100)]
disk plugin: Implement an ignorelist.

Not all disks collected by the disk plugin may be of interest. This commit
implements an ignorelist as provided by src/utils_ignorelist.c to make it
possible to select exactly which instances are interesting and which are not.

Resolves: #3

16 years agosrc/utils_ignorelist.c: ignorelist_match: Allow the `ignorelist' to be NULL.
Florian Forster [Sat, 29 Mar 2008 08:57:13 +0000 (09:57 +0100)]
src/utils_ignorelist.c: ignorelist_match: Allow the `ignorelist' to be NULL.

This makes calling the function easier, because initialization of the
ignorelist in the plugin usually depends on configuration parameters..

16 years agoChangeLog: Added changes since 4.2.5.
Florian Forster [Thu, 27 Mar 2008 16:52:53 +0000 (17:52 +0100)]
ChangeLog: Added changes since 4.2.5.

16 years agocollectd.conf(5): Document vmem's configuration option.
Florian Forster [Thu, 27 Mar 2008 16:41:08 +0000 (17:41 +0100)]
collectd.conf(5): Document vmem's configuration option.

Also updates src/collectd.conf.in.

16 years agovmem plugin: Add the `Verbose' config option.
Florian Forster [Thu, 27 Mar 2008 16:13:41 +0000 (17:13 +0100)]
vmem plugin: Add the `Verbose' config option.

All the statistics is just too much for every-day-use ;)

16 years agovmem plugin: Added a plugin to collect virtual memory statistics.
Florian Forster [Thu, 27 Mar 2008 14:42:40 +0000 (15:42 +0100)]
vmem plugin: Added a plugin to collect virtual memory statistics.

16 years agosensors plugin: Simple fix for temperature sensors.
Peter Holik [Wed, 26 Mar 2008 12:48:09 +0000 (13:48 +0100)]
sensors plugin: Simple fix for temperature sensors.

Hi everybody!

While playing with sensors i missed temperature rrd files:

--- sensors.c.orig      2008-03-25 14:58:21.000000000 +0100
+++ sensors.c   2008-03-25 14:58:27.000000000 +0100
@@ -580,7 +580,7 @@
                        type = "fanspeed";
                else if (fl->feature->type
                                == SENSORS_FEATURE_TEMP)
-                       type = "input";
+                       type = "temperature";
                else
                        continue;

because this type got registered as input and "input" is not in types.db

after configuring with --enable-debug i saw a log:

No such dataset registered: input

should that be also without --enable-debug in my syslog?

cu Peter

16 years agoMerge branch 'collectd-4.3'
Florian Forster [Wed, 26 Mar 2008 08:56:48 +0000 (09:56 +0100)]
Merge branch 'collectd-4.3'

16 years agoMerge branch 'pull/master'
Florian Forster [Wed, 26 Mar 2008 08:56:41 +0000 (09:56 +0100)]
Merge branch 'pull/master'

16 years agoMerge branch 'pull/collectd-4.3' into collectd-4.3
Florian Forster [Wed, 26 Mar 2008 08:56:22 +0000 (09:56 +0100)]
Merge branch 'pull/collectd-4.3' into collectd-4.3

16 years agoMerge branch 'collectd-4.3'
Florian Forster [Wed, 26 Mar 2008 08:52:25 +0000 (09:52 +0100)]
Merge branch 'collectd-4.3'

Conflicts:

src/unixsock.c

16 years agoMerge branch 'collectd-4.2' into collectd-4.3
Florian Forster [Wed, 26 Mar 2008 08:48:27 +0000 (09:48 +0100)]
Merge branch 'collectd-4.2' into collectd-4.3

Conflicts:

src/unixsock.c

16 years agounixsock plugin: Open two different IO stream handles for reading and writing.
Sebastian Harl [Wed, 26 Mar 2008 08:44:04 +0000 (09:44 +0100)]
unixsock plugin: Open two different IO stream handles for reading and writing.

Full-duplex standard IO streams are not really supported on sockets.
Mixing input and output functions involves calls to lseek(2) which is
not supported on sockets and thus causes the IO operations to fail.
Opening two IO streams solves the problem.

This is a backport of 43df21461d523023951746ef669f1bb95f61366d.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agounixsock plugin: Open two different IO stream handles for reading and writing.
Sebastian Harl [Wed, 26 Mar 2008 08:42:56 +0000 (09:42 +0100)]
unixsock plugin: Open two different IO stream handles for reading and writing.

Full-duplex standard IO streams are not really supported on sockets.
Mixing input and output functions involves calls to lseek(2) which is
not supported on sockets and thus causes the IO operations to fail.
Opening two IO streams solves the problem.

This is a backport of 43df21461d523023951746ef669f1bb95f61366d.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agounixsock plugin: Open two different IO stream handles for reading and writing.
Sebastian Harl [Tue, 25 Mar 2008 18:58:20 +0000 (19:58 +0100)]
unixsock plugin: Open two different IO stream handles for reading and writing.

Full-duplex standard IO streams are not really supported on sockets.
Mixing input and output functions involves calls to lseek(2) which is
not supported on sockets and thus causes the IO operations to fail.
Opening two IO streams solves the problem.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocontrib/cussh.pl: Fixed input line parsing.
Sebastian Harl [Tue, 25 Mar 2008 18:31:37 +0000 (19:31 +0100)]
contrib/cussh.pl: Fixed input line parsing.

The regexes parsing the user input lines have been adopted to take into
account that the newline at the end of the line has been removed.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocontrib/cussh.pl: Added support for LISTVAL.
Sebastian Harl [Tue, 25 Mar 2008 14:59:40 +0000 (15:59 +0100)]
contrib/cussh.pl: Added support for LISTVAL.

Also fixed the following minor problems:
 * the arguments passed to Collectd::Unixsock::putval() have been updated
   to the current version of the Perl module
 * remove newlines from the end of the input line - the unixsock plugin
   currently seems to be buggy when receiving two newlines in a row

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoCollectd::Unixsock: Fixed some typos.
Sebastian Harl [Tue, 25 Mar 2008 14:58:47 +0000 (15:58 +0100)]
Collectd::Unixsock: Fixed some typos.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoutils_cmd_{get,put}val.c: Fixed usage of parse_identifier().
Sebastian Harl [Wed, 26 Mar 2008 08:34:14 +0000 (09:34 +0100)]
utils_cmd_{get,put}val.c: Fixed usage of parse_identifier().

This function modifies its first argument which, in these cases, is used
again after the function call. Now, a copy of the string is passed to
parse_identifier().

This is a backport of 0a905cbd3151716c5749b5e7c5e439861466804d.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoutils_cmd_{get,put}val.c: Fixed usage of parse_identifier().
Sebastian Harl [Tue, 25 Mar 2008 14:58:15 +0000 (15:58 +0100)]
utils_cmd_{get,put}val.c: Fixed usage of parse_identifier().

This function modifies its first argument which, in these cases, is used
again after the function call. Now, a copy of the string is passed to
parse_identifier().

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoutils_cmd_*: Terminate all lines printed to the socket with newline.
Florian Forster [Wed, 26 Mar 2008 08:31:33 +0000 (09:31 +0100)]
utils_cmd_*: Terminate all lines printed to the socket with newline.

This is a backport of 1ca0b79a4274784e4cc15d45e46e2cfa0c2039cf.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoutils_cmd_*: Terminate all lines printed to the socket with newline.
Sebastian Harl [Tue, 25 Mar 2008 14:56:59 +0000 (15:56 +0100)]
utils_cmd_*: Terminate all lines printed to the socket with newline.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoDisambiguated the protocol used by the unixsock (and other) plugins.
Sebastian Harl [Wed, 26 Mar 2008 08:28:40 +0000 (09:28 +0100)]
Disambiguated the protocol used by the unixsock (and other) plugins.

As discussed with Florian on IRC, the interpretation of the status line
returned by the unixsock plugin (et.al.) is now strictly specified. A status
greater than or equal to zero indicates success and the number of subsequent
lines of output. A negative status still indicates failure.

This way, frontends can manage the output without having to know any
command-specific interpretation rules.

The GETVAL command has been updated to implement this specification. It now
returns each value on a separate line. collectd-unixsock(5) has been updated
to reflect the changes.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoutils_cmd_flush.c: Simplified / improved option parsing.
Sebastian Harl [Tue, 25 Mar 2008 14:53:45 +0000 (15:53 +0100)]
utils_cmd_flush.c: Simplified / improved option parsing.

Instead of parsing all options before doing any work, each option is now
handled right after it has been parsed. This has the following benefits:

 * No need to allocate and construct any data structures.
 * The timeout option may be used multiple times now, only affecting any
   plugins listed after this.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollectd-unixsock(5): Updated the paragraph about Collectd::Unixsock.
Sebastian Harl [Tue, 25 Mar 2008 14:52:47 +0000 (15:52 +0100)]
collectd-unixsock(5): Updated the paragraph about Collectd::Unixsock.

The module is no longer available in contrib/PerlLib/ but bindings/perl/.
Also it's now installed by default.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoMerge branch 'collectd-4.3'
Florian Forster [Mon, 24 Mar 2008 12:36:17 +0000 (13:36 +0100)]
Merge branch 'collectd-4.3'

16 years agoMerge branch 'collectd-4.2' into collectd-4.3
Florian Forster [Mon, 24 Mar 2008 12:36:05 +0000 (13:36 +0100)]
Merge branch 'collectd-4.2' into collectd-4.3

16 years agoliboconfig/parser.y: Enabled verbose error messages.
Sebastian Harl [Mon, 24 Mar 2008 11:07:20 +0000 (12:07 +0100)]
liboconfig/parser.y: Enabled verbose error messages.

This uses bison's "%error-verbose" option which might not be available in
other yacc implementations.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoliboconfig: Include the filename in error messages.
Sebastian Harl [Mon, 24 Mar 2008 11:06:49 +0000 (12:06 +0100)]
liboconfig: Include the filename in error messages.

As collectd now supports more than one config file, this is more
convenient.

A module-global variable is used for that purpose. If no filename is
available (e.g. if the user uses oconfig_parse_fh() directly), a string
like "<fd#X>" is used instead, where X is replaced by the file descriptor.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoperl plugin: Updated copyright information.
Sebastian Harl [Sat, 22 Mar 2008 16:22:49 +0000 (17:22 +0100)]
perl plugin: Updated copyright information.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollectd-unixsock(5): Fixed some typos.
Sebastian Harl [Sat, 22 Mar 2008 16:22:19 +0000 (17:22 +0100)]
collectd-unixsock(5): Fixed some typos.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoutils_cmd_flush.c: Terminate all lines printed to the socket with a newline.
Sebastian Harl [Sat, 22 Mar 2008 16:21:45 +0000 (17:21 +0100)]
utils_cmd_flush.c: Terminate all lines printed to the socket with a newline.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocollectd-unixsock(5): Be more specific which time `LISTVAL' returns.
Florian Forster [Mon, 24 Mar 2008 10:36:46 +0000 (11:36 +0100)]
collectd-unixsock(5): Be more specific which time `LISTVAL' returns.

The timestamp of the last value and the time at which the last value was
received may differ..

16 years agounixsock plugin: Use `src/utils_cmd_listval.[ch]' and remove the local cache.
Florian Forster [Mon, 24 Mar 2008 10:33:32 +0000 (11:33 +0100)]
unixsock plugin: Use `src/utils_cmd_listval.[ch]' and remove the local cache.

Since no command uses the cache in the unixsock plugin anymore, it can be
removed. The implementation in `src/utils_cache.[ch]' is now used for all
commands, and all commands are in separate modules. This should be a
performance gain, since the implementation of unixsock used a linked list,
which is much slower than the AVL tree used in the global cache.

Also this resolves a nasty bug: The unixsock plugin used to use the _local_
interval setting when removing values from the cache. The global cache uses the
interval setting of the values themselves, to that mixing different intervals
in a big setup is now compatible with the `listval' and other commands.

16 years agosrc/utils_cmd_listval.[ch]: Added a new module which implements the `LISTVAL' command.
Florian Forster [Mon, 24 Mar 2008 10:29:46 +0000 (11:29 +0100)]
src/utils_cmd_listval.[ch]: Added a new module which implements the `LISTVAL' command.

It's done using the global cache implemented in `src/utils_cache.[ch]'.

16 years agosrc/utils_cache.[ch]: Improved the `uc_get_names' to return the times, too.
Florian Forster [Mon, 24 Mar 2008 10:28:19 +0000 (11:28 +0100)]
src/utils_cache.[ch]: Improved the `uc_get_names' to return the times, too.

16 years agosrc/utils_cache.[ch]: Add `uc_get_names', a function to return all keys in the cache.
Florian Forster [Mon, 24 Mar 2008 09:42:03 +0000 (10:42 +0100)]
src/utils_cache.[ch]: Add `uc_get_names', a function to return all keys in the cache.

16 years agosensors plugin: Print information why a specific feature is ignored in debug mode.
Florian Forster [Sat, 22 Mar 2008 10:14:03 +0000 (11:14 +0100)]
sensors plugin: Print information why a specific feature is ignored in debug mode.

As requested by Ondřej Válek.

16 years agowireless plugin: Fix reading the noise value.
Florian Forster [Sat, 22 Mar 2008 09:45:11 +0000 (10:45 +0100)]
wireless plugin: Fix reading the noise value.

Accidentally the wrong value was used as `noise'. This patch fixes it.
Thanks to Ondřej Válek for pointing this out.

16 years agobuild.sh: Use glibtoolize if it's available.
Sebastian Harl [Sun, 9 Mar 2008 18:59:15 +0000 (19:59 +0100)]
build.sh: Use glibtoolize if it's available.

This way, the script should work on e.g. MacOSX as well.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoconfigure: Do not preset $with_libstatgrab and $with_libdevstat.
Sebastian Harl [Sun, 9 Mar 2008 18:58:24 +0000 (19:58 +0100)]
configure: Do not preset $with_libstatgrab and $with_libdevstat.

Those variables are set when parsing the command line options and evaluated
inside the AC_ARG_WITH() macro. Presetting them overwrites any command line
options.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agocontrib/redhat/collectd.spec: Updated the description of the package.
Florian Forster [Sat, 22 Mar 2008 09:07:34 +0000 (10:07 +0100)]
contrib/redhat/collectd.spec: Updated the description of the package.

Also updated the packager and vendor fields and added the redhat/ subdirectory
to contrib/README.

16 years agocontrib/redhat/: Added a spec file and affiliated config files.
Richard Shade [Sat, 22 Mar 2008 08:55:05 +0000 (09:55 +0100)]
contrib/redhat/: Added a spec file and affiliated config files.

16 years agosrc/utils_cache.c: Fix a bug that was introduced by the preceding merge.
Florian Forster [Sat, 22 Mar 2008 08:45:41 +0000 (09:45 +0100)]
src/utils_cache.c: Fix a bug that was introduced by the preceding merge.

16 years agoMerge branch 'collectd-4.3'
Florian Forster [Sat, 22 Mar 2008 08:41:42 +0000 (09:41 +0100)]
Merge branch 'collectd-4.3'

Conflicts:

src/utils_cache.c

16 years agoMerge branch 'collectd-4.2' into collectd-4.3
Florian Forster [Sat, 22 Mar 2008 08:40:00 +0000 (09:40 +0100)]
Merge branch 'collectd-4.2' into collectd-4.3

16 years agocollectd(1): Document the supported signals.
Sebastian Harl [Tue, 18 Mar 2008 11:35:08 +0000 (12:35 +0100)]
collectd(1): Document the supported signals.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoperl plugin: Fixed the "EnableDebugger after LoadPlugin" warning.
Sebastian Harl [Tue, 18 Mar 2008 11:34:17 +0000 (12:34 +0100)]
perl plugin: Fixed the "EnableDebugger after LoadPlugin" warning.

For some strange reason my original patch (perl plugin: Warn if
"EnableDebugger" has been used after "LoadPlugin".) has been applied at the
wrong position (it has been applied to perl_config_includedir() instead of
perl_config_enabledebugger() - I have absolutely no clue why though).

Also, the check for the precondition of this warning has been fixed. In some
cases aTHX does not seem to be set, even though the Perl interpreter has
already been initialized. Now, perl_threads is used to check for that
condition.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoconfigfile.c: Include more than one files in lexicographical order.
Sebastian Harl [Thu, 20 Mar 2008 12:22:15 +0000 (13:22 +0100)]
configfile.c: Include more than one files in lexicographical order.

Using qsort() and strcmp() the list of files (after reading the contents
of a directory or expanding globs) is sorted before inclusion. As the
order of options in the config file matters this is more convenient.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoliboconfig/oconfig.c: Free all allocated memory in oconfig_free().
Sebastian Harl [Thu, 20 Mar 2008 10:03:32 +0000 (11:03 +0100)]
liboconfig/oconfig.c: Free all allocated memory in oconfig_free().

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoconfigfile.c: Abort if any config file could not be read.
Sebastian Harl [Thu, 20 Mar 2008 10:02:06 +0000 (11:02 +0100)]
configfile.c: Abort if any config file could not be read.

So far, when including all files from some directory, errors while reading
any of those config files have been reported but otherwise ignored. So,
collectd would run with some potentially incomplete configuration which is
not what I would expect.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoconfigfile.c: Fixed a memory leak in cf_read_generic().
Sebastian Harl [Thu, 20 Mar 2008 10:01:18 +0000 (11:01 +0100)]
configfile.c: Fixed a memory leak in cf_read_generic().

In case stat(2) failed, the memory allocated for the return value has not
been freed.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoconfigfile.c: Fixed a segfault after a parse error.
Sebastian Harl [Thu, 20 Mar 2008 10:00:37 +0000 (11:00 +0100)]
configfile.c: Fixed a segfault after a parse error.

In cf_read_generic(), the parse result had not been checked to not be
NULL, which caused a segfault when trying to access any of its members.
Now, an error will be returned in that case.

Also, cf_ci_append_children() has been made more robust in that respect.
It now detects an empty source and does nothing in that case.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
16 years agoAUTHORS: Speak about `plugins', not `modules'.
Florian Forster [Sat, 22 Mar 2008 08:27:44 +0000 (09:27 +0100)]
AUTHORS: Speak about `plugins', not `modules'.

Also sorted the plugins and put them all before any other patches.

16 years agoMerge branch 'pull/collectd-4.3' into collectd-4.3
Florian Forster [Tue, 18 Mar 2008 09:19:43 +0000 (10:19 +0100)]
Merge branch 'pull/collectd-4.3' into collectd-4.3

16 years agosrc/utils_{cache,threshold}.c: Fix the concept of failed and missing values.
Florian Forster [Tue, 18 Mar 2008 09:18:11 +0000 (10:18 +0100)]
src/utils_{cache,threshold}.c: Fix the concept of failed and missing values.

Apparently I was confused at the time - and still am ;)

16 years agoMerge branch 'pull/collectd-4.3' into collectd-4.3
Florian Forster [Mon, 17 Mar 2008 09:45:23 +0000 (10:45 +0100)]
Merge branch 'pull/collectd-4.3' into collectd-4.3

16 years agosrc/utils_cache.c: Fix the handling of `Persist'.
Florian Forster [Fri, 14 Mar 2008 13:30:02 +0000 (14:30 +0100)]
src/utils_cache.c: Fix the handling of `Persist'.

And reorganized/cleaned up the code a bit.

16 years agocontrib/rrd_filter.px: Added the ability to add (empty) data sources.
Florian Forster [Thu, 13 Mar 2008 17:19:48 +0000 (18:19 +0100)]
contrib/rrd_filter.px: Added the ability to add (empty) data sources.

16 years agosrc/{mbmon,plugin,unixsock}.c: Simple fixes for Solaris 5.8
Florian Forster [Thu, 13 Mar 2008 17:19:00 +0000 (18:19 +0100)]
src/{mbmon,plugin,unixsock}.c: Simple fixes for Solaris 5.8

16 years agocontrib/rrd_filter.px: Added a scale and shift filter.
Florian Forster [Thu, 13 Mar 2008 11:33:50 +0000 (12:33 +0100)]
contrib/rrd_filter.px: Added a scale and shift filter.