diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-10-13 08:12:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 08:12:52 +0300 |
commit | 61767a8a08d089962ff82e45b3e459c8bd05b0c4 (patch) | |
tree | 427ae61c25efa1fc4cbc3d9987e6b7b439fa8e32 /exporting | |
parent | afe1b704857a7307547341a1027c019bbe68e910 (diff) |
allow disabling netdata monitoring section of the dashboard (#13788)
* allow disabling netdata monitoring section of the dashboard
* disable-netdata-stats: Modify eBPF.plugin to disable statistic charts according user selection, by default it is enabled
* Don't send internal statistics for exporting engine if it's disabled.
* Fix global statistics flag initialization
* Don't send internal statistics for checks plugin if it's disabled.
Co-authored-by: Thiago Marques <thiagoftsm@gmail.com>
Co-authored-by: Vladimir Kobal <vlad@prokk.net>
Diffstat (limited to 'exporting')
-rw-r--r-- | exporting/send_internal_metrics.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/exporting/send_internal_metrics.c b/exporting/send_internal_metrics.c index defb8d047d..22188bb902 100644 --- a/exporting/send_internal_metrics.c +++ b/exporting/send_internal_metrics.c @@ -11,6 +11,9 @@ */ void create_main_rusage_chart(RRDSET **st_rusage, RRDDIM **rd_user, RRDDIM **rd_system) { + if (!global_statistics_enabled) + return; + if (*st_rusage && *rd_user && *rd_system) return; @@ -31,6 +34,9 @@ void create_main_rusage_chart(RRDSET **st_rusage, RRDDIM **rd_user, RRDDIM **rd_ */ void send_main_rusage(RRDSET *st_rusage, RRDDIM *rd_user, RRDDIM *rd_system) { + if (!global_statistics_enabled) + return; + struct rusage thread; getrusage(RUSAGE_THREAD, &thread); @@ -52,6 +58,9 @@ void send_main_rusage(RRDSET *st_rusage, RRDDIM *rd_user, RRDDIM *rd_system) */ void send_internal_metrics(struct instance *instance) { + if (!global_statistics_enabled) + return; + struct stats *stats = &instance->stats; // ------------------------------------------------------------------------ |