processes plugin: Updated copyright information.
processes plugin: Let `ps_list_register' fail if any part of the regex stuff fails.
processes plugin: Use STATIC_ARRAY_SIZE instead of numeric value.
processes plugin: Add the `ProcessMatch' option.
Hello!
There is a patch for processes plugin:
1. Added support for libkvm, so processes plugin will be run under
FreeBSD.
2. Added ProcessMatch "NAME" "REGEXP" directive, that adds process
into list of processes that we watch on, but with identification by
Regexp. Rexexp matched against command line, if command line is
empty, than against task name.
3. Changed way we finding processes. Now we match not only first
process, but all processes that match selected criteria. This allows
to make some type of "grouping":
Process "httpd"
Process "dhclient"
ProcessMatch "only-my-perl-program" "perl(.*)my-program\.pl"
ProcessMatch "perl-programs" "^/usr/bin/perl"
ProcessMatch "all-tasks" "(.*)"
Patch is attached to this message.
To octo: it is neede to make some thiungs I have not done:
1. make changes in manpages
2. make changes in config file
3. write rules that users should use when giving names with ProcessMatch
Hello!
There is a patch for processes plugin:
1. Added support for libkvm, so processes plugin will be run under
FreeBSD.
2. Added ProcessMatch "NAME" "REGEXP" directive, that adds process
into list of processes that we watch on, but with identification by
Regexp. Rexexp matched against command line, if command line is
empty, than against task name.
3. Changed way we finding processes. Now we match not only first
process, but all processes that match selected criteria. This allows
to make some type of "grouping":
Process "httpd"
Process "dhclient"
ProcessMatch "only-my-perl-program" "perl(.*)my-program\.pl"
ProcessMatch "perl-programs" "^/usr/bin/perl"
ProcessMatch "all-tasks" "(.*)"
Patch is attached to this message.
To octo: it is neede to make some thiungs I have not done:
1. make changes in manpages
2. make changes in config file
3. write rules that users should use when giving names with ProcessMatch
16 years agonetwork plugin: Documented (in the source) that the network plugin cannot flush indiv...
network plugin: Documented (in the source) that the network plugin cannot flush individual values.
Merge branch 'collectd-4.4'
Merge branch 'collectd-4.3' into collectd-4.4
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/plugin.c: Don't require write callbacks to be present.
plugin_dispatch_values() used to fail, if no write callbacks had been
registered. As that function is used to update the cache and check
threshold as well, this limited the flexibility of collectd setups. Thus,
the error message has been downgraded to a one-time complaint.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
plugin_dispatch_values() used to fail, if no write callbacks had been
registered. As that function is used to update the cache and check
threshold as well, this limited the flexibility of collectd setups. Thus,
the error message has been downgraded to a one-time complaint.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/utils_complain.[ch]: Reintroduced an improved version of the complain mechanism.
This has been asked for a couple of times and since I need it now, here it
goes... ;-) I've done the following modifications to Florian's original
version:
* Renamed "plugin_complain" to "c_complain".
* Renamed "plugin_relief" to "c_release", thus using two verbs which is
more consistent imho.
* Added "c_complain_once" to report a complaint only once.
* Use timestamps instead of counting multiples of "interval_g" to
determine when to report again. Thus, multiple calls to the complain-
functions in one interval are allowed.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This has been asked for a couple of times and since I need it now, here it
goes... ;-) I've done the following modifications to Florian's original
version:
* Renamed "plugin_complain" to "c_complain".
* Renamed "plugin_relief" to "c_release", thus using two verbs which is
more consistent imho.
* Added "c_complain_once" to report a complaint only once.
* Use timestamps instead of counting multiples of "interval_g" to
determine when to report again. Thus, multiple calls to the complain-
functions in one interval are allowed.
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>
collectd-nagios: Updated to the new "unixsock" protocol.
When disambiguating the protocol used by the unixsock plugin in commit
90287c6d240a168fca8d01f8330e2e2263e1f0a4 ("Disambiguated the protocol used
by the unixsock (and other) plugins.") the formatting of the return values
of the "GETVAL" command has been modified. This patch updates
collectd-nagios to handle the new format correctly.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
When disambiguating the protocol used by the unixsock plugin in commit
90287c6d240a168fca8d01f8330e2e2263e1f0a4 ("Disambiguated the protocol used
by the unixsock (and other) plugins.") the formatting of the return values
of the "GETVAL" command has been modified. This patch updates
collectd-nagios to handle the new format correctly.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/{email,ntpd,utils_cmd_getval}.c: Fix formatting errors.
src/utils_threshold.c: Fix wrong output (was `min, min', should be `min, max') in the created notification.
Resolves: #16
Resolves: #16
src/collectd.conf.in: Add sample section for the disk plugin.
Resolves: #15
Resolves: #15
configure: Reformatted the configuration summary.
The name of the "desktop_notification" plugin was too long to fit into the
formatting of the summary printed at the end of the configure run. To keep
the other patch readable, fixing this has been split into an extra patch.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
The name of the "desktop_notification" plugin was too long to fit into the
formatting of the summary printed at the end of the configure run. To keep
the other patch readable, fixing this has been split into an extra patch.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
desktop_notification: Added a plugin to send desktop notifications.
This plugin sends desktop notifications to a notification daemon, as
defined in the Desktop Notification Specification (see
http://www.galago-project.org/specs/notification/).
The timeout after which to expire the displayed notification may be
configured in collectd.conf.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This plugin sends desktop notifications to a notification daemon, as
defined in the Desktop Notification Specification (see
http://www.galago-project.org/specs/notification/).
The timeout after which to expire the displayed notification may be
configured in collectd.conf.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.4'
Merge branch 'collectd-4.3' into collectd-4.4
Conflicts:
contrib/cussh.pl
Conflicts:
contrib/cussh.pl
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.
contrib/cussh.pl: Add the `identifier' option to the `flush' command.
rrdtool plugin: Fix cache key generation from the identifier.
bindings/perl/Collectd/Unixsock.pm: Add the `identifier' option to the `flush' method.
collectd-unixsock(5): Updated the FLUSH documentation.
src/utils_cmd_flush.c: Add the `identifier' option.
Using something like
FLUSH plugin=rrdtool identifier=localhost/cpu-0/cpu-idle
will now only flush the local cpu-0/cpu-idle value, only using the rrdtool
plugin.
This is meant to be used in frontends which want to display up-to-date graphs
but there are too many hosts/rrd files to update them ``live'', i. e. without
caching.
Using something like
FLUSH plugin=rrdtool identifier=localhost/cpu-0/cpu-idle
will now only flush the local cpu-0/cpu-idle value, only using the rrdtool
plugin.
This is meant to be used in frontends which want to display up-to-date graphs
but there are too many hosts/rrd files to update them ``live'', i. e. without
caching.
Merge branch 'collectd-4.4'
collectd, rrdtool plugin: Add flushing of specific identifiers.
The flush callbacks have been changed to expect an (optional)
`const char *instance'. If not NULL, *only* that value should be flushed.
The network and perl plugins don't follow this rule yet, but will in the
not so far future - hopefully ;)
The flush callbacks have been changed to expect an (optional)
`const char *instance'. If not NULL, *only* that value should be flushed.
The network and perl plugins don't follow this rule yet, but will in the
not so far future - hopefully ;)
src/utils_threshold.c: Fix the `Instance' option inside of `Type' blocks.
Thanks to `kyrone' for pointing this out.
Thanks to `kyrone' for pointing this out.
teamspeak2 plugin: Fix out-of-bounds access to two arrays.
Hi,
while updating our T2 SDE (http://www.t2-project.org) package I
noticed some out-of-bounds acces in the teamspeak2 support:
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Hi,
while updating our T2 SDE (http://www.t2-project.org) package I
noticed some out-of-bounds acces in the teamspeak2 support:
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
ChangeLog: Add a note about changes to the threshold handling.
AUTHORS: Added Luke Herberling and Oleg King.
Bumped version to 4.4.0; Updated ChangeLog.
src/collectd.conf.in: Added the new powerdns and tail plugins.
Merge branch 'collectd-4.3' into collectd-4.4
Merge branch 'collectd-4.2' into collectd-4.3
Conflicts:
configure.in
Conflicts:
configure.in
powerdns plugin: Fix some bugs after testing the plugin.
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.
collectd-nagios: Open two different I/O streams for reading and writing.
Full-duplex standard I/O streams are not really supported on sockets.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Full-duplex standard I/O streams are not really supported on sockets.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
daemon: Ignore SIGPIPE.
The default action for the PIPE signal is to terminate the process. This
is not really what we want for collectd, as e.g. a client of the unixsock
plugin (which might even be running without root privileges) could kill
the daemon by closing the socket right after sending a request.
The signal now gets ignored and each I/O function is checked for success.
To simply that, the unixsock's output stream is now configured to be line
buffered, removing the need to call fflush() (which could fail as well and
would have to be checked for success).
While I was at it, I renamed the sigaction struct for SIGCHLD to fit the
coding style used elsewhere in collectd.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
The default action for the PIPE signal is to terminate the process. This
is not really what we want for collectd, as e.g. a client of the unixsock
plugin (which might even be running without root privileges) could kill
the daemon by closing the socket right after sending a request.
The signal now gets ignored and each I/O function is checked for success.
To simply that, the unixsock's output stream is now configured to be line
buffered, removing the need to call fflush() (which could fail as well and
would have to be checked for success).
While I was at it, I renamed the sigaction struct for SIGCHLD to fit the
coding style used elsewhere in collectd.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Add libiptc.
libiptc is not meant to be a public interface by upstream. Debian has thus
removed it from all packages. To be able to use it, we need to take care
of it ourselves.
The configure script now checks, if libiptc is available and uses the
shipped version as a fallback.
The following changes to the libiptc sources were required:
* added copyright headers mentioning the "Netfilter Core Team" as author
* changed libiptc/* includes to * only
* made libiptc.c:standard_target_map() static
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
libiptc is not meant to be a public interface by upstream. Debian has thus
removed it from all packages. To be able to use it, we need to take care
of it ourselves.
The configure script now checks, if libiptc is available and uses the
shipped version as a fallback.
The following changes to the libiptc sources were required:
* added copyright headers mentioning the "Netfilter Core Team" as author
* changed libiptc/* includes to * only
* made libiptc.c:standard_target_map() static
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.4'
Merge branch 'collectd-4.3' into collectd-4.4
Merge branch 'collectd-4.2' into collectd-4.3
collectd.conf(5): Documented the powerdns plugin.
powerdns plugin: Promoted the "not found" message from DEBUG to INFO.
Since users may configure this themselves, they should know when it
doesn't work, so it's not a debug issue anymore.
Since users may configure this themselves, they should know when it
doesn't work, so it's not a debug issue anymore.
powerdns plugin: Fix a bug when checking the configuration options.
powerdns plugin: Trim the default recursor command.
Merge branch 'collectd-4.4' of git://git.verplant.org/collectd into collectd-4.4
16 years agoMerge branch 'collectd-4.4' of octo@verplant.org:/var/lib/git/collectd into collectd-4.4
Merge branch 'collectd-4.4' of octo@verplant.org:/var/lib/git/collectd into collectd-4.4
powerdns plugin: Add defaults that are used if no fields are configured.
build system: Fixed indentation and unconditionally declare CFLAGS and LIBADD.
users plugin: Add support for the statgrab library.
Merge branch 'ok/disk' into collectd-4.4
Conflicts:
configure.in
Conflicts:
configure.in
cpu plugin: Account wait-IO, system and swap separately when using libstatgrab.
disk plugin: Use the DATA_MAX_NAME_LEN define for a fixed-sized buffer.
disk plugin: Add support for the statgrab library.
cpu plugin: Add support for the statgrab library.
powerdns plugin: Replace the `Command' option with the `Collect' option.
The original code let the user define the command to use when querying the
server. This commit changes that and lets the user select the _values_ he's
interested in. Depending on whether an authorative server or a recursor is
collected this
- issues a `SHOW *' and manually greps the interesting pieces, or
- builds a command that requests only the interesting values.
Code compiles but it untested. Manpage not yet updated.
The original code let the user define the command to use when querying the
server. This commit changes that and lets the user select the _values_ he's
interested in. Depending on whether an authorative server or a recursor is
collected this
- issues a `SHOW *' and manually greps the interesting pieces, or
- builds a command that requests only the interesting values.
Code compiles but it untested. Manpage not yet updated.
powerdns plugin: Added all the other recursor stuff to the lookup table.
src/collectd.h: Check for `_BYTE_ORDER', too.
Apparently Solaris uses that name..
Apparently Solaris uses that name..
powerdns plugin: Completed the list of values for the authorative server.
Also added a TODO comment that should be resolved before releasing 4.4.
Also added a TODO comment that should be resolved before releasing 4.4.
Merge branch 'collectd-4.4'
Conflicts:
src/collectd-perl.pod
src/email.c
Conflicts:
src/collectd-perl.pod
src/email.c
Merge branch 'collectd-4.3' into collectd-4.4
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>
email plugin: Simplified code.
While looking at the code for some reason, I decided to simplify and
improve large parts of it. Most notably, standard IO streams are now used
to read from the socket. This allowed to remove large parts of the code
which were used to read and buffer data from the socket so far.
Also among the changes:
* free any allocated memory
* added / improved log messages
* do not require euid == 0 to chown() the socket
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
While looking at the code for some reason, I decided to simplify and
improve large parts of it. Most notably, standard IO streams are now used
to read from the socket. This allowed to remove large parts of the code
which were used to read and buffer data from the socket so far.
Also among the changes:
* free any allocated memory
* added / improved log messages
* do not require euid == 0 to chown() the socket
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
collectd-perl(5): Documented the support for flush callbacks.
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.pm: Renamed the plugin_flush() "name" parameter to "plugins".
This is more consistent with Collectd::Unixsock.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This is more consistent with Collectd::Unixsock.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
perl plugin: Exported plugin_flush*() to Perl.
This adds the following functions to collectd's Perl API which flush the
given plugins using the given interval.
* Collectd::plugin_flush:
This function is a frontend to _flush_one() and _flush_all() and
expects up to two named parameters:
- timeout => $timeout
- name => $name or [ $name1, $name2, ... ]
* Collectd::plugin_flush_one:
This function expects exactly two parameters, namely the timeout and
the plugin name.
* Collectd::plugin_flush_all:
This function expects a single parameter, namely the timeout.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This adds the following functions to collectd's Perl API which flush the
given plugins using the given interval.
* Collectd::plugin_flush:
This function is a frontend to _flush_one() and _flush_all() and
expects up to two named parameters:
- timeout => $timeout
- name => $name or [ $name1, $name2, ... ]
* Collectd::plugin_flush_one:
This function expects exactly two parameters, namely the timeout and
the plugin name.
* Collectd::plugin_flush_all:
This function expects a single parameter, namely the timeout.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
perl plugin, Collectd.pm: Added support to flush Perl plugins.
Perl plugins may now register a callback of type Collectd::TYPE_FLUSH. A
single integer argument, representing the timeout in seconds, will be
passed to such callbacks.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Perl plugins may now register a callback of type Collectd::TYPE_FLUSH. A
single integer argument, representing the timeout in seconds, will be
passed to such callbacks.
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.4'
Conflicts:
src/sensors.c
Conflicts:
src/sensors.c
Merge branch 'collectd-4.3' into collectd-4.4
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.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.
src/types.db: Converted spaces to tabs.
Actually spaces would be nicer, but all lines but one used tabs..
Actually spaces would be nicer, but all lines but one used tabs..
src/plugin.c: Fix a typo.
Unified string handling.
sstrncpy() and the newly added function ssnprintf() are now used all over
the place to make sure strings are null terminated. This removes quite
some duplicate code that was found all over the place and thus fairly
increases overall readability of the code. Also sizeof() is used instead
of hard-coded constants where appropriate to determine the available
space.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
sstrncpy() and the newly added function ssnprintf() are now used all over
the place to make sure strings are null terminated. This removes quite
some duplicate code that was found all over the place and thus fairly
increases overall readability of the code. Also sizeof() is used instead
of hard-coded constants where appropriate to determine the available
space.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Added "type" to the value_list_t struct.
This way, the complete tuple (host, plugin, plugin instance, type, type
instance) is stored in a single data-type which is more straight forward
and allows a more flexible use of that data-type. As a consequence, there
is no longer a need to explicitly pass the type to some functions, most
notably plugin_dispatch_values(), which have been updated in that respect.
The "perl" plugin has also been updated to reflect this change. For
backwards compatibility, plugin_dispatch_values() still accepts a second
argument - however, a warning will be submitted to the daemon in that
case.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This way, the complete tuple (host, plugin, plugin instance, type, type
instance) is stored in a single data-type which is more straight forward
and allows a more flexible use of that data-type. As a consequence, there
is no longer a need to explicitly pass the type to some functions, most
notably plugin_dispatch_values(), which have been updated in that respect.
The "perl" plugin has also been updated to reflect this change. For
backwards compatibility, plugin_dispatch_values() still accepts a second
argument - however, a warning will be submitted to the daemon in that
case.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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>