clang-format -style=file -i src/snmp.c
Set timeout initially to 0 per reviewer's suggestion
Adress reviewer's suggestions and add documentation
Address reviewer's suggestions
Add timeout and retry config options for SNMP plugin
Merge pull request #2300 from rpv-tomsk/fix-sread
Remove close() call from sread()
Remove close() call from sread()
Merge remote-tracking branch 'github/pr/2135'
python: Addressed review comments
- Run clang-format
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
- Run clang-format
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Changed return type of sread() and swrite() from 'ssize_t' to 'int'
Functions 'sread()' and 'swrite()', unlike 'read()' and 'write()', does not return the number of bytes actually read/written.
They return error status, which is returned as 'int' type in Collectd code.
Functions 'sread()' and 'swrite()', unlike 'read()' and 'write()', does not return the number of bytes actually read/written.
They return error status, which is returned as 'int' type in Collectd code.
Proper check for `swrite()` return value
The `swrite()` can return positive value from `errno` in case of error.
The `swrite()` can return positive value from `errno` in case of error.
Remove close() call from sread()
The sread() function should not close fd in any cases, that is unexpected.
The sread() function should not close fd in any cases, that is unexpected.
Merge pull request #2024 from rpv-tomsk/master-ipmi
ipmi plugin: Implemented IPMI LAN connection and plugin improved
ipmi plugin: Implemented IPMI LAN connection and plugin improved
ipmi plugin: style
ipmi plugin: Refactored to use c_ipmi_notification_init_()
ipmi plugin: Fixed remarks found while review
memcached: Fix hitratio calculation
If there is no requests, NAN is reported as hitratio.
If there is no hits - zero is reported.
If there is no requests, NAN is reported as hitratio.
If there is no hits - zero is reported.
ipmi plugin: Use cf_util_get_boolean()
memcached: style changes
memcached: Replace gauge_t with derive_t
memcached: Renamed calculate_rate to calculate_ratio_percent
memcached: Fix hitratio reporting
When Collectd calculates 'hitratio', it divides two continiously-grown values of Memcached stats.
As result, reported metric contains the average since Memcached start, which is incorrect.
When Collectd calculates 'hitratio', it divides two continiously-grown values of Memcached stats.
As result, reported metric contains the average since Memcached start, which is incorrect.
memcached: Fix CPU usage reporting
ipmi plugin: Added a define for errors / messages buffer size
ipmi plugin: Notify about IPMI connection state change
ipmi plugin: Improvements
* Do not request reading unless domain is connected
* Report instance name in error messages
* Do not request reading unless domain is connected
* Report instance name in error messages
style
ipmi plugin: Code cleanup
Currently curl_json will barely ignore boolean values in a non erroneous
way, so that if you have an array like this:
you will be able to access the 123 number like
We now rather call our number parser with 0 for false, 1 for true.
way, so that if you have an array like this:
you will be able to access the 123 number like
We now rather call our number parser with 0 for false, 1 for true.
ipmi plugin: Implemented IPMI LAN connection and plugin improved
* Added instances support
* Removed the sensor removal in case of reading errors
* Added the lock to do not request new readings until previous reading is complete
* Disabled SDRs local cache
* Added the check for sensors 'is readable' flag
* Added the check for sensor event reading type (if sensor is discrete or not)
* Added checks for sensor states 'scanning disabled' and 'initial update in progress'
* Changes in error reporting
* Added instances support
* Removed the sensor removal in case of reading errors
* Added the lock to do not request new readings until previous reading is complete
* Disabled SDRs local cache
* Added the check for sensors 'is readable' flag
* Added the check for sensor event reading type (if sensor is discrete or not)
* Added checks for sensor states 'scanning disabled' and 'initial update in progress'
* Changes in error reporting
Merge remote-tracking branch 'github/pr/2469'
Merge remote-tracking branch 'github/pr/2453'
Merge remote-tracking branch 'github/pr/2398'
libcollectdclient/network_parse.c: Ensure memory allocated in parse_values() is always freed.
Shoutout to scan-build for finding this one!
Shoutout to scan-build for finding this one!
Merge remote-tracking branch 'github/pr/2091'
ipmi: Run code through clang-format
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
ipmi: Addressed review comments
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Merge branch 'collectd-5.7'
Merge branch 'collectd-5.6' into collectd-5.7
Bump version to 5.6.3; Update ChangeLog.
Merge remote-tracking branch 'github/pr/2466' into collectd-5.7
intel_pmu: address PR comments
Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
write_prometheus plugin: Don't construct struct sockaddr_in6 manually.
On FreeBSD, the struct is an incomplete type.
On FreeBSD, the struct is an incomplete type.
write_prometheus plugin: Add support for libmicrohttpd < 0.9.0.
0.9.0 was released in July 2010, yet Precise, which we're still building for,
ships 0.4.6. *sigh*
0.9.0 was released in July 2010, yet Precise, which we're still building for,
ships 0.4.6. *sigh*
write_prometheus plugin: Fall back to IPv4 socket if IPv6 fails.
Unfortunately, for libmicrohttpd "dual stack" means "enforce IPv6 (but
allow IPv4, too)". That means that on systems without IPv6,
libmicrohttpd'd initialization fails (when the dual stack flag is set).
To work around this limitation we open the socket ourselves and pass it
to libmicrohttpd to use.
Fixes: #2149
Unfortunately, for libmicrohttpd "dual stack" means "enforce IPv6 (but
allow IPv4, too)". That means that on systems without IPv6,
libmicrohttpd'd initialization fails (when the dual stack flag is set).
To work around this limitation we open the socket ourselves and pass it
to libmicrohttpd to use.
Fixes: #2149
intel_pmu: refactor pmu_event_get_meta function.
Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
ceph plugin: Fix comment typo.
Merge remote-tracking branch 'github/pr/1558'
curl_xml: Use of xmlFree() for values returned by xmlNodeGetContent()
curl_xml: Fixed issues found by review
varnish plugin: Metrics with invalid data source type. #2462
curl_xml: Updated documentation and default configuration
curl_xml: Code cleanup and fixes
* XPath list creation moved from cx_config_add_xpath() to cx_config_add_url()
* Added missing check for ValuesFrom option presence
* Added missing check for strdup() result
* Removed excessive check for option name in cx_config_add_url()
* XPath list creation moved from cx_config_add_xpath() to cx_config_add_url()
* Added missing check for ValuesFrom option presence
* Added missing check for strdup() result
* Removed excessive check for option name in cx_config_add_url()
collectd.spec: bzip2 is the default
curl_xml: Removed excessive operation
curl_xml: Refactored via cx_get_text_node_value()
curl_xml: Code cleanup, clang-format
curl_xml: Renamed 'PluginName' option to unified 'Plugin'.
curl_xml: Changed documentation to match proposed changes.
curl_xml: Add ability to set plugin instance from XML data.
curl_xml: Add ability to set custom plugin name in collected data.
Updating the varnish plugin to use varnish-plus counters (mainly MSE)
Merge branch 'pr/2454'
processes plugin: Format with clang-format.
Also a small manpage formatting tweak.
Also a small manpage formatting tweak.
Merge branch 'collectd-5.7'
Merge branch 'collectd-5.6' into collectd-5.7
use existing type to publish the data
there no such command in make make-dist-bz2
collectd.conf(5): Move towards unifying "string literals".
Merge remote-tracking branch 'github/pr/1707'
dbi plugin: Fix additional memory leaks.
dbi plugin: Fix memory leak.
Some memory was leaked when shutting down.
This is a partial back-port of 5ee365a.
Signed-off-by: Florian Forster <octo@collectd.org>
Some memory was leaked when shutting down.
This is a partial back-port of 5ee365a.
Signed-off-by: Florian Forster <octo@collectd.org>
collectd.conf(5): Move towards unifying "string literals".
Merge remote-tracking branch 'github/pr/1681'
curl_json: Added example configuration for PHP-FPM.
curl_json: Add ability to set custom plugin name in collected data.
fix indention, revert merge failures
add documentation
write_redis_plugin: Add document for MaxSetDuration
This change adds description for MaxSetDuration, which is
introduced at #2440.
This change adds description for MaxSetDuration, which is
introduced at #2440.
Merge remote-tracking branch 'github/pr/2449'
snmp plugin: Use array instead of cycle in res->errstat check
add option to collect the count of active memory maps for linux processes
Merge remote-tracking branch 'github/pr/2452'
Merge remote-tracking branch 'github/pr/2437'
Merge remote-tracking branch 'github/pr/2034'
Updating the varnish plugin
src/utils_match.c: Reset UTILS_MATCH_CF_GAUGE_INC matches to zero (was: NaN)
Fixes: #2448
Fixes: #2448
Merge remote-tracking branch 'github/pr/2451' into collectd-5.6
Merge remote-tracking branch 'github/pr/2388'
snmp plugin: Style fix
Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org>
Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org>
snmp plugin: Fix double free of request PDU
snmp_sess_synch_response() always frees request PDU, in both case of request
error and success. If error condition occurs inside of `while (status == 0)`
loop, double free of `req` happens.
Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org>
snmp_sess_synch_response() always frees request PDU, in both case of request
error and success. If error condition occurs inside of `while (status == 0)`
loop, double free of `req` happens.
Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org>
email, exec and unixsock plugins: Use _SC_GETPW_R_SIZE_MAX.
Fixes: #2208
Fixes: #2208
Proper return value from 'swrite()' when connection has been closed
According to POSIX, errno is set only if 'recv()' returns -1.
When connection has been closed, 'recv()' returns 0 and errno left untouched.
For functions which check errno value after 'swrite()', errno now is set to ECONNRESET,
so they produce correct message 'Connection reset by peer'.
According to POSIX, errno is set only if 'recv()' returns -1.
When connection has been closed, 'recv()' returns 0 and errno left untouched.
For functions which check errno value after 'swrite()', errno now is set to ECONNRESET,
so they produce correct message 'Connection reset by peer'.
memcached: Style fix
snmp plugin: Reworked/fixed res->errstat check
snmp plugin: Added res->errstat check
Collectd does not check for `res->errstat` value after
`snmp_sess_synch_response()` call. In case of error, there is no any data in
`res->variables` actually, but variables are tried to be processed as usual.
Suffix calculation will fail, so all subtrees will be marked as failed, not
only one subtree which caused an error.
The csnmp_instance_list_add() call will fail too, and, as result,
`csnmp_read_table` will finish it's work without any data submission.
The log message like
"snmp plugin: host HOSTNAME: csnmp_instance_list_add failed",
which is put into logs in this case, also has no enough diagnostic data.
Added code to proper check for `res->errstat` and to try to get available data.
Issue: #2291
Collectd does not check for `res->errstat` value after
`snmp_sess_synch_response()` call. In case of error, there is no any data in
`res->variables` actually, but variables are tried to be processed as usual.
Suffix calculation will fail, so all subtrees will be marked as failed, not
only one subtree which caused an error.
The csnmp_instance_list_add() call will fail too, and, as result,
`csnmp_read_table` will finish it's work without any data submission.
The log message like
"snmp plugin: host HOSTNAME: csnmp_instance_list_add failed",
which is put into logs in this case, also has no enough diagnostic data.
Added code to proper check for `res->errstat` and to try to get available data.
Issue: #2291
Merge remote-tracking branch 'github/pr/2446'
msr-index: include GPLv2 header
memcached: Report connections rate
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
Merge remote-tracking branch 'github/pr/1979'
turbostat: better support for mutli packages
If multiple packages are defined, support non-logical core enumeration
by prefixing each core id by its package id
If multiple packages are defined, support non-logical core enumeration
by prefixing each core id by its package id