@cryptotaxi247 / netdata-1 / commits / 15a81d70d

Truncate excessive information from titles for apps and cgroups (#10479)

Vladimir Kobal committed Jan 12, 2021 at 13:56 UTC 15a81d70d6ffa7b950c797ca8f1058b97d32495d
2 files changed +27 -27
collectors/apps.plugin/apps_plugin.c
+5 -5
@@ -3667,13 +3667,13 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type
3667 debug_log_int("%s just added - regenerating charts.", w->name);
3668 }
3669 }
3670 -
3670 +
3671 // nothing more to show
3672 if(!newly_added && show_guest_time == show_guest_time_old) return;
3673
3674 // we have something new to show
3675 // update the charts
3676 - fprintf(stdout, "CHART %s.cpu '' '%s CPU Time (%d%% = %d core%s)' 'percentage' cpu %s.cpu stacked 20001 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every);
3676 + fprintf(stdout, "CHART %s.cpu '' '%s CPU Time (100%% = 1 core)' 'percentage' cpu %s.cpu stacked 20001 %d\n", type, title, type, update_every);
3677 for (w = root; w ; w = w->next) {
3678 if(unlikely(w->exposed))
3679 fprintf(stdout, "DIMENSION %s '' absolute 1 %llu %s\n", w->name, time_factor * RATES_DETAIL / 100, w->hidden ? "hidden" : "");
@@ -3729,20 +3729,20 @@ static void send_charts_updates_to_netdata(struct target *root, const char *type
3729 }
3730 #endif
3731
3732 - fprintf(stdout, "CHART %s.cpu_user '' '%s CPU User Time (%d%% = %d core%s)' 'percentage' cpu %s.cpu_user stacked 20020 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every);
3732 + fprintf(stdout, "CHART %s.cpu_user '' '%s CPU User Time (100%% = 1 core)' 'percentage' cpu %s.cpu_user stacked 20020 %d\n", type, title, type, update_every);
3733 for (w = root; w ; w = w->next) {
3734 if(unlikely(w->exposed))
3735 fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, time_factor * RATES_DETAIL / 100LLU);
3736 }
3737
3738 - fprintf(stdout, "CHART %s.cpu_system '' '%s CPU System Time (%d%% = %d core%s)' 'percentage' cpu %s.cpu_system stacked 20021 %d\n", type, title, (processors * 100), processors, (processors>1)?"s":"", type, update_every);
3738 + fprintf(stdout, "CHART %s.cpu_system '' '%s CPU System Time (100%% = 1 core)' 'percentage' cpu %s.cpu_system stacked 20021 %d\n", type, title, type, update_every);
3739 for (w = root; w ; w = w->next) {
3740 if(unlikely(w->exposed))
3741 fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, time_factor * RATES_DETAIL / 100LLU);
3742 }
3743
3744 if(show_guest_time) {
3745 - fprintf(stdout, "CHART %s.cpu_guest '' '%s CPU Guest Time (%d%% = %d core%s)' 'percentage' cpu %s.cpu_system stacked 20022 %d\n", type, title, (processors * 100), processors, (processors > 1) ? "s" : "", type, update_every);
3745 + fprintf(stdout, "CHART %s.cpu_guest '' '%s CPU Guest Time (100%% = 1 core)' 'percentage' cpu %s.cpu_system stacked 20022 %d\n", type, title, type, update_every);
3746 for (w = root; w; w = w->next) {
3747 if(unlikely(w->exposed))
3748 fprintf(stdout, "DIMENSION %s '' absolute 1 %llu\n", w->name, time_factor * RATES_DETAIL / 100LLU);
collectors/cgroups.plugin/sys_fs_cgroup.c
+22 -22
@@ -2103,7 +2103,7 @@ void update_systemd_services_charts(
2103 if(likely(do_cpu)) {
2104 if(unlikely(!st_cpu)) {
2105 char title[CHART_TITLE_MAX + 1];
2106 - snprintfz(title, CHART_TITLE_MAX, "Systemd Services CPU utilization (%d%% = %d core%s)", (processors * 100), processors, (processors > 1) ? "s" : "");
2106 + snprintfz(title, CHART_TITLE_MAX, "Systemd Services CPU utilization (100%% = 1 core)");
2107
2108 st_cpu = rrdset_create_localhost(
2109 "services"
@@ -3046,7 +3046,7 @@ void update_cgroup_charts(int update_every) {
3046
3047 if(likely(cg->cpuacct_stat.updated && cg->cpuacct_stat.enabled == CONFIG_BOOLEAN_YES)) {
3048 if(unlikely(!cg->st_cpu)) {
3049 - snprintfz(title, CHART_TITLE_MAX, "CPU Usage (%d%% = %d core%s) for cgroup %s", (processors * 100), processors, (processors > 1) ? "s" : "", cg->chart_title);
3049 + snprintfz(title, CHART_TITLE_MAX, "CPU Usage (100%% = 1 core)");
3050
3051 cg->st_cpu = rrdset_create_localhost(
3052 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3119,7 +3119,7 @@ void update_cgroup_charts(int update_every) {
3119 rrdsetvar_custom_chart_variable_set(cg->chart_var_cpu_limit, value);
3120
3121 if(unlikely(!cg->st_cpu_limit)) {
3122 - snprintfz(title, CHART_TITLE_MAX, "CPU Usage within the limits for cgroup %s", cg->chart_title);
3122 + snprintfz(title, CHART_TITLE_MAX, "CPU Usage within the limits");
3123
3124 cg->st_cpu_limit = rrdset_create_localhost(
3125 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3174,7 +3174,7 @@ void update_cgroup_charts(int update_every) {
3174 unsigned int i;
3175
3176 if(unlikely(!cg->st_cpu_per_core)) {
3177 - snprintfz(title, CHART_TITLE_MAX, "CPU Usage (%d%% = %d core%s) Per Core for cgroup %s", (processors * 100), processors, (processors > 1) ? "s" : "", cg->chart_title);
3177 + snprintfz(title, CHART_TITLE_MAX, "CPU Usage (100%% = 1 core) Per Core");
3178
3179 cg->st_cpu_per_core = rrdset_create_localhost(
3180 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3210,7 +3210,7 @@ void update_cgroup_charts(int update_every) {
3210
3211 if(likely(cg->memory.updated_detailed && cg->memory.enabled_detailed == CONFIG_BOOLEAN_YES)) {
3212 if(unlikely(!cg->st_mem)) {
3213 - snprintfz(title, CHART_TITLE_MAX, "Memory Usage for cgroup %s", cg->chart_title);
3213 + snprintfz(title, CHART_TITLE_MAX, "Memory Usage");
3214
3215 cg->st_mem = rrdset_create_localhost(
3216 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3270,7 +3270,7 @@ void update_cgroup_charts(int update_every) {
3270 rrdset_done(cg->st_mem);
3271
3272 if(unlikely(!cg->st_writeback)) {
3273 - snprintfz(title, CHART_TITLE_MAX, "Writeback Memory for cgroup %s", cg->chart_title);
3273 + snprintfz(title, CHART_TITLE_MAX, "Writeback Memory");
3274
3275 cg->st_writeback = rrdset_create_localhost(
3276 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3305,7 +3305,7 @@ void update_cgroup_charts(int update_every) {
3305
3306 if(!(cg->options & CGROUP_OPTIONS_IS_UNIFIED)) {
3307 if(unlikely(!cg->st_mem_activity)) {
3308 - snprintfz(title, CHART_TITLE_MAX, "Memory Activity for cgroup %s", cg->chart_title);
3308 + snprintfz(title, CHART_TITLE_MAX, "Memory Activity");
3309
3310 cg->st_mem_activity = rrdset_create_localhost(
3311 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3336,7 +3336,7 @@ void update_cgroup_charts(int update_every) {
3336 }
3337
3338 if(unlikely(!cg->st_pgfaults)) {
3339 - snprintfz(title, CHART_TITLE_MAX, "Memory Page Faults for cgroup %s", cg->chart_title);
3339 + snprintfz(title, CHART_TITLE_MAX, "Memory Page Faults");
3340
3341 cg->st_pgfaults = rrdset_create_localhost(
3342 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3368,7 +3368,7 @@ void update_cgroup_charts(int update_every) {
3368
3369 if(likely(cg->memory.updated_usage_in_bytes && cg->memory.enabled_usage_in_bytes == CONFIG_BOOLEAN_YES)) {
3370 if(unlikely(!cg->st_mem_usage)) {
3371 - snprintfz(title, CHART_TITLE_MAX, "Used Memory %sfor cgroup %s", (cgroup_used_memory_without_cache && cg->memory.updated_detailed)?"without Cache ":"", cg->chart_title);
3371 + snprintfz(title, CHART_TITLE_MAX, "Used Memory %s", (cgroup_used_memory_without_cache && cg->memory.updated_detailed)?"without Cache ":"");
3372
3373 cg->st_mem_usage = rrdset_create_localhost(
3374 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3431,7 +3431,7 @@ void update_cgroup_charts(int update_every) {
3431 memory_limit = cg->memory_limit;
3432
3433 if(unlikely(!cg->st_mem_usage_limit)) {
3434 - snprintfz(title, CHART_TITLE_MAX, "Used RAM without Cache within the limits for cgroup %s", cg->chart_title);
3434 + snprintfz(title, CHART_TITLE_MAX, "Used RAM without Cache within the limits");
3435
3436 cg->st_mem_usage_limit = rrdset_create_localhost(
3437 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3475,7 +3475,7 @@ void update_cgroup_charts(int update_every) {
3475
3476 if(likely(cg->memory.updated_failcnt && cg->memory.enabled_failcnt == CONFIG_BOOLEAN_YES)) {
3477 if(unlikely(!cg->st_mem_failcnt)) {
3478 - snprintfz(title, CHART_TITLE_MAX, "Memory Limit Failures for cgroup %s", cg->chart_title);
3478 + snprintfz(title, CHART_TITLE_MAX, "Memory Limit Failures");
3479
3480 cg->st_mem_failcnt = rrdset_create_localhost(
3481 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3505,7 +3505,7 @@ void update_cgroup_charts(int update_every) {
3505
3506 if(likely(cg->io_service_bytes.updated && cg->io_service_bytes.enabled == CONFIG_BOOLEAN_YES)) {
3507 if(unlikely(!cg->st_io)) {
3508 - snprintfz(title, CHART_TITLE_MAX, "I/O Bandwidth (all disks) for cgroup %s", cg->chart_title);
3508 + snprintfz(title, CHART_TITLE_MAX, "I/O Bandwidth (all disks)");
3509
3510 cg->st_io = rrdset_create_localhost(
3511 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3537,7 +3537,7 @@ void update_cgroup_charts(int update_every) {
3537
3538 if(likely(cg->io_serviced.updated && cg->io_serviced.enabled == CONFIG_BOOLEAN_YES)) {
3539 if(unlikely(!cg->st_serviced_ops)) {
3540 - snprintfz(title, CHART_TITLE_MAX, "Serviced I/O Operations (all disks) for cgroup %s", cg->chart_title);
3540 + snprintfz(title, CHART_TITLE_MAX, "Serviced I/O Operations (all disks)");
3541
3542 cg->st_serviced_ops = rrdset_create_localhost(
3543 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3569,7 +3569,7 @@ void update_cgroup_charts(int update_every) {
3569
3570 if(likely(cg->throttle_io_service_bytes.updated && cg->throttle_io_service_bytes.enabled == CONFIG_BOOLEAN_YES)) {
3571 if(unlikely(!cg->st_throttle_io)) {
3572 - snprintfz(title, CHART_TITLE_MAX, "Throttle I/O Bandwidth (all disks) for cgroup %s", cg->chart_title);
3572 + snprintfz(title, CHART_TITLE_MAX, "Throttle I/O Bandwidth (all disks)");
3573
3574 cg->st_throttle_io = rrdset_create_localhost(
3575 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3601,7 +3601,7 @@ void update_cgroup_charts(int update_every) {
3601
3602 if(likely(cg->throttle_io_serviced.updated && cg->throttle_io_serviced.enabled == CONFIG_BOOLEAN_YES)) {
3603 if(unlikely(!cg->st_throttle_serviced_ops)) {
3604 - snprintfz(title, CHART_TITLE_MAX, "Throttle Serviced I/O Operations (all disks) for cgroup %s", cg->chart_title);
3604 + snprintfz(title, CHART_TITLE_MAX, "Throttle Serviced I/O Operations (all disks)");
3605
3606 cg->st_throttle_serviced_ops = rrdset_create_localhost(
3607 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3633,7 +3633,7 @@ void update_cgroup_charts(int update_every) {
3633
3634 if(likely(cg->io_queued.updated && cg->io_queued.enabled == CONFIG_BOOLEAN_YES)) {
3635 if(unlikely(!cg->st_queued_ops)) {
3636 - snprintfz(title, CHART_TITLE_MAX, "Queued I/O Operations (all disks) for cgroup %s", cg->chart_title);
3636 + snprintfz(title, CHART_TITLE_MAX, "Queued I/O Operations (all disks)");
3637
3638 cg->st_queued_ops = rrdset_create_localhost(
3639 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3665,7 +3665,7 @@ void update_cgroup_charts(int update_every) {
3665
3666 if(likely(cg->io_merged.updated && cg->io_merged.enabled == CONFIG_BOOLEAN_YES)) {
3667 if(unlikely(!cg->st_merged_ops)) {
3668 - snprintfz(title, CHART_TITLE_MAX, "Merged I/O Operations (all disks) for cgroup %s", cg->chart_title);
3668 + snprintfz(title, CHART_TITLE_MAX, "Merged I/O Operations (all disks)");
3669
3670 cg->st_merged_ops = rrdset_create_localhost(
3671 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3700,7 +3700,7 @@ void update_cgroup_charts(int update_every) {
3700 if (likely(res->updated && res->some.enabled)) {
3701 if (unlikely(!res->some.st)) {
3702 RRDSET *chart;
3703 - snprintfz(title, CHART_TITLE_MAX, "CPU pressure for cgroup %s", cg->chart_title);
3703 + snprintfz(title, CHART_TITLE_MAX, "CPU pressure");
3704
3705 chart = res->some.st = rrdset_create_localhost(
3706 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3733,7 +3733,7 @@ void update_cgroup_charts(int update_every) {
3733 if (likely(res->updated && res->some.enabled)) {
3734 if (unlikely(!res->some.st)) {
3735 RRDSET *chart;
3736 - snprintfz(title, CHART_TITLE_MAX, "Memory pressure for cgroup %s", cg->chart_title);
3736 + snprintfz(title, CHART_TITLE_MAX, "Memory pressure");
3737
3738 chart = res->some.st = rrdset_create_localhost(
3739 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3765,7 +3765,7 @@ void update_cgroup_charts(int update_every) {
3765 if (likely(res->updated && res->full.enabled)) {
3766 if (unlikely(!res->full.st)) {
3767 RRDSET *chart;
3768 - snprintfz(title, CHART_TITLE_MAX, "Memory full pressure for cgroup %s", cg->chart_title);
3768 + snprintfz(title, CHART_TITLE_MAX, "Memory full pressure");
3769
3770 chart = res->full.st = rrdset_create_localhost(
3771 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3798,7 +3798,7 @@ void update_cgroup_charts(int update_every) {
3798 if (likely(res->updated && res->some.enabled)) {
3799 if (unlikely(!res->some.st)) {
3800 RRDSET *chart;
3801 - snprintfz(title, CHART_TITLE_MAX, "I/O pressure for cgroup %s", cg->chart_title);
3801 + snprintfz(title, CHART_TITLE_MAX, "I/O pressure");
3802
3803 chart = res->some.st = rrdset_create_localhost(
3804 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)
@@ -3830,7 +3830,7 @@ void update_cgroup_charts(int update_every) {
3830 if (likely(res->updated && res->full.enabled)) {
3831 if (unlikely(!res->full.st)) {
3832 RRDSET *chart;
3833 - snprintfz(title, CHART_TITLE_MAX, "I/O full pressure for cgroup %s", cg->chart_title);
3833 + snprintfz(title, CHART_TITLE_MAX, "I/O full pressure");
3834
3835 chart = res->full.st = rrdset_create_localhost(
3836 cgroup_chart_type(type, cg->chart_id, RRD_ID_LENGTH_MAX)