Group data in InfluxDB with Flux

If you’re just getting started with Flux queries, check out the following:

  • for a conceptual overview of Flux and parts of a Flux query.
  • Execute queries to discover a variety of ways to run your queries.

Every table has a group key – a list of columns for which every row in the table has the same value.

Example group key

Grouping data in Flux is essentially defining the group key of output tables. Understanding how modifying group keys shapes output data is key to successfully grouping and transforming data into your desired output.

Flux’s group() function defines the group key for output tables, i.e. grouping records based on values for specific columns.

group() example
  1. |> group(columns: ["cpu", "host"])
Resulting group key
  1. [cpu, host]

The group() function has the following parameters:

The list of columns to include or exclude (depending on the ) in the grouping operation.

The method used to define the group and resulting group key. Possible values include by and except.

To illustrate how grouping works, define a dataSet variable that queries System CPU usage from the example-bucket bucket. Filter the cpu tag so it only returns results for each numbered CPU core.

  1. dataSet = from(bucket: "example-bucket")
  2. |> range(start: -2m)
  3. |> filter(fn: (r) => r._field == "usage_system" and r.cpu =~ /cpu[0-9*]/)
  4. |> drop(columns: ["host"])

This example drops the host column from the returned data since the CPU data is only tracked for a single host and it simplifies the output tables. Don’t drop the host column if monitoring multiple hosts.

Note that the group key is output with each table: Table: keys: <group-key>.

Group the dataSet stream by the cpu column.

  1. dataSet
  2. |> group(columns: ["cpu"])

This won’t actually change the structure of the data since it already has cpu in the group key and is therefore grouped by cpu. However, notice that it does change the group key:

Group by CPU output tables
  1. Table: keys: [cpu]
  2. cpu:string _stop:time _time:time _value:float _field:string _measurement:string _start:time
  3. ---------------------- ------------------------------ ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  4. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:00.000000000Z 7.892107892107892 usage_system cpu 2018-11-05T21:34:00.000000000Z
  5. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:10.000000000Z 7.2 usage_system cpu 2018-11-05T21:34:00.000000000Z
  6. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:20.000000000Z 7.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  7. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:30.000000000Z 5.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  8. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:40.000000000Z 7.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  9. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:50.000000000Z 7.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  10. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:00.000000000Z 10.3 usage_system cpu 2018-11-05T21:34:00.000000000Z
  11. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:10.000000000Z 9.2 usage_system cpu 2018-11-05T21:34:00.000000000Z
  12. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:20.000000000Z 8.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  13. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:30.000000000Z 8.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  14. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:40.000000000Z 8.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  15. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:50.000000000Z 10.2 usage_system cpu 2018-11-05T21:34:00.000000000Z
  16. cpu0 2018-11-05T21:36:00.000000000Z 2018-11-05T21:36:00.000000000Z 10.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  17. Table: keys: [cpu]
  18. cpu:string _stop:time _time:time _value:float _field:string _measurement:string _start:time
  19. ---------------------- ------------------------------ ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  20. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:00.000000000Z 0.7992007992007992 usage_system cpu 2018-11-05T21:34:00.000000000Z
  21. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:10.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  22. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:20.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  23. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:30.000000000Z 0.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  24. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:40.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  25. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:50.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  26. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:00.000000000Z 1.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  27. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:10.000000000Z 1.2 usage_system cpu 2018-11-05T21:34:00.000000000Z
  28. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:20.000000000Z 0.8 usage_system cpu 2018-11-05T21:34:00.000000000Z
  29. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:30.000000000Z 0.8991008991008991 usage_system cpu 2018-11-05T21:34:00.000000000Z
  30. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:40.000000000Z 0.8008008008008008 usage_system cpu 2018-11-05T21:34:00.000000000Z
  31. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:50.000000000Z 0.999000999000999 usage_system cpu 2018-11-05T21:34:00.000000000Z
  32. cpu1 2018-11-05T21:36:00.000000000Z 2018-11-05T21:36:00.000000000Z 1.1022044088176353 usage_system cpu 2018-11-05T21:34:00.000000000Z
  33. Table: keys: [cpu]
  34. cpu:string _stop:time _time:time _value:float _field:string _measurement:string _start:time
  35. ---------------------- ------------------------------ ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  36. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:00.000000000Z 4.1 usage_system cpu 2018-11-05T21:34:00.000000000Z
  37. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:10.000000000Z 3.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  38. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:20.000000000Z 3.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  39. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:30.000000000Z 2.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  40. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:40.000000000Z 4.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  41. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:50.000000000Z 4.895104895104895 usage_system cpu 2018-11-05T21:34:00.000000000Z
  42. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:00.000000000Z 6.906906906906907 usage_system cpu 2018-11-05T21:34:00.000000000Z
  43. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:10.000000000Z 5.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  44. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:20.000000000Z 5.1 usage_system cpu 2018-11-05T21:34:00.000000000Z
  45. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:30.000000000Z 4.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  46. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:40.000000000Z 5.1 usage_system cpu 2018-11-05T21:34:00.000000000Z
  47. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:50.000000000Z 5.9 usage_system cpu 2018-11-05T21:34:00.000000000Z
  48. cpu2 2018-11-05T21:36:00.000000000Z 2018-11-05T21:36:00.000000000Z 6.4935064935064934 usage_system cpu 2018-11-05T21:34:00.000000000Z
  49. Table: keys: [cpu]
  50. cpu:string _stop:time _time:time _value:float _field:string _measurement:string _start:time
  51. ---------------------- ------------------------------ ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  52. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:00.000000000Z 0.5005005005005005 usage_system cpu 2018-11-05T21:34:00.000000000Z
  53. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:10.000000000Z 0.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  54. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:20.000000000Z 0.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  55. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:30.000000000Z 0.3 usage_system cpu 2018-11-05T21:34:00.000000000Z
  56. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:40.000000000Z 0.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  57. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:34:50.000000000Z 0.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  58. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:00.000000000Z 1.3986013986013985 usage_system cpu 2018-11-05T21:34:00.000000000Z
  59. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:10.000000000Z 0.9 usage_system cpu 2018-11-05T21:34:00.000000000Z
  60. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:20.000000000Z 0.5005005005005005 usage_system cpu 2018-11-05T21:34:00.000000000Z
  61. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:30.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  62. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:40.000000000Z 0.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  63. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:35:50.000000000Z 0.8 usage_system cpu 2018-11-05T21:34:00.000000000Z
  64. cpu3 2018-11-05T21:36:00.000000000Z 2018-11-05T21:36:00.000000000Z 0.9 usage_system cpu 2018-11-05T21:34:00.000000000Z

The visualization remains the same.

Group by CPU

Grouping data by the _time column is a good illustration of how grouping changes the structure of your data.

  1. dataSet
  2. |> group(columns: ["_time"])
Group by time output tables

Because each timestamp is structured as a separate table, when visualized, all points that share the same timestamp appear connected.

With some further processing, you could calculate the average CPU usage across all CPUs per point of time and group them into a single table, but we won’t cover that in this example. If you’re interested in running and visualizing this yourself, here’s what the query would look like:

  1. dataSet
  2. |> group(columns: ["_time"])
  3. |> mean()
  4. |> group(columns: ["_value", "_time"], mode: "except")

Group by the cpu and _time columns.

  1. dataSet
  2. |> group(columns: ["cpu", "_time"])

This outputs a table for every unique cpu and _time combination:

Group by CPU and time output tables
  1. Table: keys: [_time, cpu]
  2. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  3. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  4. 2018-11-05T21:34:00.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 7.892107892107892 usage_system cpu 2018-11-05T21:34:00.000000000Z
  5. Table: keys: [_time, cpu]
  6. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  7. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  8. 2018-11-05T21:34:00.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.7992007992007992 usage_system cpu 2018-11-05T21:34:00.000000000Z
  9. Table: keys: [_time, cpu]
  10. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  11. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  12. 2018-11-05T21:34:00.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 4.1 usage_system cpu 2018-11-05T21:34:00.000000000Z
  13. Table: keys: [_time, cpu]
  14. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  15. 2018-11-05T21:34:00.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.5005005005005005 usage_system cpu 2018-11-05T21:34:00.000000000Z
  16. Table: keys: [_time, cpu]
  17. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  18. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  19. 2018-11-05T21:34:10.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 7.2 usage_system cpu 2018-11-05T21:34:00.000000000Z
  20. Table: keys: [_time, cpu]
  21. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  22. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  23. 2018-11-05T21:34:10.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  24. Table: keys: [_time, cpu]
  25. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  26. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  27. 2018-11-05T21:34:10.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 3.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  28. Table: keys: [_time, cpu]
  29. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  30. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  31. 2018-11-05T21:34:10.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  32. Table: keys: [_time, cpu]
  33. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  34. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  35. 2018-11-05T21:34:20.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 7.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  36. Table: keys: [_time, cpu]
  37. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  38. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  39. 2018-11-05T21:34:20.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  40. Table: keys: [_time, cpu]
  41. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  42. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  43. 2018-11-05T21:34:20.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 3.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  44. Table: keys: [_time, cpu]
  45. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  46. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  47. 2018-11-05T21:34:20.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  48. Table: keys: [_time, cpu]
  49. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  50. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  51. 2018-11-05T21:34:30.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 5.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  52. Table: keys: [_time, cpu]
  53. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  54. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  55. 2018-11-05T21:34:30.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  56. Table: keys: [_time, cpu]
  57. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  58. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  59. 2018-11-05T21:34:30.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 2.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  60. Table: keys: [_time, cpu]
  61. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  62. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  63. 2018-11-05T21:34:30.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.3 usage_system cpu 2018-11-05T21:34:00.000000000Z
  64. Table: keys: [_time, cpu]
  65. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  66. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  67. 2018-11-05T21:34:40.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 7.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  68. Table: keys: [_time, cpu]
  69. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  70. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  71. 2018-11-05T21:34:40.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  72. Table: keys: [_time, cpu]
  73. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  74. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  75. 2018-11-05T21:34:40.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 4.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  76. Table: keys: [_time, cpu]
  77. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  78. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  79. 2018-11-05T21:34:40.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  80. Table: keys: [_time, cpu]
  81. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  82. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  83. 2018-11-05T21:34:50.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 7.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  84. Table: keys: [_time, cpu]
  85. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  86. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  87. 2018-11-05T21:34:50.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  88. Table: keys: [_time, cpu]
  89. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  90. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  91. 2018-11-05T21:34:50.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 4.895104895104895 usage_system cpu 2018-11-05T21:34:00.000000000Z
  92. Table: keys: [_time, cpu]
  93. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  94. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  95. 2018-11-05T21:34:50.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  96. Table: keys: [_time, cpu]
  97. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  98. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  99. 2018-11-05T21:35:00.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 10.3 usage_system cpu 2018-11-05T21:34:00.000000000Z
  100. Table: keys: [_time, cpu]
  101. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  102. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  103. 2018-11-05T21:35:00.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 1.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  104. Table: keys: [_time, cpu]
  105. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  106. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  107. 2018-11-05T21:35:00.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 6.906906906906907 usage_system cpu 2018-11-05T21:34:00.000000000Z
  108. Table: keys: [_time, cpu]
  109. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  110. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  111. Table: keys: [_time, cpu]
  112. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  113. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  114. 2018-11-05T21:35:10.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 9.2 usage_system cpu 2018-11-05T21:34:00.000000000Z
  115. Table: keys: [_time, cpu]
  116. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  117. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  118. 2018-11-05T21:35:10.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 1.2 usage_system cpu 2018-11-05T21:34:00.000000000Z
  119. Table: keys: [_time, cpu]
  120. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  121. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  122. 2018-11-05T21:35:10.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 5.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  123. Table: keys: [_time, cpu]
  124. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  125. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  126. 2018-11-05T21:35:10.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.9 usage_system cpu 2018-11-05T21:34:00.000000000Z
  127. Table: keys: [_time, cpu]
  128. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  129. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  130. 2018-11-05T21:35:20.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 8.4 usage_system cpu 2018-11-05T21:34:00.000000000Z
  131. Table: keys: [_time, cpu]
  132. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  133. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  134. 2018-11-05T21:35:20.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.8 usage_system cpu 2018-11-05T21:34:00.000000000Z
  135. Table: keys: [_time, cpu]
  136. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  137. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  138. 2018-11-05T21:35:20.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 5.1 usage_system cpu 2018-11-05T21:34:00.000000000Z
  139. Table: keys: [_time, cpu]
  140. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  141. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  142. 2018-11-05T21:35:20.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.5005005005005005 usage_system cpu 2018-11-05T21:34:00.000000000Z
  143. Table: keys: [_time, cpu]
  144. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  145. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  146. 2018-11-05T21:35:30.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 8.5 usage_system cpu 2018-11-05T21:34:00.000000000Z
  147. Table: keys: [_time, cpu]
  148. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  149. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  150. 2018-11-05T21:35:30.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.8991008991008991 usage_system cpu 2018-11-05T21:34:00.000000000Z
  151. Table: keys: [_time, cpu]
  152. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  153. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  154. 2018-11-05T21:35:30.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 4.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  155. Table: keys: [_time, cpu]
  156. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  157. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  158. 2018-11-05T21:35:30.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.7 usage_system cpu 2018-11-05T21:34:00.000000000Z
  159. Table: keys: [_time, cpu]
  160. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  161. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  162. 2018-11-05T21:35:40.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 8.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  163. Table: keys: [_time, cpu]
  164. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  165. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  166. 2018-11-05T21:35:40.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.8008008008008008 usage_system cpu 2018-11-05T21:34:00.000000000Z
  167. Table: keys: [_time, cpu]
  168. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  169. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  170. 2018-11-05T21:35:40.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 5.1 usage_system cpu 2018-11-05T21:34:00.000000000Z
  171. Table: keys: [_time, cpu]
  172. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  173. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  174. 2018-11-05T21:35:40.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  175. Table: keys: [_time, cpu]
  176. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  177. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  178. 2018-11-05T21:35:50.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 10.2 usage_system cpu 2018-11-05T21:34:00.000000000Z
  179. Table: keys: [_time, cpu]
  180. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  181. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  182. 2018-11-05T21:35:50.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 0.999000999000999 usage_system cpu 2018-11-05T21:34:00.000000000Z
  183. Table: keys: [_time, cpu]
  184. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  185. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  186. 2018-11-05T21:35:50.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 5.9 usage_system cpu 2018-11-05T21:34:00.000000000Z
  187. Table: keys: [_time, cpu]
  188. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  189. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  190. 2018-11-05T21:35:50.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.8 usage_system cpu 2018-11-05T21:34:00.000000000Z
  191. Table: keys: [_time, cpu]
  192. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  193. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  194. 2018-11-05T21:36:00.000000000Z cpu0 2018-11-05T21:36:00.000000000Z 10.6 usage_system cpu 2018-11-05T21:34:00.000000000Z
  195. Table: keys: [_time, cpu]
  196. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  197. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  198. 2018-11-05T21:36:00.000000000Z cpu1 2018-11-05T21:36:00.000000000Z 1.1022044088176353 usage_system cpu 2018-11-05T21:34:00.000000000Z
  199. Table: keys: [_time, cpu]
  200. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  201. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  202. 2018-11-05T21:36:00.000000000Z cpu2 2018-11-05T21:36:00.000000000Z 6.4935064935064934 usage_system cpu 2018-11-05T21:34:00.000000000Z
  203. Table: keys: [_time, cpu]
  204. _time:time cpu:string _stop:time _value:float _field:string _measurement:string _start:time
  205. ------------------------------ ---------------------- ------------------------------ ---------------------------- ---------------------- ---------------------- ------------------------------
  206. 2018-11-05T21:36:00.000000000Z cpu3 2018-11-05T21:36:00.000000000Z 0.9 usage_system cpu 2018-11-05T21:34:00.000000000Z

When visualized, tables appear as individual, unconnected points.

Group by CPU and time

Grouping by and _time is a good illustration of how grouping works.