diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2024-01-05 14:49:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 14:49:42 +0200 |
commit | df8bf668b699f2d7dd696e46bc29f5f55aed8b48 (patch) | |
tree | 36a3923f2b5b500727085061d3de9526199f16b2 /collectors | |
parent | 4ddf842a2f09324f676bd2279abcf7a498971e95 (diff) |
fix excessive "maximum number of cgroups reached" log messages (#16730)
Diffstat (limited to 'collectors')
-rw-r--r-- | collectors/cgroups.plugin/cgroup-discovery.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/collectors/cgroups.plugin/cgroup-discovery.c b/collectors/cgroups.plugin/cgroup-discovery.c index 28c6d96cf9..ede35ed8a2 100644 --- a/collectors/cgroups.plugin/cgroup-discovery.c +++ b/collectors/cgroups.plugin/cgroup-discovery.c @@ -351,6 +351,7 @@ static inline void discovery_find_cgroup_in_dir_callback(const char *dir) { if (!dir || !*dir) { dir = "/"; } + netdata_log_debug(D_CGROUP, "examining cgroup dir '%s'", dir); struct cgroup *cg = discovery_cgroup_find(dir); @@ -360,14 +361,15 @@ static inline void discovery_find_cgroup_in_dir_callback(const char *dir) { } if (cgroup_root_count >= cgroup_root_max) { - collector_info("CGROUP: maximum number of cgroups reached (%d). Not adding cgroup '%s'", cgroup_root_count, dir); + nd_log_limit_static_global_var(erl, 3600, 0); + nd_log_limit(&erl, NDLS_COLLECTORS, NDLP_WARNING, "CGROUP: maximum number of cgroups reached (%d). No more cgroups will be added.", cgroup_root_count); return; } if (cgroup_max_depth > 0) { int depth = calc_cgroup_depth(dir); if (depth > cgroup_max_depth) { - collector_info("CGROUP: '%s' is too deep (%d, while max is %d)", dir, depth, cgroup_max_depth); + nd_log_collector(NDLP_DEBUG, "CGROUP: '%s' is too deep (%d, while max is %d)", dir, depth, cgroup_max_depth); return; } } |