Skip to content

Commit 0dae32b

Browse files
authored
Merge pull request netdata#1161 from ktsaou/master
minor improvements
2 parents 453e1d0 + 122f9cc commit 0dae32b

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

plugins.d/alarm-notify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ fi
364364
# check that we have at least a method enabled
365365
if [ "${SEND_EMAIL}" != "YES" -a "${SEND_PUSHOVER}" != "YES" -a "${SEND_TELEGRAM}" != "YES" -a "${SEND_SLACK}" != "YES" -a "${SEND_PUSHBULLET}" != "YES" ]
366366
then
367-
fatal "All notification methods are disabled. Not sending a notification."
367+
fatal "All notification methods are disabled. Not sending notification to '${role}' for '${name}' = '${value}' of chart '${chart}' for status '${status}'."
368368
fi
369369

370370
# -----------------------------------------------------------------------------

src/plugins_d.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ void *pluginsd_worker_thread(void *arg)
394394
// we have collected something
395395

396396
if(likely(cd->serial_failures <= 10)) {
397-
error("PLUGINSD: '%s' exited with error code %d, but has given useful output in the past (%zu times). Waiting a bit before starting it again.", cd->fullfilename, code, cd->successful_collections);
397+
error("PLUGINSD: '%s' exited with error code %d, but has given useful output in the past (%zu times). %s", cd->fullfilename, code, cd->successful_collections, cd->enabled?"Waiting a bit before starting it again.":"Will not start it again - it is disabled.");
398398
sleep((unsigned int) (cd->update_every * 10));
399399
}
400400
else {
@@ -410,7 +410,7 @@ void *pluginsd_worker_thread(void *arg)
410410
// we have collected nothing so far
411411

412412
if(likely(cd->serial_failures <= 10)) {
413-
error("PLUGINSD: '%s' (pid %d) does not generate useful output but it reports success (exits with 0). Waiting a bit before starting it again.", cd->fullfilename, cd->pid);
413+
error("PLUGINSD: '%s' (pid %d) does not generate useful output but it reports success (exits with 0). %s.", cd->fullfilename, cd->pid, cd->enabled?"Waiting a bit before starting it again.":"Will not start it again - it is disabled.");
414414
sleep((unsigned int) (cd->update_every * 10));
415415
}
416416
else {

src/sys_fs_cgroup.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,20 @@ int find_dir_in_subdirs(const char *base, const char *this, void (*callback)(con
875875
if(*r == '\0') r = "/";
876876
else if (*r == '/') r++;
877877

878+
// do not decent in directories we are not interested
879+
// https://github.com/firehol/netdata/issues/345
880+
int def = 1;
881+
size_t len = strlen(r);
882+
if(len > 5 && !strncmp(&r[len - 5], "-qemu", 5))
883+
def = 0;
884+
878885
// we check for this option here
879886
// so that the config will not have settings
880887
// for leaf directories
881888
char option[FILENAME_MAX + 1];
882889
snprintfz(option, FILENAME_MAX, "search for cgroups under %s", r);
883890
option[FILENAME_MAX] = '\0';
884-
enabled = config_get_boolean("plugin:cgroups", option, 1);
891+
enabled = config_get_boolean("plugin:cgroups", option, def);
885892
}
886893

887894
if(enabled) {

0 commit comments

Comments
 (0)