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
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.
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.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.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.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.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>
teamspeak2 plugin: Remove some debug messages.
teamspeak2 plugin: Be case-insensitive when checking for errors.
Apparently the error and okay messages may have different cases..
Apparently the error and okay messages may have different cases..
teamspeak2 plugin: Collect `servers' and `channels', too.
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>
collectd.conf(5): Document the `DataSource' option.
src/utils_threshold.c: Fix a simple typo.
Merge branch 'collectd-4.3'
Merge branch 'collectd-4.2' into collectd-4.3
src/utils_threshold.c: Check all matching thresholds and respect the data source setting.
This commit breaks up the original `ut_check_threshold' function into some
smaller functions which is much easier to read. Also adds some (hopefully)
informative comments that explain what the functions do.
The changes compile but have not yet been tested! Also, the
collectd.conf(5) manpage needs to be updated.
References: #11
This commit breaks up the original `ut_check_threshold' function into some
smaller functions which is much easier to read. Also adds some (hopefully)
informative comments that explain what the functions do.
The changes compile but have not yet been tested! Also, the
collectd.conf(5) manpage needs to be updated.
References: #11
src/utils_threshold.c: Implement configuration of multiple data sources per type.
This is the first part that implements the configuration of multiple data
sources. The part that implements matching will be added later.
This is the first part that implements the configuration of multiple data
sources. The part that implements matching will be added later.
build system: Check if strtok_r needs _REENTRANT
Resolves: #8
Resolves: #8
Merge branch 'sh/teamspeak2'
teamspeak2 plugin: Call `tss2_vserver_gapl' from `tss2_read_vserver'.
This way the file descriptors can be reused and we can assure that the vserver
has been selected.
This way the file descriptors can be reused and we can assure that the vserver
has been selected.
teamspeak2 plugin: Add collection of packet loss.
I added another interesting gauge to the sets of values which get fetched. The
average package loss in percent. I used the percent type from types.db...not
really intuitive when looking at the folders but it works. I also tried to add
something to the manpage...but I wasn't able to test it because the manpages
just don't install with make install...
I added another interesting gauge to the sets of values which get fetched. The
average package loss in percent. I used the percent type from types.db...not
really intuitive when looking at the folders but it works. I also tried to add
something to the manpage...but I wasn't able to test it because the manpages
just don't install with make install...
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 'sh/teamspeak2'
AUTHORS: Added Stefan Hacker.
teamspeak2 plugin: Inform about unknown fields.
Known but uninteresting fields are ignored.
Known but uninteresting fields are ignored.
collectd.conf(5): teamspeak2/Port needs to be a string.
Also corrected a typo in src/collectd.conf.in.
Also corrected a typo in src/collectd.conf.in.
teamspeak2 plugin: Added comments.
I added a few more comments so I could understand it better ;-)
I added a few more comments so I could understand it better ;-)
teamspeak2 plugin: Flush the sending filehandle after writing to it.
The only real Problem I found is that you forgot to flush the outgoing buffer
after using fputs so nothing got sent. I added the fflush but now I'm not
really sure what would happen if sending failed....
The only real Problem I found is that you forgot to flush the outgoing buffer
after using fputs so nothing got sent. I added the fflush but now I'm not
really sure what would happen if sending failed....
collectd.conf(5): Added documentation for the TeamSpeak2 plugin.
teamspeak2 plugin: Introduce and use the `io_octets' and `io_packets' types.
teamspeak2 plugin: Code cleanup.
The changes include:
- Use the ``tss2_'' prefix for all functions.
- Manage the global connection in two central functions rather than distribute
connection handling all over the place.
- Handle ``global'' and ``per server'' statistics in one function.
- Using `getaddrinfo' rather than `inet_addr' to allow for IPv6 connections.
- Some formatting.
The changes include:
- Use the ``tss2_'' prefix for all functions.
- Manage the global connection in two central functions rather than distribute
connection handling all over the place.
- Handle ``global'' and ``per server'' statistics in one function.
- Using `getaddrinfo' rather than `inet_addr' to allow for IPv6 connections.
- Some formatting.
apache, nginx plugins: Added "Verify{Peer,Host}" configuration options.
"VerifyPeer" may be used to disable peer SSL certificate verification and
"VerifyHost" may be used to disable peer host name (as provided by the SSL
certificate's CA or SAN fields) verification.
Using both options is similar to curl's "--insecure" command line
option.
As requested by Joerg Jaspert.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
"VerifyPeer" may be used to disable peer SSL certificate verification and
"VerifyHost" may be used to disable peer host name (as provided by the SSL
certificate's CA or SAN fields) verification.
Using both options is similar to curl's "--insecure" command line
option.
As requested by Joerg Jaspert.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.3'
Conflicts:
src/exec.c
Conflicts:
src/exec.c
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.