perl plugin: Use `Perl_newSVpv' rather than `newSVpv'
..cause Sebastian said to do so ;)
..cause Sebastian said to do so ;)
rrdtool plugin: config: Copy `value' before modifying it.
Merge branch 'pull/collectd-4'
build system: Use the prefix given to --with-libperl to set the path to the perl interpreter.
cpu plugin: Return an integer even under FreeBSD.
rrdtool plugin: Add a config option to configure the RRA-timespans at runtime.
configure.in: Bumped version to 4.0.0-rc5
Merge branch 'sh/perl' into collectd-4
configure.in: Print the Perl-version in the configure-summary.
collectd-nagios(1): Added manpage for the Nagios-glue.
ChangeLog: Added a note about the perl plugin.
perl plugin: Use the `BaseName' only if it is non-empty.
configure.in: Bumped version to 4.0.0-rc4
Merge branch 'pull/collectd-4' into collectd-4
ping plugin: Improved error and debug messages.
ping plugin: Fail if no hosts was pinged.
Merge branch 'pull/collectd-4' into collectd-4
perl plugin: Exported plugin_log() to Perl.
This adds the following function to collectd's Perl API:
Collectd::plugin_log:
pass a message to collectd's logging mechanism
arguments:
level - log level
message - log message
The log level should be any of the Collectd::LOG_* constants.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
This adds the following function to collectd's Perl API:
Collectd::plugin_log:
pass a message to collectd's logging mechanism
arguments:
level - log level
message - log message
The log level should be any of the Collectd::LOG_* constants.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
perl plugin: Exported plugin_log() to Perl.
This adds the following function to collectd's Perl API:
Collectd::plugin_log:
pass a message to collectd's logging mechanism
arguments:
level - log level
message - log message
The log level should be any of the Collectd::LOG_* constants.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
This adds the following function to collectd's Perl API:
Collectd::plugin_log:
pass a message to collectd's logging mechanism
arguments:
level - log level
message - log message
The log level should be any of the Collectd::LOG_* constants.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
perl plugin: Added "BaseName" config option.
This option sets the basename of a Perl plugin, i.e. the prefix to its name
when loading the module. It defaults to "Collectd::Plugin".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
This option sets the basename of a Perl plugin, i.e. the prefix to its name
when loading the module. It defaults to "Collectd::Plugin".
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Merge branch 'master' into collectd-4
Conflicts:
configure.in
Conflicts:
configure.in
Merge branch 'collectd-3.11'
Conflicts:
ChangeLog
Conflicts:
ChangeLog
Bumped version to 3.11.4; Updated ChangeLog.
src/utils_dns.c: Include `sys/socket.h' before `net/if_arp.h'.
configure.in: Improved the checks for `net/if_arp.h' and `netinet/if_ether.h'.
configure.in: Added check for `libperl'.
collectd(1): Added documentation for the `perl' plugin.
perl plugin: Added a plugin to embed a Perl interpreter into collectd.
This is the long awaited plugin that makes it possible to write plugins in
plain Perl. This is my first glance at using Perl's C API, so I'm pretty sure
there are some things that could habe been done better. Much of the plugin
could have been written in Perl as well, but I decided not to do so mainly for
exercise reasons ;-)
This plugin still needs a lot of testing. Also comments on the API, code, etc.
are very welcome.
Basically, the plugin is just the glue that's required for Perl plugins to
access collectd's internals. The following API is currently available:
Collectd::plugin_register:
register working functions or data sets with collectd
arguments:
type - type of the registered data
name - name of the plugin
data - reference to the plugin's working subroutine or the data set
Collectd::plugin_unregister:
unregister working functions or data sets from collectd
arguments:
type - type of the data to be unregistered
name - name of the plugin
Collectd::plugin_dispatch_values:
dispatch the collected values to the write functions
arguments:
name - name of the plugin
values - list of values to submit
The plugin type may be any of the following:
Collectd::TYPE_INIT
Collectd::TYPE_READ
Collectd::TYPE_WRITE
Collectd::TYPE_LOG
Collectd::TYPE_SHUTDOWN
Collectd::TYPE_DATASET
A data set is represented as a reference to an array containing hashes with the
following elements:
name => $ds_name (required)
type => $ds_type (default: COUNTER)
min => $ds_min (default: NAN)
max => $ds_max (default: NAN)
A value list is represented as a reference to a hash with the following
elements:
values => [ @values ] (required)
time => $time (default: time(NULL))
host => $hostname (default: hostname_g)
plugin => $plugin (default: "")
plugin_instance => $plugin_instance (default: "")
type_instance => $type_instance (default: "")
The default value is used whenever the element is not defined.
Three arguments are passed to write functions: the plugin's type, the plugin's
data set and the value list.
Two arguments are passed to log functions: the log level and the log message.
In case a function returns false (as interpreted by Perl) the following actions
are taken depending on the function type:
read: the function will be disabled for an increasing amount of time
init: the plugin will be disabled completely
anything else: a warning is logged
In addition to the ones listed above the following constants are also exported:
Collectd::DS_TYPE_COUNTER
Collectd::DS_TYPE_GAUGE
Collectd::LOG_ERR
Collectd::LOG_WARNING
Collectd::LOG_NOTICE
Collectd::LOG_INFO
Collectd::LOG_DEBUG
There is no need to load any Collectd modules - everything is completely
integrated into collectd.
TODO:
add support for accessing the config file
write documentation
add checks for perl to configure
Signed-off-by: Sebastian Harl <sh@tokkee.org>
This is the long awaited plugin that makes it possible to write plugins in
plain Perl. This is my first glance at using Perl's C API, so I'm pretty sure
there are some things that could habe been done better. Much of the plugin
could have been written in Perl as well, but I decided not to do so mainly for
exercise reasons ;-)
This plugin still needs a lot of testing. Also comments on the API, code, etc.
are very welcome.
Basically, the plugin is just the glue that's required for Perl plugins to
access collectd's internals. The following API is currently available:
Collectd::plugin_register:
register working functions or data sets with collectd
arguments:
type - type of the registered data
name - name of the plugin
data - reference to the plugin's working subroutine or the data set
Collectd::plugin_unregister:
unregister working functions or data sets from collectd
arguments:
type - type of the data to be unregistered
name - name of the plugin
Collectd::plugin_dispatch_values:
dispatch the collected values to the write functions
arguments:
name - name of the plugin
values - list of values to submit
The plugin type may be any of the following:
Collectd::TYPE_INIT
Collectd::TYPE_READ
Collectd::TYPE_WRITE
Collectd::TYPE_LOG
Collectd::TYPE_SHUTDOWN
Collectd::TYPE_DATASET
A data set is represented as a reference to an array containing hashes with the
following elements:
name => $ds_name (required)
type => $ds_type (default: COUNTER)
min => $ds_min (default: NAN)
max => $ds_max (default: NAN)
A value list is represented as a reference to a hash with the following
elements:
values => [ @values ] (required)
time => $time (default: time(NULL))
host => $hostname (default: hostname_g)
plugin => $plugin (default: "")
plugin_instance => $plugin_instance (default: "")
type_instance => $type_instance (default: "")
The default value is used whenever the element is not defined.
Three arguments are passed to write functions: the plugin's type, the plugin's
data set and the value list.
Two arguments are passed to log functions: the log level and the log message.
In case a function returns false (as interpreted by Perl) the following actions
are taken depending on the function type:
read: the function will be disabled for an increasing amount of time
init: the plugin will be disabled completely
anything else: a warning is logged
In addition to the ones listed above the following constants are also exported:
Collectd::DS_TYPE_COUNTER
Collectd::DS_TYPE_GAUGE
Collectd::LOG_ERR
Collectd::LOG_WARNING
Collectd::LOG_NOTICE
Collectd::LOG_INFO
Collectd::LOG_DEBUG
There is no need to load any Collectd modules - everything is completely
integrated into collectd.
TODO:
add support for accessing the config file
write documentation
add checks for perl to configure
Signed-off-by: Sebastian Harl <sh@tokkee.org>
README: Updated list of plugins and requirements.
contrib/: Updated the `README' file.
contrib/: Moved the SLES 10.1 files into a seperate subdirectory.
contrib/: Added `init.d-sles10.1' and `spec.sles10.1'.
contrib/: Added `extractDS.px' and `migrate-3-4.px'
src/plugin.c: Ensure that `wait_time' is at least `interval_g'.
nut plugin: Reconnect to the server if the connection is lost.
configure.in: Bumped version to 4.0.0-rc3.
src/plugin.c: Fix compiler-warnings for the Sun CC.
Assigning a (void *) to a function-pointer issues a warning with the Sun CC.
Assigning a (void *) to a function-pointer issues a warning with the Sun CC.
disk, tape plugin: Handle different `kstat_io_t' correctly.
configure.in: Many fixes for Solaris. Especially check the `kstat_io_t'-type for it's members.
Also changed `src/Makefile.am' to link `collectd-nagios' with `libsocket' if needed.
Also changed `src/Makefile.am' to link `collectd-nagios' with `libsocket' if needed.
disk plugin: The member-names of the `kstat_io_t'-struct were fixed.
cpu plugin: Don't use `COLLECT_STEP' anymore.
plugin.c: Take in account that `pthread_t' is a pointer under Darwin.
src/Makefile.am: Added `network.h' to the dependencies for the network plugin.
cpu plugin: Collectd CPU `steal time' as reported by new Linux kernels.
configure.in: Bumped version to 4.0.0-rc1.
Merge branch 'pull/collectd-4' into collectd-4
Merge branch 'pull/collectd-4' into collectd-4
configure/collectd.h: Undef unusable `NAN' from <math.h> before defining our own.
src/liboconfig/Makefile.am: Added `aux_types.h' to the list of dependencies.
Bumped version to 4.0.0-rc0; Updated ChangeLog.
Makefile.am: Removed `collectd.spec' from `EXTRA_DIST'.
AUTHORS: Added `Sjoerd van der Berg'.
plugin.c: Fix an endless loop.
configure: Added `libupsclient' to the library-overview.
nut plugin: Fix building without the `upsclient' library.
Merge branch 'master' into collectd-4
Conflicts:
src/iptables.c
Conflicts:
src/iptables.c
Merge branch 'collectd-3.11'
Conflicts:
ChangeLog
Conflicts:
ChangeLog
Bumped version to 3.11.3; Updated ChangeLog.
Merge branch 'pull/collectd-4' into collectd-4
exec plugin: Updated the documentation and sample configfile.
exec plugin: Send SIGTERM to all running child-processes when exiting.
nut plugin: Added a plugin to query the `upsd' from the `network ups tools'.
Merge branch 'pull/collectd-4' into collectd-4
Implemented `LoadDS' which tells plugins to only register their DataSources.
configure.in: Define `HAVE_LIBKSTAT' when the `kstat'-library exists.
{csv,network} plugin: Improved debug messages.
plugin.c: Implemented parallel reading of values.
network plugin: Implemented cache flush.
rrdtool plugin: Serialise access to the cache and to the function from the librrd.
logfile plugin: Don't use `access' when adding a logfile: It does not work as expected.
Of as advertised in the manpage, for that matter.
Of as advertised in the manpage, for that matter.
network plugin: Don't loop multicast-pakets back to ourself.
Also, some debug-messages have been changed.
Also, some debug-messages have been changed.
network plugin: Implemented duplicate detection and a `Forward' option.
The plugin will now only send values received via the network, if the `Forward'
option is set to `true'. Also, duplicates are detected and discarded,
preventing loops, duplicate entries and errors from RRDTool.
The plugin will now only send values received via the network, if the `Forward'
option is set to `true'. Also, duplicates are detected and discarded,
preventing loops, duplicate entries and errors from RRDTool.
unixsock plugin: Use `format_name' rather than the local `cache_alloc_name'.
common.[ch]: Provide a function `format_name' to turn a value-list into its string representation.
{processes,unixsock} plugin: Remove annoying debug messages.
network plugin: Fix shutdown code.
plugin.[ch]: Implemented `plugin_unregister_config'.
sensors plugin: Fix programming mistakes.
syslog plugin: Fixed typo. s/sevetiry/severity/g;
collectd.conf(5): Documented the `iptables', `logfile', `processes', `syslog', and `unixsock' plugin.
collectd.conf.in: Added the `df' and `email' plugins.
logfile plugin: Don't call `access' with `stdout' and `stderr'.
Removed the `LOGFILE' and `COLLECT_{STEP,HEARTBEAT,XFF,RRAROWS}' defines.
network plugin: Fixed quite some bugs.
Added Perl-module `Collectd::Unixsock' to contrib/
unixsock plugin: Fixed many issues. `GETVAL' and `PUTVAL' are now mostly working as intended.
collectd.conf.in: Updated and sorted the example configfile.
interface plugin: Renamed the `traffic' plugin to `interface'.
logfile plugin: Renamed functions and changed error-messages to reflect the renaming.
Removed `utils_debug.[ch]' since debugging output is now handeled by the logging-statements.
logfile plugin: Renamed the `stderr' to `logfile'.
stderr plugin: Add `File' config option to log to a certain file.
Also make the actual log-action thread-safe.
Also make the actual log-action thread-safe.
stderr plugin: Added "stderr" plugin to log to stderr.
This plugin is heavily based on Florian's syslog plugin.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
This plugin is heavily based on Florian's syslog plugin.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
plugin.c: Check if `list_log' is not NULL.
Replace all calls to `strerror' with `sstrerror'
.. which internally uses the thread-safe function `strerror_r'.
.. which internally uses the thread-safe function `strerror_r'.
iptables plugin: Remove `iptables_init' because it's not needed..
..and it causes the build to fail when `libiptc' wasn't present.
..and it causes the build to fail when `libiptc' wasn't present.
src/collectd.h: Don't load `syslog.h'.
Plugins should use `plugin_log' now.
Plugins should use `plugin_log' now.
Replace all syslog-calls with one of the new logging-macros.
iptables plugin: Converted to the new plugin interface.
Merge branch 'master' into collectd-4
Conflicts:
configure.in
Conflicts:
configure.in