nginx plugin: Use `strtok_r' instead of `strtok'.
wireless plugins: Interpret noise/power values >100 as (dBm + 256).
Hi list,
I currently develop an embedded statistics application and web interface
for OpenWrt Kamikaze based on Collectd and RRDTool.
While working with the wireless plugin I noticed some incompatibilities
with different drivers, namely the Broadcom proprietary driver and madwifi.
/proc/net/wireless on Broadcom:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 18
wl0: 0000 2. 179. 163. 0 0 8040 723 0 0
With the Broadcom proprietary driver you get the actual signal and noise
dbm units by substracting 255 from the values in /proc:
level: 179 - 255 = -76 dBm
noise: 163 - 255 = -92 dBm
/proc/net/wireless on Atheros SoC:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
ath0: 0004 21. -73. -94. 21841 0 0 0 0 0
Madwifi writes the actual dBm values into /proc.
So we have (at least for now) three possible types of values:
( x > 0.0 && x <= 100.0 ) current implementation: x is in percent (?)
( x > 100.0 && x <= 255.0 ) broadcom: range intersects with percents but
values below 100.0 (100.0 - 255.0 = -155.0 dBm)
are somewhat unlikely to occur
( x < 0.0 ) atheros: value is already in dBm
A patch which implements the two additional possibilities in collectd's wireless
plugin can be found in the OpenWrt Trac:
https://dev.openwrt.org/browser/packages/utils/collectd/patches/200-wireless-compat.patch
The patch was made against v4.4.0 of collectd but should work with v4.4.1 too.
It would be nice to have this in the next release or so :)
Greetings,
JoW
Hi list,
I currently develop an embedded statistics application and web interface
for OpenWrt Kamikaze based on Collectd and RRDTool.
While working with the wireless plugin I noticed some incompatibilities
with different drivers, namely the Broadcom proprietary driver and madwifi.
/proc/net/wireless on Broadcom:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 18
wl0: 0000 2. 179. 163. 0 0 8040 723 0 0
With the Broadcom proprietary driver you get the actual signal and noise
dbm units by substracting 255 from the values in /proc:
level: 179 - 255 = -76 dBm
noise: 163 - 255 = -92 dBm
/proc/net/wireless on Atheros SoC:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
ath0: 0004 21. -73. -94. 21841 0 0 0 0 0
Madwifi writes the actual dBm values into /proc.
So we have (at least for now) three possible types of values:
( x > 0.0 && x <= 100.0 ) current implementation: x is in percent (?)
( x > 100.0 && x <= 255.0 ) broadcom: range intersects with percents but
values below 100.0 (100.0 - 255.0 = -155.0 dBm)
are somewhat unlikely to occur
( x < 0.0 ) atheros: value is already in dBm
A patch which implements the two additional possibilities in collectd's wireless
plugin can be found in the OpenWrt Trac:
https://dev.openwrt.org/browser/packages/utils/collectd/patches/200-wireless-compat.patch
The patch was made against v4.4.0 of collectd but should work with v4.4.1 too.
It would be nice to have this in the next release or so :)
Greetings,
JoW
disk plugin: Use correct name under Linux 2.4
Hello everybody.
I have noticed that disk graphs are displayed by collection.cgi as
disk (71687000) instead of the correct disk name on 2.4.x linux
kernels.
The problem seems caused by the fact that the position of disk name of
/proc/partitions (used in 2.4 kernels) differs from /proc/diskstats
(used in 2.6 kernels).
I include as attachment a patch that seems to fix this problem.
I have tested it on 2.4.20 (REDHAT 9) and 2.6.24.4 (Debian Sid) systems.
Thanks a lot for Collectd. It is a _very_ useful program.
Alessandro
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Hello everybody.
I have noticed that disk graphs are displayed by collection.cgi as
disk (71687000) instead of the correct disk name on 2.4.x linux
kernels.
The problem seems caused by the fact that the position of disk name of
/proc/partitions (used in 2.4 kernels) differs from /proc/diskstats
(used in 2.6 kernels).
I include as attachment a patch that seems to fix this problem.
I have tested it on 2.4.20 (REDHAT 9) and 2.6.24.4 (Debian Sid) systems.
Thanks a lot for Collectd. It is a _very_ useful program.
Alessandro
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
network plugin: Don't blindly re-initialize everything in the init callback.
Under Solaris the init functions are called every time the kstat chain
is updated. Since, among other things, send_buffer_fill was set to zero
here, the plugin ``forgot'' about values.
Thank you very much to Eric LeBlanc for debugging this issue.
Under Solaris the init functions are called every time the kstat chain
is updated. Since, among other things, send_buffer_fill was set to zero
here, the plugin ``forgot'' about values.
Thank you very much to Eric LeBlanc for debugging this issue.
src/collectd.h: Try even harder to determine endianess.
NexentaStor 1.0.2 doesn't have <endian.h>, for example :/
NexentaStor 1.0.2 doesn't have <endian.h>, for example :/
src/plugin.h: Use __attribute__((format)) for plugin_log.
All __attribute__'s will be automatically set to /**/ when not using the
GNU CC via a macro in src/collectd.h. This way this should be portable.
All __attribute__'s will be automatically set to /**/ when not using the
GNU CC via a macro in src/collectd.h. This way this should be portable.
build.sh: Check for lex and yacc.
Warn the user, if lex(1) and yacc(1) cannot be found. This is not
necessarily an error, as flex(1) or bison(1) might be available.
As suggested by Kevin Trumbull (onebinary) on IRC.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Warn the user, if lex(1) and yacc(1) cannot be found. This is not
necessarily an error, as flex(1) or bison(1) might be available.
As suggested by Kevin Trumbull (onebinary) on IRC.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/liboconfig/oconfig.c: Declare "c_file" as "const char *".
This fixes an "assignment discards qualifiers from pointer target type"
warning. That string stores the name of the config file which is not
going to be modified by liboconfig.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This fixes an "assignment discards qualifiers from pointer target type"
warning. That string stores the name of the config file which is not
going to be modified by liboconfig.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/utils_llist.c: Improved robustness against NULL pointers.
All functions searching for some list entry now return NULL if the given
list equals NULL. Imho, that's the expected behavior. Also, it removes the
need to check the lists from the calling function while that function
usually checks the returned list entry anyway.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
All functions searching for some list entry now return NULL if the given
list equals NULL. Imho, that's the expected behavior. Also, it removes the
need to check the lists from the calling function while that function
usually checks the returned list entry anyway.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
contrib/cussh.pl: Remove left over merge stuff..
How the hell did that get there..?
How the hell did that get there..?
contrib/cussh.pl: Improve parsing of identifiers.
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
configure.in
Conflicts:
configure.in
configure.in: Don't use `test -a'.
Some old/weird versions of sh and/or test don't support the `-a' (`and')
argument.
Some old/weird versions of sh and/or test don't support the `-a' (`and')
argument.
Merge branch 'collectd-4.2' into collectd-4.3
src/collectd.h: Check for `_BYTE_ORDER', too.
Apparently Solaris uses that name..
Apparently Solaris uses that name..
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
configure.in
src/perl.c
Conflicts:
configure.in
src/perl.c
load plugin: Use #if rather than #ifdef.
build system: Remove the COLLECT_LIBIOKIT define.
It isn't used anywhere, so remove it.
It isn't used anywhere, so remove it.
build system: Define HAVE_LIBSTATGRAB if the statgrab library is available.
This define is used in some plugins. Thanks to Oleg King for noticing and
pointing this out and thanks to Sebastian Harl for a first patch which,
unfortunately, doesn't work anymore after changing the configure script.
This define is used in some plugins. Thanks to Oleg King for noticing and
pointing this out and thanks to Sebastian Harl for a first patch which,
unfortunately, doesn't work anymore after changing the configure script.
perl plugin: Work around a compiler warning on FreeBSD.
On FreeBSD, PERL_SYS_INIT3 expands to some expression which triggers a "value
computed is not used" warning by gcc. By telling the compiler to ignore this
value, we can work around this issue. In the long run, this should imho be
fixed in Perl though.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
On FreeBSD, PERL_SYS_INIT3 expands to some expression which triggers a "value
computed is not used" warning by gcc. By telling the compiler to ignore this
value, we can work around this issue. In the long run, this should imho be
fixed in Perl though.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Collectd.pm: Fixed the check for complete function names in plugin_register.
plugin_register() checks if the registered function includes the plugin's
package name. Up to now, this check would also have succeeded if the
function name itself would be prepended by the package name. Now, the
check looks for the separator "::".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
plugin_register() checks if the registered function includes the plugin's
package name. Up to now, this check would also have succeeded if the
function name itself would be prepended by the package name. Now, the
check looks for the separator "::".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.2' into collectd-4.3
Moved <statgrab.h> out of "collectd.h" and into the plugins that actually use the library.
The libstatgrab specific CFLAGS are only passed to these plugins, so that other
plugins may fail if libstatgrab is in a non-standard path.
The libstatgrab specific CFLAGS are only passed to these plugins, so that other
plugins may fail if libstatgrab is in a non-standard path.
Merge branch 'collectd-4.2' into collectd-4.3
Merge branch 'collectd-4.2' of /var/lib/git/collectd into collectd-4.2
build system: Fix another bug in the detection of the statgrab library.
Merge branch 'collectd-4.2' into collectd-4.3
Merge branch 'collectd-4.2' of git://git.verplant.org/collectd into collectd-4.2
Merge branch 'collectd-4.3' of git://git.verplant.org/collectd into collectd-4.3
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
src/Makefile.am
Conflicts:
src/Makefile.am
build system: Use pkg-config to determine flags for the statgrab library.
build system: Don't (accidentally) clear the LDFLAGS when checking for libxml2 or libvirt.
Bumped version to 4.3.3; Updated ChangeLog.
Merge branch 'collectd-4.2' into collectd-4.3
ChangeLog: Add missing notes about _REENTRANT and the sensors plugin.
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bumped version to 4.2.7; Updated ChangeLog.
migrate-3-4.px: Rename vs_processes's data source from "total" to "value".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@verplant.org>
collection.cgi: Updated "vserver" graph definitions to version 4.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@verplant.org>
sensors plugin: Fix the return status of `sensors_snprintf_chip_name'.
The function should return <0 only if an error occured, but in two out of three
branches the initial status of -1 was not modified. This may have rendered the
sensors plugin unusable for some people.
The function should return <0 only if an error occured, but in two out of three
branches the initial status of -1 was not modified. This may have rendered the
sensors plugin unusable for some people.
configure: Build perl bindings only if a perl interpreter is available.
For this purpose a check for the perl interpreter has been added. As the
check for libperl requires a perl interpreter as well (to get the compiler
and linker flags) the perl module will be disabled as well if a perl
interpreter is not available.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@verplant.org>
For this purpose a check for the perl interpreter has been added. As the
check for libperl requires a perl interpreter as well (to get the compiler
and linker flags) the perl module will be disabled as well if a perl
interpreter is not available.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@verplant.org>
Merge branch 'collectd-4.2' into collectd-4.3
build system: Check if strtok_r needs _REENTRANT
Resolves: #8
Resolves: #8
16 years agoMerge branch 'collectd-4.2' of octo@verplant.org:/var/lib/git/collectd into collectd-4.2
Merge branch 'collectd-4.2' of octo@verplant.org:/var/lib/git/collectd into collectd-4.2
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
src/exec.c
Conflicts:
src/exec.c
exec plugin: Close all file descriptors but the one connected to the pipe.
COPYING: Switched to a version with the new address of the FSF.
Merge branch 'collectd-4.2' into collectd-4.3
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.
Newer versions of automake copy the GPLv3 when invoked with ``--add-missing''
which is not what we want.
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
configure.in
src/plugin.c
Conflicts:
configure.in
src/plugin.c
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>
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>
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
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
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.
Why guess the size if you can just adapt to whatever comes in? The memory isn't
freed ever, though.
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.
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.
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.
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.
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>
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>
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>
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>
hddtemp plugin: Prefix all messages with "hddtemp plugin:".
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>
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>
collection.cgi: Added support for "wireless" values.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Bumped version to 4.3.2; Updated ChangeLog.
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
ChangeLog
version-gen.sh
Conflicts:
ChangeLog
version-gen.sh
Bumped version to 4.2.6
ChangeLog: Added changes since 4.2.5.
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
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
Merge branch 'pull/collectd-4.3' into collectd-4.3
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
src/unixsock.c
Conflicts:
src/unixsock.c
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>
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>
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>
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>
Collectd::Unixsock: Fixed some typos.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
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>
This is a backport of 1ca0b79a4274784e4cc15d45e46e2cfa0c2039cf.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
Merge branch 'collectd-4.2' into collectd-4.3
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>
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>
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>
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>
perl plugin: Updated copyright information.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
collectd-unixsock(5): Fixed some typos.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
sensors plugin: Print information why a specific feature is ignored in debug mode.
As requested by Ondřej Válek.
As requested by Ondřej Válek.
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.
Accidentally the wrong value was used as `noise'. This patch fixes it.
Thanks to Ondřej Válek for pointing this out.
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>
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>
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>
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>
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.
Also updated the packager and vendor fields and added the redhat/ subdirectory
to contrib/README.
contrib/redhat/: Added a spec file and affiliated config files.
Merge branch 'collectd-4.2' into collectd-4.3
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>
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>
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>
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>
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>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>
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>
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>
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>
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>
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>
AUTHORS: Speak about `plugins', not `modules'.
Also sorted the plugins and put them all before any other patches.
Also sorted the plugins and put them all before any other patches.
Merge branch 'pull/collectd-4.3' into collectd-4.3
src/utils_{cache,threshold}.c: Fix the concept of failed and missing values.
Apparently I was confused at the time - and still am ;)
Apparently I was confused at the time - and still am ;)
Merge branch 'pull/collectd-4.3' into collectd-4.3
src/utils_cache.c: Fix the handling of `Persist'.
And reorganized/cleaned up the code a bit.
And reorganized/cleaned up the code a bit.
contrib/rrd_filter.px: Added the ability to add (empty) data sources.
src/{mbmon,plugin,unixsock}.c: Simple fixes for Solaris 5.8
contrib/rrd_filter.px: Added a scale and shift filter.