summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpackaging/installer/netdata-uninstaller.sh5
-rw-r--r--src/collectors/plugins.d/ndsudo.c3
-rw-r--r--src/daemon/main.c3
-rw-r--r--src/health/health.h2
-rw-r--r--src/health/health_prototypes.c6
5 files changed, 18 insertions, 1 deletions
diff --git a/packaging/installer/netdata-uninstaller.sh b/packaging/installer/netdata-uninstaller.sh
index dcd9d965de..1627ca6b5d 100755
--- a/packaging/installer/netdata-uninstaller.sh
+++ b/packaging/installer/netdata-uninstaller.sh
@@ -723,6 +723,10 @@ trap quit_msg EXIT
info "Stopping a possibly running netdata..."
stop_all_netdata
+if [ "$(uname -s)" = "Darwin" ]; then
+ launchctl unload /Library/LaunchDaemons/com.github.netdata.plist 2>/dev/null
+fi
+
#### REMOVE NETDATA FILES
rm_file /etc/logrotate.d/netdata
rm_file /etc/systemd/system/netdata.service
@@ -741,6 +745,7 @@ rm_file /etc/periodic/daily/netdata-updater
rm_file /etc/cron.daily/netdata-updater
rm_file /etc/cron.d/netdata-updater
rm_file /etc/cron.d/netdata-updater-daily
+rm_file /Library/LaunchDaemons/com.github.netdata.plist
if [ -n "${NETDATA_PREFIX}" ] && [ -d "${NETDATA_PREFIX}" ] && [ "netdata" = "$(basename "$NETDATA_PREFIX")" ] ; then
diff --git a/src/collectors/plugins.d/ndsudo.c b/src/collectors/plugins.d/ndsudo.c
index f5fa78bf58..13e2ccaaa6 100644
--- a/src/collectors/plugins.d/ndsudo.c
+++ b/src/collectors/plugins.d/ndsudo.c
@@ -260,6 +260,9 @@ int main(int argc, char *argv[]) {
return 3;
}
+ char new_path[] = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
+ setenv("PATH", new_path, 1);
+
bool found = false;
char filename[FILENAME_MAX];
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 6b170d81f0..c9602432a2 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -2023,6 +2023,9 @@ int main(int argc, char **argv) {
// setup threads configs
default_stacksize = netdata_threads_init();
+ // musl default thread stack size is 128k, let's set it to a higher value to avoid random crashes
+ if (default_stacksize < 1 * 1024 * 1024)
+ default_stacksize = 1 * 1024 * 1024;
#ifdef NETDATA_INTERNAL_CHECKS
config_set_boolean(CONFIG_SECTION_PLUGINS, "netdata monitoring", true);
diff --git a/src/health/health.h b/src/health/health.h
index 2a1dd6c656..8aca6dcb2b 100644
--- a/src/health/health.h
+++ b/src/health/health.h
@@ -22,7 +22,7 @@ typedef enum __attribute__((packed)) {
#define RRDR_OPTIONS_DATA_SOURCES (RRDR_OPTION_PERCENTAGE|RRDR_OPTION_ANOMALY_BIT)
#define RRDR_OPTIONS_DIMS_AGGREGATION (RRDR_OPTION_DIMS_MIN|RRDR_OPTION_DIMS_MAX|RRDR_OPTION_DIMS_AVERAGE|RRDR_OPTION_DIMS_MIN2MAX)
-#define RRDR_OPTIONS_REMOVE_OVERLAPPING(options) ((options) &= ~(RRDR_OPTIONS_DIMS_AGGREGATION|RRDR_OPTIONS_DATA_SOURCES))
+#define RRDR_OPTIONS_REMOVE_OVERLAPPING(options) ((options) & ~(RRDR_OPTIONS_DIMS_AGGREGATION|RRDR_OPTIONS_DATA_SOURCES))
void health_entry_flags_to_json_array(BUFFER *wb, const char *key, HEALTH_ENTRY_FLAGS flags);
diff --git a/src/health/health_prototypes.c b/src/health/health_prototypes.c
index 8e343bfa1a..ceefbc2225 100644
--- a/src/health/health_prototypes.c
+++ b/src/health/health_prototypes.c
@@ -540,9 +540,15 @@ void health_prototype_copy_config(struct rrd_alert_config *dst, struct rrd_alert
dst->update_every = src->update_every;
+ dst->alert_action_options = src->alert_action_options;
+
dst->dimensions = string_dup(src->dimensions);
dst->time_group = src->time_group;
+ dst->time_group_condition = src->time_group_condition;
+ dst->time_group_value = src->time_group_value;
+ dst->dims_group = src->dims_group;
+ dst->data_source = src->data_source;
dst->before = src->before;
dst->after = src->after;
dst->options = src->options;