apps.plugin function processes: keys should not have spaces (#13980)
* keys should not have spaces * sticky columns should be very few
Costa Tsaousis committed
Nov 11, 2022 at 12:54 UTC
9370299c259daf236a18f9ab66b4704a53b207d1
1 file changed
+19
-15
collectors/apps.plugin/apps_plugin.c
+19
-15
@@ -4594,14 +4594,14 @@ static void apps_plugin_function_processes(const char *transaction, char *functi
4594
add_table_field(wb, "Cmd", "Process Name", true, "string", NULL, NAN, "ascending", true, true, false, NULL, "count_unique");
4595
4596
#ifdef NETDATA_DEV_MODE
4597
- add_table_field(wb, "CmdLine", "Command Line", false, "detail-string:Cmd", NULL, NAN, "ascending", true, true, false, NULL, "count_unique");
4597
+ add_table_field(wb, "CmdLine", "Command Line", false, "detail-string:Cmd", NULL, NAN, "ascending", true, false, false, NULL, "count_unique");
4598
#endif
4599
- add_table_field(wb, "PPid", "Parent Process ID", false, "integer", NULL, NAN, "ascending", true, true, false, "Pid", "count_unique");
4599
+ add_table_field(wb, "PPid", "Parent Process ID", false, "integer", NULL, NAN, "ascending", true, false, false, "Pid", "count_unique");
4600
add_table_field(wb, "Category", "Category (apps_groups.conf)", true, "string", NULL, NAN, "ascending", true, true, false, NULL, "count_unique");
4601
- add_table_field(wb, "User", "User Owner", true, "string", NULL, NAN, "ascending", true, true, false, NULL, "count_unique");
4602
- add_table_field(wb, "Uid", "User ID", false, "integer", NULL, NAN, "ascending", true, true, false, NULL, "count_unique");
4603
- add_table_field(wb, "Group", "Group Owner", false, "string", NULL, NAN, "ascending", true, true, false, NULL, "count_unique");
4604
- add_table_field(wb, "Gid", "Group ID", false, "integer", NULL, NAN, "ascending", true, true, false, NULL, "count_unique");
4601
+ add_table_field(wb, "User", "User Owner", true, "string", NULL, NAN, "ascending", true, false, false, NULL, "count_unique");
4602
+ add_table_field(wb, "Uid", "User ID", false, "integer", NULL, NAN, "ascending", true, false, false, NULL, "count_unique");
4603
+ add_table_field(wb, "Group", "Group Owner", false, "string", NULL, NAN, "ascending", true, false, false, NULL, "count_unique");
4604
+ add_table_field(wb, "Gid", "Group ID", false, "integer", NULL, NAN, "ascending", true, false, false, NULL, "count_unique");
4605
add_table_field(wb, "Processes", "Processes", true, "bar-with-integer", "processes", Processes_max, "descending", true, false, false, NULL, "sum");
4606
add_table_field(wb, "Threads", "Threads", true, "bar-with-integer", "threads", Threads_max, "descending", true, false, false, NULL, "sum");
4607
add_table_field(wb, "Uptime", "Uptime in seconds", true, "duration", "seconds", Uptime_max, "descending", true, false, false, NULL, "max");
@@ -4664,7 +4664,7 @@ static void apps_plugin_function_processes(const char *transaction, char *functi
4664
wb,
4665
""
4666
"\n },"
4667
- "\n \"default sort column\": \"CPU\","
4667
+ "\n \"default_sort_column\": \"CPU\","
4668
"\n \"charts\": {"
4669
"\n \"CPU\": {"
4670
"\n \"name\":\"CPU Utilization\","
@@ -4745,17 +4745,21 @@ static void apps_plugin_function_processes(const char *transaction, char *functi
4745
"\n }"
4746
"\n },"
4747
"\n \"group_by\": {"
4748
- "\n \"Process Tree by PID\": {"
4749
- "\n \"columns\": [ \"PPid\" ]"
4748
+ "\n \"pid\": {"
4749
+ "\n \"name\":\"Process Tree by PID\","
4750
+ "\n \"columns\":[ \"PPid\" ]"
4751
"\n },"
4751
- "\n \"Process Tree by Category\": {"
4752
- "\n \"columns\": [ \"Category\", \"PPid\" ]"
4752
+ "\n \"category\": {"
4753
+ "\n \"name\":\"Process Tree by Category\","
4754
+ "\n \"columns\":[ \"Category\", \"PPid\" ]"
4755
"\n },"
4754
- "\n \"Process Tree by User\": {"
4755
- "\n \"columns\": [ \"User\", \"PPid\" ]"
4756
+ "\n \"user\": {"
4757
+ "\n \"name\":\"Process Tree by User\","
4758
+ "\n \"columns\":[ \"User\", \"PPid\" ]"
4759
"\n },"
4757
- "\n \"Process Tree by Group\": {"
4758
- "\n \"columns\": [ \"Group\", \"PPid\" ]"
4760
+ "\n \"group\": {"
4761
+ "\n \"name\":\"Process Tree by Group\","
4762
+ "\n \"columns\":[ \"Group\", \"PPid\" ]"
4763
"\n }"
4764
"\n }"
4765
);