src/{exec,types_list,utils_cache}.c: Fix format strings.
ipmi plugin: s/sstrerror_r/sstrerror/.
processes plugin: Use read_file_contents().
src/processes.c: use read_file_contents()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/processes.c: use read_file_contents()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/common.c: Move read_file_contents() to here.
src/common.c: move read_file_contents() from thermal plugin
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/common.c: move read_file_contents() from thermal plugin
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
battery plugin: Use walk_directory().
src/battery.c: use walk_directory()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/battery.c: use walk_directory()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/common.c: Move walk_directory() to here.
src/common.c: Move walk_directory() from thermal plugin
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/common.c: Move walk_directory() from thermal plugin
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
collectd.conf(5), collectd.conf: Added the thermal plugin.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/Makefile.am: Define HAS_BOOL when building the perl plugin.
This works around a bug in Perl, which despite C99 defining the "bool" type
defines its own version of that type unless HAS_BOOL is defined... :-/
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This works around a bug in Perl, which despite C99 defining the "bool" type
defines its own version of that type unless HAS_BOOL is defined... :-/
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Use -Wall -Werror (AM_CFLAGS) when building any module.
A few plugins have to set custom CFLAGS. When using "<plugin>_la_CFLAGS =",
$(AM_CFLAGS) will no longer be used when compiling <plugin> as that resets the
CFLAGS to the empty string. So, in that case, we have to explicitly add
$(AM_CFLAGS) to the custom CFLAGS of that plugin.
After doing so, a couple of problems have been identified which have been
fixed in this patch as well. That includes a possible SEGFAULT in the snmp
plugin which was missing an argument to WARNING().
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
A few plugins have to set custom CFLAGS. When using "<plugin>_la_CFLAGS =",
$(AM_CFLAGS) will no longer be used when compiling <plugin> as that resets the
CFLAGS to the empty string. So, in that case, we have to explicitly add
$(AM_CFLAGS) to the custom CFLAGS of that plugin.
After doing so, a couple of problems have been identified which have been
fixed in this patch as well. That includes a possible SEGFAULT in the snmp
plugin which was missing an argument to WARNING().
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
configure: Include libesmtp in the summary output.
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>
Merge branch 'master' of /var/lib/git/collectd
Conflicts:
src/email.c
Conflicts:
src/email.c
email plugin: Fix a format string.
src/plugin.c: Add assertions to detect if two linked lists are the same.
This will catch errors as just fixed in the exec plugin in the future.
This will catch errors as just fixed in the exec plugin in the future.
exec plugin: Set notify->meta to NULL before copying the list.
Otherwise we will run into a nasty endless loop.
Otherwise we will run into a nasty endless loop.
exec plugin: Added support for notification meta information.
src/plugin.[ch]: Implement `plugin_notification_meta_copy'.
The exec plugin copies the notifications before creating threads, so we need to
be able to copy the meta data to a second notification.
The exec plugin copies the notifications before creating threads, so we need to
be able to copy the meta data to a second notification.
src/utils_threashold.c: Add meta data to the notifications.
The min/max warning/failure values, the current value and name of the
data source are now included in the meta data part of the notification.
The min/max warning/failure values, the current value and name of the
data source are now included in the meta data part of the notification.
src/plugin.[ch]: Use different functions instead of a void pointer.
src/plugin.[ch]: Add `notification meta data' to notification_t.
The plan is to have arbitrary values attached to notifications that user
defined actions can use to get machine parseable values for building
own notification strings or the like.
For example, the threshold checking stuff will (in the near future) add
the current (offending) value as well as the threshold values themselves
to the notification, so that notifying plugins don't need to parse the
(freely formatted) notification string to get that information.
The plan is to have arbitrary values attached to notifications that user
defined actions can use to get machine parseable values for building
own notification strings or the like.
For example, the threshold checking stuff will (in the near future) add
the current (offending) value as well as the threshold values themselves
to the notification, so that notifying plugins don't need to parse the
(freely formatted) notification string to get that information.
Build system: Check for and include <stdbool.h>.
email plugin: Cast a `size_t' to `unsigned long' to make format checking happy.
Merge branch 'master' of /var/lib/git/collectd
thermal plugin: Updated the submit function to the new infrastructure.
src/thermal.c: Changed file encoding from ISO-8859-2 to UTF-8.
thermal plugin: Linux ACPI thermal zone plugin
Hello Florian,
On Wed, Jun 11, 2008 at 02:19:14PM +0200, Florian Forster wrote:
> On Mon, Jun 09, 2008 at 08:33:23PM +0200, Michał Mirosław wrote:
> > Here's temperature monitoring plugin using Linux ACPI thermal zone
> > data from /sys/class/thermal/ or /proc/acpi/thermal_zone/.
> thank you very much for your patch :)
> I have a few (minor) requests for changes though ;)
[cut]
I updated the patch basing on your suggestions. You probably can use
the 'walk_directory()' function in other plugins. And it would be
useful to have some standard functions to use in config callback
like boolean entry parser or common ignorelist entry names/parser.
I could send a patch for some cleanups if nobody is working on that,
yet.
Best Regards,
Michał Mirosław
ACPI thermal zone plugin for collectd 4.4.1
Here's temperature monitoring plugin using Linux ACPI thermal zone
data from /sys/class/thermal/ or /proc/acpi/thermal_zone/. Since
this is the same source of data, only first directory found is used.
Plugin configuration:
<Plugin thermal>
ForceUseProcfs true # default is false (prefer new sysfs interface)
Device "THRM" # default: no selection (include all devices found)
IgnoreSelected true # default is false
</Plugin>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Hello Florian,
On Wed, Jun 11, 2008 at 02:19:14PM +0200, Florian Forster wrote:
> On Mon, Jun 09, 2008 at 08:33:23PM +0200, Michał Mirosław wrote:
> > Here's temperature monitoring plugin using Linux ACPI thermal zone
> > data from /sys/class/thermal/ or /proc/acpi/thermal_zone/.
> thank you very much for your patch :)
> I have a few (minor) requests for changes though ;)
[cut]
I updated the patch basing on your suggestions. You probably can use
the 'walk_directory()' function in other plugins. And it would be
useful to have some standard functions to use in config callback
like boolean entry parser or common ignorelist entry names/parser.
I could send a patch for some cleanups if nobody is working on that,
yet.
Best Regards,
Michał Mirosław
ACPI thermal zone plugin for collectd 4.4.1
Here's temperature monitoring plugin using Linux ACPI thermal zone
data from /sys/class/thermal/ or /proc/acpi/thermal_zone/. Since
this is the same source of data, only first directory found is used.
Plugin configuration:
<Plugin thermal>
ForceUseProcfs true # default is false (prefer new sysfs interface)
Device "THRM" # default: no selection (include all devices found)
IgnoreSelected true # default is false
</Plugin>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.4'
Merge branch 'collectd-4.3' into collectd-4.4
rrdtool plugin: Put files to the front of the update queue when receiving a flush callback.
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.
README: Added the "notify_email" plugin and "libesmtp".
Also, the list of libraries in the "Prerequisites" has been sorted
alphabetically.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Also, the list of libraries in the "Prerequisites" has been sorted
alphabetically.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Renamed the desktop_notification plugin in README and collectd.conf as well.
Also, reordered collectd.conf to restore alphabetical sorting.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Also, reordered collectd.conf to restore alphabetical sorting.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
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.
notify_desktop plugin: Renamed the desktop_notification plugin.
This way it's more consistent with the notify_email plugin.
This way it's more consistent with the notify_email plugin.
notify_email plugin: Renamed some configuration options.
SMTPHost -> SMTPServer
SMTPFrom -> From
SMTPSubject -> Subject
EmailTo -> Recipient
SMTPHost -> SMTPServer
SMTPFrom -> From
SMTPSubject -> Subject
EmailTo -> Recipient
notify_email plugin: Renamed the `emails' variable to `recipients'.
This is much easier to understand.
This is much easier to understand.
notify_email plugin: Some minor code cleanup.
notify_email plugin: Replace all sprintf's with ssnprintf's.
Some other buffer handling has been improved, too.
Some other buffer handling has been improved, too.
notify_email plugin: Add plugin to send notifications via email.
Hello, Collectd.
I wrote a new plugin - notify_email.
This plugin will notify you when threshold conditions are met - one email per
one threshold notify. Email can be sent more then one recipient. Plugin does
this by initiating SMTP session to specified SMTP server (it can also do SMTP
AUTH if needed).
Plugin uses libesmtp library.
Please note:
1. SMTPFrom value sometimes is checked by SMTP server - you
can get failure from SMTP server if you are using not-existent
email.
2. SMTPSubject can contain two '%s' - first for severity and
second for hostname.
3. Hostname used in SMTP connection - is hostname_g, hostname
that is used for all collectd host identification. If it cannot
be resolved by internet DNS - you can expect problems when sending
emails.
Patch and new file are included as attach.
Hello, Collectd.
I wrote a new plugin - notify_email.
This plugin will notify you when threshold conditions are met - one email per
one threshold notify. Email can be sent more then one recipient. Plugin does
this by initiating SMTP session to specified SMTP server (it can also do SMTP
AUTH if needed).
Plugin uses libesmtp library.
Please note:
1. SMTPFrom value sometimes is checked by SMTP server - you
can get failure from SMTP server if you are using not-existent
email.
2. SMTPSubject can contain two '%s' - first for severity and
second for hostname.
3. Hostname used in SMTP connection - is hostname_g, hostname
that is used for all collectd host identification. If it cannot
be resolved by internet DNS - you can expect problems when sending
emails.
Patch and new file are included as attach.
Merge branch 'collectd-4.4'
Bumped version to 4.4.1; Updated ChangeLog.
ascent plugin: Added "Verify{Peer,Host}" configuration options.
Those options may be used to disable peer SSL certificate or peer host name
verification respectively. The apache and nginx plugins already support those
options, so this makes configuration of plugins using libcurl more consistent.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Those options may be used to disable peer SSL certificate or peer host name
verification respectively. The apache and nginx plugins already support those
options, so this makes configuration of plugins using libcurl more consistent.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Collectd.pm: 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>
perl plugin: Fixed a segfault that appeared in Perl 5.10.
In Perl 5.10, av_clear() (amongst others) does no longer allow NULL for
the passed array object pointer, thus we have to check for it ourselves.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
In Perl 5.10, av_clear() (amongst others) does no longer allow NULL for
the passed array object pointer, thus we have to check for it ourselves.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
perl plugin: Don't abort if initializing the interpreter failed.
There is no reason to shutdown collectd completely just because of some
Perl specific error. An error message is logged in this case, so the user
has means to detect it.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
There is no reason to shutdown collectd completely just because of some
Perl specific error. An error message is logged in this case, so the user
has means to detect it.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/collectd.conf.in: Fix a typo.
The config for the disk plugin was in a block for the `df' plugin.
Thanks to onebinary for pointing this out :)
The config for the disk plugin was in a block for the `df' plugin.
Thanks to onebinary for pointing this out :)
src/processes.c: Remove an unused variable.
Thanks to Oleg for pointing this out :)
Thanks to Oleg for pointing this out :)
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
processes plugin: Remove trailing whitespaces.
processes plugin: Use `strjoin' to create cmdline from argv.
processes plugin: Convert C++-style comments to C89-style.
And remove a newline.
And remove a newline.
processes plugin: ps_list_match: If a regex is configures, only use that regex.
processes plugin: Fixed the config callback to return the right values.
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>
contrib/cussh.pl: Implemented a `HELP' command.
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