Various plugins: Use the IS_TRUE and IS_FALSE macros everywhere.
contextswitches, processes plugins: Don't print an error if number of fields don't match.
Because we pick the required line further down, having lines with more
fields is not illegal anymore.
Thanks to Patrik Weiskircher for noticing :)
Because we pick the required line further down, having lines with more
fields is not illegal anymore.
Thanks to Patrik Weiskircher for noticing :)
df plugin: Implement the "ReportInodes" option.
This option can be used to enable / disable inode statistics collection.
Defaults to "false" for now.
This option can be used to enable / disable inode statistics collection.
Defaults to "false" for now.
df plugin: Implement the "ReportReserved" option.
When enabled, the reserved space is reported separately. The "df_complex"
type is used and the mount point or device name is used as plugin instance
(as it should be) instead of the type instance (which is now needed for
"free", "reserved" and "used").
The INode handling has been split up in the same manner.
When enabled, the reserved space is reported separately. The "df_complex"
type is used and the mount point or device name is used as plugin instance
(as it should be) instead of the type instance (which is now needed for
"free", "reserved" and "used").
The INode handling has been split up in the same manner.
AUTHORS: Added Patrik.
README: Added the contextswitch plugin.
Merge branch 'collectd-4.8'
Conflicts:
src/df.c
Conflicts:
src/df.c
Merge branch 'collectd-4.7' into collectd-4.8
Conflicts:
README
Conflicts:
README
README: Fix order of the curl_json plugin in the list.
README: Fix order of the curl plugin in the list.
contextswitch plugin: Only submit if we actually did find a value.
Also makes parsing more robust (strncmp would allow for garbage after the key,
strtoul does not overflow when given an invalid string).
Also makes parsing more robust (strncmp would allow for garbage after the key,
strtoul does not overflow when given an invalid string).
processes plugin: Don't *abort* if a line has more than two fields.
Added contextswitch plugin (for linux).
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
processes plugin: Improve the error handling.
The fork-rate function now returns ULONG_MAX upon error. The error detection
when using strtoul has been improved (overflow is not the only possible error).
The fork-rate function now returns ULONG_MAX upon error. The error detection
when using strtoul has been improved (overflow is not the only possible error).
Added fork rate collecting to processes plugin.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
df plugin: Fix a typo.
df plugin also collects inode count now.
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Merge branch 'collectd-4.8'
Conflicts:
src/types.db
Conflicts:
src/types.db
Merge branch 'collectd-4.7' into collectd-4.8
src/types.db: Replace spaces with tabs.
src/types.db: Replace spaces with tabs.
src/plugin.c: plugin_log: Print to stderr if no log plugin has been loaded.
Merge commit 'octo/master'
Added new netapp data types to types.db.
include netinet/in.h for sockaddr_in on FreeBSD
Fixes:
common.c: In function 'service_name_to_port_number':
common.c:1112: error: dereferencing pointer to incomplete type
common.c:1119: error: dereferencing pointer to incomplete type
Fixes:
common.c: In function 'service_name_to_port_number':
common.c:1112: error: dereferencing pointer to incomplete type
common.c:1119: error: dereferencing pointer to incomplete type
unixsock plugin: Fix a (well hidden) race condition.
Within the client handling thread, fdopen is called twice on the file
descriptor passed to the thread. Later those file handles are closed like:
fclose (fhin);
fclose (fhout);
This is a race condition, because the first call to fclose will close the file
descriptor. The second call to fclose will try the same. Usually, it would fail
silently and all is well. On a busy machine, however, another thread may just
have opened a file or accepted a socket. In that case an arbitrary file
descriptor is closed. If the file descriptor is opened yet again fast enough,
data may even end up in a totally wrong location.
As a work-around the file descriptor is not dup'ed so each fdopen operates on
its own file descriptor. As an alternative the "r+" mode and a single file
handle may be suitable, too.
Many thanks to Sven Trenkel for pointing me into the right directioin :)
Within the client handling thread, fdopen is called twice on the file
descriptor passed to the thread. Later those file handles are closed like:
fclose (fhin);
fclose (fhout);
This is a race condition, because the first call to fclose will close the file
descriptor. The second call to fclose will try the same. Usually, it would fail
silently and all is well. On a busy machine, however, another thread may just
have opened a file or accepted a socket. In that case an arbitrary file
descriptor is closed. If the file descriptor is opened yet again fast enough,
data may even end up in a totally wrong location.
As a work-around the file descriptor is not dup'ed so each fdopen operates on
its own file descriptor. As an alternative the "r+" mode and a single file
handle may be suitable, too.
Many thanks to Sven Trenkel for pointing me into the right directioin :)
Merge branch 'st/netapp'
netapp plugin: Subtract snap_norm_used from norm_used in any case.
collectd.conf(5): Updated the “GetSnapshot” entry.
netapp plugin: Use the “volume-” prefix for all volume related data.
netapp plugin: Create a notification when a volume goes offline or comes back.
netapp plugin: cna_handle_volume_snap_usage: Explain what's going on in a comment.
Fixed VolumePerf data collection.
Merge commit 'remotes/octo/st/netapp' into st/netapp
Added snapshot usage stats.
Build system: Link the netapp plugin with libnetapp.
D'oh! ;)
D'oh! ;)
netapp plugin: Don't access a struct after freeing it.
Thanks Sven :)
Thanks Sven :)
netapp plugin: Add a shutdown callback.
netapp plugin: free_host_config: Close the connection if applicable.
collectd.conf(5): Document the “Interval” option in all blocks of the netapp plugin.
netapp plugin: Rename the “Capacity” and “Snapshot” options again.
They've been renamed to “GetCapacity” and “GetSnapshot” so the
names used within the “VolumeUsage” block are the same as the names
used elsewhere in the plugin.
They've been renamed to “GetCapacity” and “GetSnapshot” so the
names used within the “VolumeUsage” block are the same as the names
used elsewhere in the plugin.
netapp plugin: Remove left-over references to volume_t.
netapp plugin: Remove all left-over references to cfg_service_t.
netapp plugin: Refactor the VolumePerf collection.
Same procedure one last time. The “GetVolumePerfData” block has been
renamed to “VolumePerf”. The “Get{IO,Ops,Latency}” options now
use ignore lists, too. Appropriate “IgnoreSelected{IO,Ops,Latency}”
options have been introduced.
Same procedure one last time. The “GetVolumePerfData” block has been
renamed to “VolumePerf”. The “Get{IO,Ops,Latency}” options now
use ignore lists, too. Appropriate “IgnoreSelected{IO,Ops,Latency}”
options have been introduced.
netapp plugin: Set the HAVE_VOLUME_USAGE_SIS_SAVED after determining the value.
netapp plugin: Fix handling of the SIS value.
netapp plugin: Refactored volume usage statistics.
Much of this is like disk, wafl and system statistics before. The
“GetVolumeData” has been renamed to “VolumeUsage” and the
“GetDiskUtil” and “GetSnapUtil” options have been changed, too. The
configuration now looks like this:
<VolumeUsage>
Capacity "vol0"
Capacity "vol1"
IgnoreSelectedCapacity false
Snapshot "vol1"
Snapshot "vol3"
IgnoreSelectedSnapshot false
</VolumeUsage>
The code now uses to "ignore lists" to check whether capacity and/or
snapshot information should be collected for a volume. This means the
order in which volumes are listed no longer matters and than you can
use such advanced options as selecting volumes via regular expressions.
Much of this is like disk, wafl and system statistics before. The
“GetVolumeData” has been renamed to “VolumeUsage” and the
“GetDiskUtil” and “GetSnapUtil” options have been changed, too. The
configuration now looks like this:
<VolumeUsage>
Capacity "vol0"
Capacity "vol1"
IgnoreSelectedCapacity false
Snapshot "vol1"
Snapshot "vol3"
IgnoreSelectedSnapshot false
</VolumeUsage>
The code now uses to "ignore lists" to check whether capacity and/or
snapshot information should be collected for a volume. This means the
order in which volumes are listed no longer matters and than you can
use such advanced options as selecting volumes via regular expressions.
Fixed NULL pointer bug.
netapp plugin: Inform the user when he screwed up the disk and system blocks, too.
netapp plugin: Print a notice if all WAFL values have been disabled.
This message is printed if the user did supply a <WAFL /> block but
then disabled all supported values. WAFL collection will be disabled
in this case to increase performance.
This message is printed if the user did supply a <WAFL /> block but
then disabled all supported values. WAFL collection will be disabled
in this case to increase performance.
netapp plugin: Document the graceful return if statistics are not wanted.
Unfortunately this behavior isn't exactly obvious.
Unfortunately this behavior isn't exactly obvious.
netapp plugin: Refactor system statistics.
Same procedure as before: Instead of using the “service handler”,
create a cfg_system_t pointer if the user wants system statistics. Then
call cna_query_system instead of the service handler.
The “GetSystemPerfData” block has been renamed to “System” and the
“Multiplier” option has been replaced by the “Interval” option.
Same procedure as before: Instead of using the “service handler”,
create a cfg_system_t pointer if the user wants system statistics. Then
call cna_query_system instead of the service handler.
The “GetSystemPerfData” block has been renamed to “System” and the
“Multiplier” option has been replaced by the “Interval” option.
Merge remote branch 'trenkel/st/netapp' into st/netapp
netapp plugin: Refactor handling of the WAFL data.
Basically the same structure as for the Disk data has been used. The
service handler has been removed and replaced by a call to
“cna_query_wafl”.
The “GetWaflPerfData” block has been renamed to “WAFL” to make the
config file easier to read. The “GetBufCache” config option has been
renamed to “GetBufferCache”. Maybe it should be renamed to
“GetBufferHash”, because that's what the NetApp API uses…?
Basically the same structure as for the Disk data has been used. The
service handler has been removed and replaced by a call to
“cna_query_wafl”.
The “GetWaflPerfData” block has been renamed to “WAFL” to make the
config file easier to read. The “GetBufCache” config option has been
renamed to “GetBufferCache”. Maybe it should be renamed to
“GetBufferHash”, because that's what the NetApp API uses…?
Merge commit 'octo/st/netapp' into st/netapp
netapp plugin: Changed Sven's email address at his request.
netapp plugin: Refactored reading of disk data.
Instead of obscuring control-flow with generic function pointers, use a
clear and easy to read function hierarchy. All disk-related action now
starts with “cna_query_disk (host)” instead of
“service->handler (host, data, service->data)”.
The “GetDiskPerfData”block has been renamed to “Disks”. All those
blocks start with “Get” and most end with “PerfData”, distracting
from the actual relevant part.
The “Multiplier” option has been replaced by the “Interval” option,
which expects a time in seconds rather than a factor which is multiplied
to the host interval.
Instead of obscuring control-flow with generic function pointers, use a
clear and easy to read function hierarchy. All disk-related action now
starts with “cna_query_disk (host)” instead of
“service->handler (host, data, service->data)”.
The “GetDiskPerfData”block has been renamed to “Disks”. All those
blocks start with “Get” and most end with “PerfData”, distracting
from the actual relevant part.
The “Multiplier” option has been replaced by the “Interval” option,
which expects a time in seconds rather than a factor which is multiplied
to the host interval.
netapp plugin: Fix a typo.
Copypasta error in volume usage.
netapp plugin: cna_config_disk: Fix typo.
Preparations for collecting snapshot data,
fixed NULL pointer bug,
removed duplicate error message.
fixed NULL pointer bug,
removed duplicate error message.
netapp plugin: cna_init: Add some comments.
libiptc: Comment out two unused static functions.
Thanks to Sven Trenkel for noticing.
Thanks to Sven Trenkel for noticing.
Don't try to graph operations that aren't licensed
on this filer.
on this filer.
redirect sysctl kern.cp_times stderr > /dev/null
use kern.cp_times sysctl for FreeBSD smp support
define HAVE_SYSCTL_KERN_CP_TIMES if sysctl supports kern.cp_times
netapp plugin: Improved handling host <Host /> blocks.
Use the new "cf_util_get_string" and "cf_util_get_port_number" functions
and free the host configuration if it fails.
The "Login" option has been split up into the "User" and "Password" options.
Use the new "cf_util_get_string" and "cf_util_get_port_number" functions
and free the host configuration if it fails.
The "Login" option has been split up into the "User" and "Password" options.
netapp plugin: Rename set_global_{perf_,}vol_flag.
Hopefully the new names are more descriptive.
Hopefully the new names are more descriptive.
src/configfile.[ch]: Implement "cf_util_get_port_number".
tokyotyrant plugin: Remove no longer needed includes.
src/configfile.[ch]: Implement "cf_util_get_string".
src/common.[ch]: Implement "service_name_to_port_number".
It returns the numeric representation of a service name. The implementation
has been taken from the tokyotyrant plugin.
It returns the numeric representation of a service name. The implementation
has been taken from the tokyotyrant plugin.
netapp plugin: Use the "cna_config_" prefix for configuration handling functions.
netapp plugin: Add a short description to most functions.
The order of some functions has been changed, too.
The order of some functions has been changed, too.
netapp plugin: Add folding markers to all remaining functions.
netapp plugin: Changed some type names.
The structure is roughly like this: Structs that only hold flags to tell
the functions what data to submit are prefixed with "cfg_". Structs that
hold old values for counters are prefixed with "data_".
The "disk_t" type now included flags, too, to indicate valid / invalid
values. The "query_submit_disk_data" function has been changed to honor
those flags.
Various "volume_data" stuff has been renamed to "volume_usage" to make
it more distinguishable from "volume_performance".
Various defines are now also prefixed with "CFG_" to show which flags
are used for configuration and which are used do mark counters valid.
The latter use the "HAVE_" prefix.
The structure is roughly like this: Structs that only hold flags to tell
the functions what data to submit are prefixed with "cfg_". Structs that
hold old values for counters are prefixed with "data_".
The "disk_t" type now included flags, too, to indicate valid / invalid
values. The "query_submit_disk_data" function has been changed to honor
those flags.
Various "volume_data" stuff has been renamed to "volume_usage" to make
it more distinguishable from "volume_performance".
Various defines are now also prefixed with "CFG_" to show which flags
are used for configuration and which are used do mark counters valid.
The latter use the "HAVE_" prefix.
AUTHORS: Add Sven Trenkel.
README: Add the “netapp” plugin.
netapp plugin: Split up “collect_perf_wafl_data” …
… into “query_wafl_data” and “submit_wafl_data”.
Again, flags are used to keep track of valid (old) counters.
… into “query_wafl_data” and “submit_wafl_data”.
Again, flags are used to keep track of valid (old) counters.
netapp plugin: Split “collect_perf_volume_data” …
… into “query_volume_perf_data” and “submit_volume_perf_data”. The
functions use the “per_volume_perf_data_t” struct to pass the counters
from one value to the other. The flags have been extended to include
HAVE_* flags. This way we can reliably determine whether an “old”
counter is valid or not.
… into “query_volume_perf_data” and “submit_volume_perf_data”. The
functions use the “per_volume_perf_data_t” struct to pass the counters
from one value to the other. The flags have been extended to include
HAVE_* flags. This way we can reliably determine whether an “old”
counter is valid or not.
netapp plugin: Use the "config_get_multiplier" to handle the multiplier configuration.
netapp plugin: process_volume_flag: Use the boolean set/unset option here, too.
netapp plugin: set_global_{perf_,}vol_flag: Make set/unset option a boolean.
netapp plugin: Make "config_init" static.
netapp plugin: build_perf_sys_config: Improve error handling.
Check return value of "malloc".
Check return value of "malloc".
netapp plugin: Simplify handling of boolean config options.
netapp plugin: perf_system_data_t: Remove CPU counters.
netapp plugin: collect_perf_system_data: Use the submit functions.
netapp plugin: collect_perf_disk_data: Only query "percentage-saved" if required.
Also, add support for "sis_saved_percent == 100". Probably not useful,
but better than simply skipping that case.
Also, add support for "sis_saved_percent == 100". Probably not useful,
but better than simply skipping that case.
Merge commit 'remotes/trenkel/st/netapp' into st/netapp
netapp plugin: collect_perf_disk_data: Add folding markers.
netapp plugin: collect_volume_data: Use "submit_double".
netapp plugin: Use UINT64_MAX as default value.
Meaning "invalid".
Meaning "invalid".
netapp plugin: Implement "submit_two_counters".
netapp plugin: Removed INFO
netapp plugin: Added “submit” functions and use them in some other functions.
collectd.conf(5): Add markup to the NetApp plugin documentation.
netapp plugin: Convert C++-style comments to C-style comments.
netapp plugin: Adapt to new dispatch interface.