dimensions-contexts-families.mdx 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ---
  2. title: "Chart dimensions, contexts, and families"
  3. description: >-
  4. "Netdata organizes charts into dimensions, contexts, and families to automatically
  5. and meaningfully organize thousands of metrics into interactive charts."
  6. type: "explanation"
  7. custom_edit_url: "https://github.com/netdata/netdata/blob/master/docs/dashboard/dimensions-contexts-families.mdx"
  8. sidebar_label: "Chart dimensions, contexts, and families"
  9. learn_status: "Published"
  10. learn_topic_type: "Concepts"
  11. learn_rel_path: "Concepts"
  12. ---
  13. # Chart dimensions, contexts, and families
  14. While Netdata's charts require no configuration and are [easy to interact with](https://github.com/netdata/netdata/blob/master/docs/dashboard/interact-charts.mdx),
  15. they have a lot of underlying complexity. To meaningfully organize charts out of the box based on what's happening in
  16. your nodes, Netdata uses the concepts of **dimensions**, **contexts**, and **families**.
  17. Understanding how these work will help you more easily navigate the dashboard, [write new
  18. alarms](https://github.com/netdata/netdata/blob/master/docs/monitor/configure-alarms.md), or play around with the [API](https://github.com/netdata/netdata/blob/master/web/api/README.md).
  19. For a refresher on the anatomy of a chart, see [dashboards and charts](https://github.com/netdata/netdata/blob/master/docs/dashboard/how-dashboard-works.mdx).
  20. ## Dimension
  21. A **dimension** is a value that gets shown on a chart. The value can be raw data or calculated values, such as the
  22. average (the default), minimum, or maximum. These values can then be given any type of unit. For example, CPU
  23. utilization is represented as a percentage, disk I/O as `MiB/s`, and available RAM as an absolute value in `MiB` or
  24. `GiB`.
  25. Beneath every chart (or on the right-side if you configure the dashboard) is a legend of dimensions. When there are
  26. multiple dimensions, you'll see a different entry in the legend for each dimension.
  27. The **Apps CPU Time** chart (with the [context](#context) `apps.cpu`), which visualizes CPU utilization of
  28. different types of processes/services/applications on your node, always provides a vibrant example of a chart with
  29. multiple dimensions.
  30. ![An example apps.cpu chart with many
  31. dimensions](https://user-images.githubusercontent.com/1153921/114207816-a5cb7400-9911-11eb-8800-06f60b745f9c.png)
  32. The chart shows 13 unique dimensions, such as `httpd` for the CPU utilization for web servers, `kernel` for anything
  33. related to the Linux kernel, and so on. In your dashboard, these specific dimensions will almost certainly be different.
  34. Dimensions can be [hidden](https://github.com/netdata/netdata/blob/master/docs/dashboard/interact-charts.mdx#show-and-hide-dimensions) to help you focus your
  35. attention.
  36. ## Context
  37. A **context** is a way of grouping charts by the types of metrics collected and dimensions displayed. It's kind of like
  38. a machine-readable naming and organization scheme.
  39. For example, the **Apps CPU Time** has the context `apps.cpu`. A little further down on the dashboard is a similar
  40. chart, **Apps Real Memory (w/o shared)** with the context `apps.mem`. The `apps` portion of the context is the **type**,
  41. whereas anything after the `.` is specified either by the chart's developer or by the [**family**](#family).
  42. By default, a chart's type affects where it fits in the menu, while its family creates submenus.
  43. Netdata also relies on contexts for [alarm configuration](https://github.com/netdata/netdata/blob/master/docs/monitor/configure-alarms.md) (the [`on`
  44. line](https://github.com/netdata/netdata/blob/master/health/REFERENCE.md#alarm-line-on)).
  45. ## Family
  46. **Families** are a _single instance_ of a hardware or software resource that needs to be displayed separately from
  47. similar instances.
  48. For example, let's look at the **Disks** section, which contains a number of charts with contexts like `disk.io`,
  49. `disk.ops`, `disk.backlog`, and `disk.util`. If your node has multiple disk drives at `sda` and `sdb`, Netdata creates
  50. a separate family for each.
  51. Netdata now merges the contexts and families to create charts that are grouped by family, following a
  52. `[context].[family]` naming scheme, so that you can see the `disk.io` and `disk.ops` charts for `sda` right next to each
  53. other.
  54. Given the four example contexts, and two families of `sda` and `sdb`, Netdata will create the following charts and their
  55. names:
  56. | Context | `sda` family | `sdb` family |
  57. | :------------- | ------------------ | ------------------ |
  58. | `disk.io` | `disk_io.sda` | `disk_io.sdb` |
  59. | `disk.ops` | `disk_ops.sda` | `disk_ops.sdb` |
  60. | `disk.backlog` | `disk_backlog.sda` | `disk_backlog.sdb` |
  61. | `disk.util` | `disk_util.sda` | `disk_util.sdb` |
  62. ## What's next?
  63. With an understanding of a chart's dimensions, context, and family, you're now ready to dig even deeper into Netdata's
  64. dashboard. We recommend looking into [using the timeframe selector](https://github.com/netdata/netdata/blob/master/docs/dashboard/visualization-date-and-time-controls.mdx).
  65. If you feel comfortable with the [dashboard](https://github.com/netdata/netdata/blob/master/docs/dashboard/how-dashboard-works.mdx) and interacting with charts, we
  66. recommend learning about [configuration](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md). While Netdata doesn't _require_ a complicated setup
  67. process or a query language to create charts, there are a lot of ways to tweak the experience to match your needs.
  68. ### Further reading & related information
  69. - Dashboard
  70. - [How the dashboard works](https://github.com/netdata/netdata/blob/master/docs/dashboard/how-dashboard-works.mdx)
  71. - [Interact with charts](https://github.com/netdata/netdata/blob/master/docs/dashboard/interact-charts.mdx)
  72. - **[Chart dimensions, contexts, and families](https://github.com/netdata/netdata/blob/master/docs/dashboard/dimensions-contexts-families.mdx)**
  73. - [Select timeframes to visualize](https://github.com/netdata/netdata/blob/master/docs/dashboard/visualization-date-and-time-controls.mdx)
  74. - [Import, export, and print a snapshot](https://github.com/netdata/netdata/blob/master/docs/dashboard/import-export-print-snapshot.mdx)
  75. - [Customize the standard dashboard](https://github.com/netdata/netdata/blob/master/docs/dashboard/customize.mdx)