diff options
-rw-r--r-- | CHANGELOG.md | 54 | ||||
-rw-r--r-- | exporting/prometheus/prometheus.c | 51 | ||||
-rw-r--r-- | exporting/send_data.c | 2 | ||||
-rw-r--r-- | libnetdata/socket/security.c | 5 | ||||
-rw-r--r-- | packaging/version | 2 |
5 files changed, 49 insertions, 65 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f3a65688..4e826dbc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,30 @@ # Changelog -## [v1.42.2](https://github.com/netdata/netdata/tree/v1.42.2) (2023-08-28) +## [v1.42.3](https://github.com/netdata/netdata/tree/v1.42.3) (2023-09-11) -[Full Changelog](https://github.com/netdata/netdata/compare/v1.42.1...v1.42.2) +[Full Changelog](https://github.com/netdata/netdata/compare/v1.42.2...v1.42.3) **Merged pull requests:** +- improved facets info [\#15936](https://github.com/netdata/netdata/pull/15936) ([ktsaou](https://github.com/ktsaou)) +- fix memory leak on prometheus exporter and code cleanup [\#15929](https://github.com/netdata/netdata/pull/15929) ([ktsaou](https://github.com/ktsaou)) +- systemd-journal and facets: info and sources [\#15928](https://github.com/netdata/netdata/pull/15928) ([ktsaou](https://github.com/ktsaou)) +- systemd-journal and facets improvements [\#15926](https://github.com/netdata/netdata/pull/15926) ([ktsaou](https://github.com/ktsaou)) +- add specific info on how to access the dashboards [\#15925](https://github.com/netdata/netdata/pull/15925) ([hugovalente-pm](https://github.com/hugovalente-pm)) +- Reduce workload during cleanup [\#15919](https://github.com/netdata/netdata/pull/15919) ([stelfrag](https://github.com/stelfrag)) +- Replace \_ with spaces for name variable for ntfy [\#15909](https://github.com/netdata/netdata/pull/15909) ([MAH69IK](https://github.com/MAH69IK)) +- python.d/sensors: Increase voltage limits 127 -\> 400 [\#15905](https://github.com/netdata/netdata/pull/15905) ([kylemanna](https://github.com/kylemanna)) +- Assorted Dockerfile cleanup. [\#15902](https://github.com/netdata/netdata/pull/15902) ([Ferroin](https://github.com/Ferroin)) +- Improve shutdown of the metadata thread [\#15901](https://github.com/netdata/netdata/pull/15901) ([stelfrag](https://github.com/stelfrag)) +- bump ui to v6.32.0 [\#15897](https://github.com/netdata/netdata/pull/15897) ([andrewm4894](https://github.com/andrewm4894)) +- Update change-metrics-storage.md [\#15896](https://github.com/netdata/netdata/pull/15896) ([Ancairon](https://github.com/Ancairon)) +- make `anomaly_detection.type_anomaly_rate` stacked [\#15895](https://github.com/netdata/netdata/pull/15895) ([andrewm4894](https://github.com/andrewm4894)) +- Update pfsense.md [\#15894](https://github.com/netdata/netdata/pull/15894) ([Ancairon](https://github.com/Ancairon)) +- Reset the obsolete flag on service thread [\#15892](https://github.com/netdata/netdata/pull/15892) ([MrZammler](https://github.com/MrZammler)) +- Add better recovery for corrupted metadata [\#15891](https://github.com/netdata/netdata/pull/15891) ([stelfrag](https://github.com/stelfrag)) +- Add index to ACLK table to improve update statements [\#15890](https://github.com/netdata/netdata/pull/15890) ([stelfrag](https://github.com/stelfrag)) +- Limit atomic operations for statistics [\#15887](https://github.com/netdata/netdata/pull/15887) ([ktsaou](https://github.com/ktsaou)) +- Properly document issues with installing on hosts without IPv4. [\#15882](https://github.com/netdata/netdata/pull/15882) ([Ferroin](https://github.com/Ferroin)) - allow any field to be a facet [\#15880](https://github.com/netdata/netdata/pull/15880) ([ktsaou](https://github.com/ktsaou)) - Regenerate integrations.js [\#15879](https://github.com/netdata/netdata/pull/15879) ([netdatabot](https://github.com/netdatabot)) - use the newer XXH3 128bits algorithm, instead of the classic XXH128 [\#15878](https://github.com/netdata/netdata/pull/15878) ([ktsaou](https://github.com/ktsaou)) @@ -67,11 +86,17 @@ - Update an oversight on the openSUSE 15.5 packages [\#15781](https://github.com/netdata/netdata/pull/15781) ([tkatsoulas](https://github.com/tkatsoulas)) - Bump openssl version of static builds to 1.1.1v [\#15779](https://github.com/netdata/netdata/pull/15779) ([tkatsoulas](https://github.com/tkatsoulas)) - fix: the cleanup was not performed during the kickstart.sh dry run [\#15775](https://github.com/netdata/netdata/pull/15775) ([ilyam8](https://github.com/ilyam8)) +- don't return `-1` if the socket was closed [\#15771](https://github.com/netdata/netdata/pull/15771) ([moonbreon](https://github.com/moonbreon)) - Increase alert snapshot chunk size [\#15748](https://github.com/netdata/netdata/pull/15748) ([MrZammler](https://github.com/MrZammler)) - Added CentOS-Stream to distros [\#15742](https://github.com/netdata/netdata/pull/15742) ([k0ste](https://github.com/k0ste)) - Unconditionally delete very old models. [\#15720](https://github.com/netdata/netdata/pull/15720) ([vkalintiris](https://github.com/vkalintiris)) - Misc code cleanup [\#15665](https://github.com/netdata/netdata/pull/15665) ([stelfrag](https://github.com/stelfrag)) - Metadata cleanup improvements [\#15462](https://github.com/netdata/netdata/pull/15462) ([stelfrag](https://github.com/stelfrag)) +- Fix build with --disable-https [\#15395](https://github.com/netdata/netdata/pull/15395) ([MrZammler](https://github.com/MrZammler)) + +## [v1.42.2](https://github.com/netdata/netdata/tree/v1.42.2) (2023-08-28) + +[Full Changelog](https://github.com/netdata/netdata/compare/v1.42.1...v1.42.2) ## [v1.42.1](https://github.com/netdata/netdata/tree/v1.42.1) (2023-08-16) @@ -330,7 +355,6 @@ - Add initial tooling for generating integrations.js file. [\#15406](https://github.com/netdata/netdata/pull/15406) ([Ferroin](https://github.com/Ferroin)) - Add linux powercap metrics collector [\#15364](https://github.com/netdata/netdata/pull/15364) ([fhriley](https://github.com/fhriley)) - systemd-journal plugin [\#15363](https://github.com/netdata/netdata/pull/15363) ([ktsaou](https://github.com/ktsaou)) -- Hash table charts [\#15323](https://github.com/netdata/netdata/pull/15323) ([thiagoftsm](https://github.com/thiagoftsm)) ## [v1.41.0](https://github.com/netdata/netdata/tree/v1.41.0) (2023-07-19) @@ -403,30 +427,6 @@ - format the sdr cache filenames [\#15361](https://github.com/netdata/netdata/pull/15361) ([ktsaou](https://github.com/ktsaou)) - fix\(freeipmi\): set sensor state on every reading [\#15360](https://github.com/netdata/netdata/pull/15360) ([ilyam8](https://github.com/ilyam8)) - documentation update for the release of the new UI [\#15359](https://github.com/netdata/netdata/pull/15359) ([hugovalente-pm](https://github.com/hugovalente-pm)) -- Rename multi module yamls to same name but wuth prefix [\#15356](https://github.com/netdata/netdata/pull/15356) ([Ancairon](https://github.com/Ancairon)) -- Update dashboard to version v3.0.1. [\#15352](https://github.com/netdata/netdata/pull/15352) ([netdatabot](https://github.com/netdatabot)) -- Fix installation type command [\#15351](https://github.com/netdata/netdata/pull/15351) ([hugovalente-pm](https://github.com/hugovalente-pm)) -- agent alert notifications redirect [\#15350](https://github.com/netdata/netdata/pull/15350) ([ktsaou](https://github.com/ktsaou)) -- bearer protection - additions [\#15349](https://github.com/netdata/netdata/pull/15349) ([ktsaou](https://github.com/ktsaou)) -- health: fix evaluating expression with `nan` [\#15348](https://github.com/netdata/netdata/pull/15348) ([ilyam8](https://github.com/ilyam8)) -- add missing labels to freeipmi metrics csv [\#15347](https://github.com/netdata/netdata/pull/15347) ([ilyam8](https://github.com/ilyam8)) -- Fix coverity issues [\#15345](https://github.com/netdata/netdata/pull/15345) ([stelfrag](https://github.com/stelfrag)) -- Update libbpf on netdata repo [\#15343](https://github.com/netdata/netdata/pull/15343) ([thiagoftsm](https://github.com/thiagoftsm)) -- bearer improvements [\#15342](https://github.com/netdata/netdata/pull/15342) ([ktsaou](https://github.com/ktsaou)) -- Attempt to more aggressively skip CI jobs on PRs if those jobs are irrelevant to the PR. [\#15341](https://github.com/netdata/netdata/pull/15341) ([Ferroin](https://github.com/Ferroin)) -- Remove availability from required fields on metric level [\#15340](https://github.com/netdata/netdata/pull/15340) ([Ancairon](https://github.com/Ancairon)) -- docs: make the default Docker installation provide the full feature set [\#15339](https://github.com/netdata/netdata/pull/15339) ([ilyam8](https://github.com/ilyam8)) -- add internal stats metrics csv [\#15337](https://github.com/netdata/netdata/pull/15337) ([ilyam8](https://github.com/ilyam8)) -- Add missing required field in schema [\#15335](https://github.com/netdata/netdata/pull/15335) ([Ancairon](https://github.com/Ancairon)) -- Fix compilation on BSD [\#15331](https://github.com/netdata/netdata/pull/15331) ([thiagoftsm](https://github.com/thiagoftsm)) -- alerts\_transitions outputs hostnames and items statistics [\#15329](https://github.com/netdata/netdata/pull/15329) ([ktsaou](https://github.com/ktsaou)) -- Use spinlock in host and chart [\#15328](https://github.com/netdata/netdata/pull/15328) ([stelfrag](https://github.com/stelfrag)) -- multi-threaded version of freeipmi.plugin [\#15327](https://github.com/netdata/netdata/pull/15327) ([ktsaou](https://github.com/ktsaou)) -- Single module schema, add required properties [\#15326](https://github.com/netdata/netdata/pull/15326) ([Ancairon](https://github.com/Ancairon)) -- Fix coverity issue 394862 - Argument cannot be negative [\#15324](https://github.com/netdata/netdata/pull/15324) ([stelfrag](https://github.com/stelfrag)) -- Rename log Macros \(debug\) [\#15322](https://github.com/netdata/netdata/pull/15322) ([thiagoftsm](https://github.com/thiagoftsm)) -- bearer authorization API [\#15321](https://github.com/netdata/netdata/pull/15321) ([ktsaou](https://github.com/ktsaou)) -- local-listeners: use host prefix in read\_cmdline [\#15320](https://github.com/netdata/netdata/pull/15320) ([ilyam8](https://github.com/ilyam8)) ## [v1.40.1](https://github.com/netdata/netdata/tree/v1.40.1) (2023-06-27) diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c index 90be5d455..2d0611fdf 100644 --- a/exporting/prometheus/prometheus.c +++ b/exporting/prometheus/prometheus.c @@ -330,16 +330,11 @@ void format_host_labels_prometheus(struct instance *instance, RRDHOST *host) * Format host labels for the Prometheus exporter * We are using a structure instead a direct buffer to expand options quickly. * - * @param labels_buffer is the buffer used to add labels. + * @param data is the buffer used to add labels. */ -struct format_prometheus_chart_label_callback { - BUFFER *labels_buffer; - const char *labels_prefix; -}; - static int format_prometheus_chart_label_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data) { - struct format_prometheus_chart_label_callback *d = (struct format_prometheus_chart_label_callback *)data; + BUFFER *wb = data; (void)ls; @@ -352,26 +347,10 @@ static int format_prometheus_chart_label_callback(const char *name, const char * prometheus_name_copy(k, name, PROMETHEUS_ELEMENT_MAX); prometheus_label_copy(v, value, PROMETHEUS_ELEMENT_MAX); - if (*k && *v) { - buffer_sprintf(d->labels_buffer, ",%s=\"%s\"", k, v); - } - return 1; -} + if (*k && *v) + buffer_sprintf(wb, ",%s=\"%s\"", k, v); -void format_chart_labels_prometheus(struct format_prometheus_chart_label_callback *plabel, - const char *chart, - const char *family, - const char *dim, - RRDSET *st) -{ - if (likely(plabel->labels_buffer)) - buffer_reset(plabel->labels_buffer); - else { - plabel->labels_buffer = buffer_create(1024, NULL); - } - buffer_sprintf(plabel->labels_buffer, "%1$schart=\"%2$s\",%1$sdimension=\"%3$s\",%1$sfamily=\"%4$s\"", plabel->labels_prefix, chart, dim, family); - - rrdlabels_walkthrough_read(st->rrdlabels, format_prometheus_chart_label_callback, plabel); + return 1; } struct host_variables_callback_options { @@ -519,9 +498,6 @@ static void generate_as_collected_prom_metric(BUFFER *wb, int prometheus_collector, DICTIONARY *chart_labels) { - struct format_prometheus_chart_label_callback local_label; - local_label.labels_buffer = wb; - buffer_sprintf(wb, "%s_%s", p->prefix, p->context); if (!homogeneous) @@ -534,7 +510,7 @@ static void generate_as_collected_prom_metric(BUFFER *wb, buffer_sprintf(wb, ",%sfamily=\"%s\"", p->labels_prefix, p->family); - rrdlabels_walkthrough_read(chart_labels, format_prometheus_chart_label_callback, &local_label); + rrdlabels_walkthrough_read(chart_labels, format_prometheus_chart_label_callback, wb); buffer_sprintf(wb, "%s} ", p->labels); @@ -626,10 +602,8 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus( // for each chart RRDSET *st; - struct format_prometheus_chart_label_callback plabels = { - .labels_buffer = NULL, - .labels_prefix = instance->config.label_prefix, - }; + BUFFER *plabels_buffer = buffer_create(0, NULL); + const char *plabels_prefix = instance->config.label_prefix; STRING *prometheus = string_strdupz("prometheus"); rrdset_foreach_read(st, host) { @@ -765,7 +739,9 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus( (output_options & PROMETHEUS_OUTPUT_NAMES && rd->name) ? rrddim_name(rd) : rrddim_id(rd), PROMETHEUS_ELEMENT_MAX); - format_chart_labels_prometheus(&plabels, chart, family, dimension, st); + buffer_flush(plabels_buffer); + buffer_sprintf(plabels_buffer, "%1$schart=\"%2$s\",%1$sdimension=\"%3$s\",%1$sfamily=\"%4$s\"", plabels_prefix, chart, dimension, family); + rrdlabels_walkthrough_read(st->rrdlabels, format_prometheus_chart_label_callback, plabels_buffer); if (unlikely(output_options & PROMETHEUS_OUTPUT_HELP)) buffer_sprintf( @@ -792,7 +768,7 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus( context, units, suffix, - buffer_tostring(plabels.labels_buffer), + buffer_tostring(plabels_buffer), labels, value, last_time * MSEC_PER_SEC); @@ -805,7 +781,7 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus( context, units, suffix, - buffer_tostring(plabels.labels_buffer), + buffer_tostring(plabels_buffer), labels, value); } @@ -817,6 +793,7 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus( } rrdset_foreach_done(st); + buffer_free(plabels_buffer); simple_pattern_free(filter); } diff --git a/exporting/send_data.c b/exporting/send_data.c index 3fec7320d..1b13f837f 100644 --- a/exporting/send_data.c +++ b/exporting/send_data.c @@ -103,6 +103,8 @@ void simple_connector_receive_response(int *sock, struct instance *instance) // failed to receive data if (errno != EAGAIN && errno != EWOULDBLOCK) { netdata_log_error("EXPORTING: cannot receive data from '%s'.", instance->config.destination); + close(*sock); + *sock = -1; } } diff --git a/libnetdata/socket/security.c b/libnetdata/socket/security.c index c1bb76345..3a3a171e5 100644 --- a/libnetdata/socket/security.c +++ b/libnetdata/socket/security.c @@ -234,6 +234,11 @@ ssize_t netdata_ssl_read(NETDATA_SSL *ssl, void *buf, size_t num) { if(unlikely(bytes <= 0)) { int err = SSL_get_error(ssl->conn, bytes); + if (err == SSL_ERROR_ZERO_RETURN) { + ssl->ssl_errno = err; + return 0; + } + if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) { ssl->ssl_errno = err; errno = EWOULDBLOCK; diff --git a/packaging/version b/packaging/version index 0fcb94381..5032c788b 100644 --- a/packaging/version +++ b/packaging/version @@ -1 +1 @@ -v1.42.2 +v1.42.3 |