@cryptotaxi247 / netdata-1 / commits / 8c73c4764

Reorg learn 0227 (#14621)

* reorg batch 1 * remove duplicate cloud custom dashboard and agent dashboard * Simplify the root web/README * Merge streaming references * Make enable streaming the overall intro and the README the reference * Remove reference-streaming document * Update overview pages

Chris Akritidis committed Feb 27, 2023 at 14:46 UTC 8c73c47645165d8eb65e06e1b50b27e82fe13bab
23 files changed +609 -2307
docs/category-overview-pages/concepts-overview.md deleted
-10
@@ -1,10 +0,0 @@
1 -<!--
2 -title: "Concepts"
3 -sidebar_label: "Concepts"
4 -custom_edit_url: "https://github.com/netdata/netdata/blob/master/docs/category-overview-pages/concepts-overview.md"
5 -learn_status: "Published"
6 -learn_rel_path: "Concepts"
7 -sidebar_position: 10
8 --->
9 -
10 -This category will help you understand how key features and components work in Netdata.
\ No newline at end of file
docs/category-overview-pages/developers-overview.md deleted
-10
@@ -1,10 +0,0 @@
1 -<!--
2 -title: "Developers"
3 -sidebar_label: "Developers"
4 -custom_edit_url: "https://github.com/netdata/netdata/blob/master/docs/category-overview-pages/developers-overview.md"
5 -learn_status: "Published"
6 -learn_rel_path: "Developers"
7 -sidebar_position: 100
8 --->
9 -
10 -In this category you will find information that will aid you while developing with Netdata.
docs/category-overview-pages/operations-overview.md deleted
-10
@@ -1,10 +0,0 @@
1 -<!--
2 -title: "Operations"
3 -sidebar_label: "Operations"
4 -custom_edit_url: "https://github.com/netdata/netdata/blob/master/docs/category-overview-pages/operations-overview.md"
5 -learn_status: "Published"
6 -learn_rel_path: "Operations"
7 -sidebar_position: 40
8 --->
9 -
10 -In this category you will find all the instructions on "operations" you can perform with Netdata, whether that would be using the Anomaly Advisor to surface any potential unexpected behavior, or how to interact with the charts etc.
\ No newline at end of file
docs/category-overview-pages/troubleshooting-overview.md new
+5
@@ -0,0 +1,5 @@
1 +# Troubleshooting and machine learning
2 +
3 +In this section you can learn about Netdata's advanced tools that can assist you in troubleshooting issues with
4 +your infrastructure, to facilitate the identification of a root cause.
5 +
docs/category-overview-pages/visualizations-overview.md new
+4
@@ -0,0 +1,4 @@
1 +# Visualizations, charts and dashboards
2 +
3 +In this section you can learn about the various ways Netdata visualizes the collected metrics at an infrastructure level with Netdata Cloud
4 +and at a single node level, with the Netdata Agent Dashboard.
docs/contributing/style-guide.md
-38
@@ -1,13 +1,3 @@
1 -<!--
2 -title: "Netdata style guide"
3 -description: "The Netdata style guide establishes editorial guidelines for all of Netdata's writing, including documentation, blog posts, in-product UX copy, and more."
4 -custom_edit_url: https://github.com/netdata/netdata/edit/master/docs/contributing/style-guide.md
5 -sidebar_label: "Netdata style guide"
6 -learn_status: "Published"
7 -learn_topic_type: "References"
8 -learn_rel_path: "Contribute"
9 --->
10 -
1 # Netdata style guide
2
3 The _Netdata style guide_ establishes editorial guidelines for any writing produced by the Netdata team or the Netdata
@@ -357,34 +347,6 @@ The Netdata team uses [`remark-lint`](https://github.com/remarkjs/remark-lint) f
347 If you want to see all the settings, open the
348 [`remarkrc.js`](https://github.com/netdata/netdata/blob/master/.remarkrc.js) file in the `netdata/netdata` repository.
349
360 -### Frontmatter
361 -
362 -Every document must begin with frontmatter, followed by an H1 (`#`) heading.
363 -
364 -Unlike typical Markdown frontmatter, Netdata uses HTML comments (`<!--`, `-->`) to begin and end the frontmatter block.
365 -These HTML comments are later converted into typical frontmatter syntax when building [Netdata
366 -Learn](https://learn.netdata.cloud).
367 -
368 -Frontmatter _must_ contain the following variables:
369 -
370 -- A `title` that quickly and distinctly describes the document's content.
371 -- A `description` that elaborates on the purpose or goal of the document using no less than 100 characters and no more
372 - than 155 characters.
373 -- A `custom_edit_url` that links directly to the GitHub URL where another user could suggest additional changes to the
374 - published document.
375 -
376 -Some documents, like the Ansible guide and others in the `/docs/guides` folder, require an `image` variable as well. In
377 -this case, replace `/docs` with `/img/seo`, and then rebuild the remainder of the path to the document in question. End
378 -the path with `.png`. A member of the Netdata team will assist in creating the image when publishing the content.
379 -
380 -For example, here is the frontmatter for the guide
381 -about [deploying the Netdata Agent with Ansible](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/ansible.md).
382 -
383 -<img width="751" alt="image" src="https://user-images.githubusercontent.com/43294513/217607958-ef0f270d-7947-4d91-a9a5-56b17b4255ee.png"/>
384 -
385 -Questions about frontmatter in
386 -documentation? [Ask on our community forum](https://community.netdata.cloud/c/blog-posts-and-articles/6).
387 -
350 ### Linking between documentation
351
352 Documentation should link to relevant pages whenever it's relevant and provides valuable context to the reader.
docs/dashboard/customize.md
+1 -14
@@ -1,19 +1,6 @@
1 -<!--
2 -title: "Customize the standard dashboard"
3 -description: >-
4 - "Netdata's preconfigured dashboard offers many customization options, such as choosing when
5 - charts are updated, your preferred theme, and custom text to document processes, and more."
6 -type: "how-to"
7 -custom_edit_url: "https://github.com/netdata/netdata/blob/master/docs/dashboard/customize.md"
8 -sidebar_label: "Customize the standard dashboard"
9 -learn_status: "Published"
10 -learn_topic_type: "Tasks"
11 -learn_rel_path: "Operations"
12 --->
13 -
1 # Customize the standard dashboard
2
16 -While the [Netdata dashboard](https://github.com/netdata/netdata/blob/master/docs/dashboard/how-dashboard-works.md) comes preconfigured with hundreds of charts and
3 +While the [Netdata dashboard](https://github.com/netdata/netdata/blob/master/web/gui/README.md) comes preconfigured with hundreds of charts and
4 thousands of metrics, you may want to alter your experience based on a particular use case or preferences.
5
6 ## Dashboard settings
docs/dashboard/dimensions-contexts-families.md
-9
@@ -67,12 +67,3 @@ names:
67 | `disk.ops` | `disk_ops.sda` | `disk_ops.sdb` |
68 | `disk.backlog` | `disk_backlog.sda` | `disk_backlog.sdb` |
69 | `disk.util` | `disk_util.sda` | `disk_util.sdb` |
70 -
71 -## What's next?
72 -
73 -With an understanding of a chart's dimensions, context, and family, you're now ready to dig even deeper into Netdata's
74 -dashboard. We recommend looking into [using the timeframe selector](https://github.com/netdata/netdata/blob/master/docs/dashboard/visualization-date-and-time-controls.md).
75 -
76 -If you feel comfortable with the [dashboard](https://github.com/netdata/netdata/blob/master/docs/dashboard/how-dashboard-works.md) and interacting with charts, we
77 -recommend learning about [configuration](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md). While Netdata doesn't _require_ a complicated setup
78 -process or a query language to create charts, there are a lot of ways to tweak the experience to match your needs.
docs/dashboard/how-dashboard-works.md deleted
-99
@@ -1,99 +0,0 @@
1 -<!--
2 -title: "How the dashboard works"
3 -description: >-
4 - "Learn how to navigate Netdata's preconfigured dashboard to get started
5 - exploring, visualizing, and troubleshooting in real time."
6 -type: "explanation"
7 -custom_edit_url: "https://github.com/netdata/netdata/blob/master/docs/dashboard/how-dashboard-works.md"
8 -sidebar_label: "How the dashboard works"
9 -learn_status: "Published"
10 -learn_topic_type: "Concepts"
11 -learn_rel_path: "Concepts"
12 --->
13 -
14 -# How the dashboard works
15 -
16 -Because Netdata is a monitoring and _troubleshooting_ platform, a dashboard with real-time, meaningful, and
17 -context-aware charts is essential.
18 -
19 -As soon as you [install Netdata](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md), it autodetects hardware, OS, containers, services, and
20 -applications running on your node and builds a dashboard on a single, scrollable webpage. This page features hundreds of
21 -charts, which are preconfigured to save you time from learning a query language, all stacked on top of one another. This
22 -vertical rhythm is designed to encourage exploration and help you visually identify connections between the metrics
23 -visualized in different charts.
24 -
25 -It's essential to understand the core concepts and features of Netdata's dashboard if you want to maximize your Netdata
26 -experience right after installation.
27 -
28 -## Open the dashboard
29 -
30 -Access Netdata's dashboard by navigating to `http://NODE:19999` in your browser, replacing `NODE` with either
31 -`localhost` or the hostname/IP address of a remote node.
32 -
33 -![Animated GIF of navigating to the
34 -dashboard](https://user-images.githubusercontent.com/1153921/80825153-abaec600-8b94-11ea-8b17-1b770a2abaa9.gif)
35 -
36 -Many features of the internal web server that serves the dashboard are [configurable](https://github.com/netdata/netdata/blob/master/web/server/README.md), including
37 -the listen port, enforced TLS, and even disabling the dashboard altogether.
38 -
39 -## Sections and menus
40 -
41 -As mentioned in the introduction, Netdata automatically organizes all the metrics it collects from your node, and places
42 -them into **sections** of closely related charts.
43 -
44 -The first section on any dashboard is the **System Overview**, followed by **CPUs**, **Memory**, and so on.
45 -
46 -These sections populate the **menu**, which is on the right-hand side of the dashboard. Instead of manually scrolling up
47 -and down to explore the dashboard, it's generally faster to click on the relevant menu item to jump to that position on
48 -the dashboard.
49 -
50 -Many menu items also contain a **submenu**, with links to additional categories. For example, the **Disks** section is often separated into multiple groups based on the number of disk drives/partitions on your node, which are also known as a family.
51 -
52 -![Animated GIF of using Netdata's menus and
53 -submenus](https://user-images.githubusercontent.com/1153921/80832425-7c528600-8ba1-11ea-8140-d0a17a62009b.gif)
54 -
55 -## Charts
56 -
57 -Every **chart** in the Netdata dashboard is fully interactive. Netdata
58 -synchronizes your interactions to help you understand exactly how a node behaved in any timeframe, whether that's
59 -seconds or days.
60 -
61 -A chart is an individual, interactive, always-updating graphic displaying one or more collected/calculated metrics,
62 -which are generated by [collectors](https://github.com/netdata/netdata/blob/master/collectors/README.md).
63 -
64 -![Animated GIF of the standard Netdata dashboard being manipulated and synchronizing
65 -charts](https://user-images.githubusercontent.com/1153921/80839230-b034a800-8baf-11ea-9cb2-99c1e10f0f85.gif)
66 -
67 -Hover over any chart to temporarily pause it and see the exact metrics values presented as different dimensions. Click
68 -or tap to stop the chart from automatically updating with new metrics, thereby locking it to a single timeframe.
69 -Double-click it to resume auto-updating.
70 -
71 -Let's cover two of the most important ways to interact with charts: panning through time and zooming.
72 -
73 -To pan through time, **click and hold** (or touch and hold) on any chart, then **drag your mouse** (or finger) to the
74 -left or right. Drag to the right to pan backward through time, or drag to the left to pan forward in time. Think of it
75 -like pushing the current timeframe off the screen to see what came before or after.
76 -
77 -To zoom, press and hold `Shift`, then use your mouse's scroll wheel, or a two-finger pinch if you're using a touchpad.
78 -
79 -See [interact with charts](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/interact-new-charts.md) for all the possible ways to interact with the charts on
80 -your dashboard.
81 -
82 -## Alarms
83 -
84 -Many of the preconfigured charts on the Netdata dashboard also come with preconfigured alarms. Netdata sends three
85 -primary alarm states via alarms: `CLEAR`, `WARNING`, and `CRITICAL`. If an alarm moves from a `CLEAR` state to either
86 -`WARNING` or `CRITICAL`, Netdata creates a notification to let you know exactly what's going on. There are [other alarm
87 -states](https://github.com/netdata/netdata/blob/master/health/REFERENCE.md#alarm-statuses) as well.
88 -
89 -The easiest way to see alarms is by clicking on the alarm icon ![Alarms
90 -icon](https://raw.githubusercontent.com/netdata/netdata-ui/98e31799c1ec0983f433537ff16d2ac2b0d994aa/src/components/icon/assets/alarm.svg)
91 -in the top panel to open the alarms panel, which shows you all the active alarms. The other **All** tab shows every
92 -active alarm, and the **Log** tab shows a historical record of exactly when alarms triggered and to which state.
93 -
94 -![Animated GIF of looking at raised alarms and the alarm
95 -log](https://user-images.githubusercontent.com/1153921/80842482-8c289500-8bb6-11ea-9791-600cfdbe82ce.gif)
96 -
97 -Learn more about [viewing active alarms](https://github.com/netdata/netdata/blob/master/docs/monitor/view-active-alarms.md), [configuring
98 -alarms](https://github.com/netdata/netdata/blob/master/health/REFERENCE.md), or [enabling a new notification
99 -method](https://github.com/netdata/netdata/blob/master/docs/monitor/enable-notifications.md).
docs/glossary.md new
+179
@@ -0,0 +1,179 @@
1 +# Glossary
2 +
3 +The Netdata community welcomes engineers, SREs, admins, etc. of all levels of expertise with engineering and the Netdata tool. And just as a journey of a thousand miles starts with one step, sometimes, the journey to mastery begins with understanding a single term.
4 +
5 +As such, we want to provide a little Glossary as a reference starting point for new users who might be confused about the Netdata vernacular that more familiar users might take for granted.
6 +
7 +If you're here looking for the definition of a term you heard elsewhere in our community or products, or if you just want to learn Netdata from the ground up, you've come to the right page.
8 +
9 +Use the alphabatized list below to find the answer to your single-term questions, and click the bolded list items to explore more on the topics! We'll be sure to keep constantly updating this list, so if you hear a word that you would like for us to cover, just let us know or submit a request!
10 +
11 +[A](#a) | [B](#b) | [C](#c) | [D](#d)| [E](#e) | [F](#f) | [G](#g) | [H](#h) | [I](#i) | [J](#j) | [K](#k) | [L](#l) | [M](#m) | [N](#n) | [O](#o) | [P](#p)
12 +| [Q](#q) | [R](#r) | [S](#s) | [T](#t) | [U](#u) | [V](#v) | [W](#w) | [X](#x) | [Y](#y) | [Z](#z)
13 +
14 +## A
15 +
16 +- [**Agent** or **Netdata Agent**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/overview.md): Netdata's distributed monitoring Agent collects thousands of metrics from systems, hardware, and applications with zero configuration. It runs permanently on all your physical/virtual servers, containers, cloud deployments, and edge/IoT devices.
17 +
18 +- [**Agent-cloud link** or **ACLK**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/aclk.md): The Agent-Cloud link (ACLK) is the mechanism responsible for securely connecting a Netdata Agent to your web browser through Netdata Cloud.
19 +
20 +- [**Aggregate Function**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/netdata-views.md#aggregate-functions-over-data-sources): A function applied When the granularity of the data collected is higher than the plotted points on the chart.
21 +
22 +- [**Alerts** (formerly **Alarms**)](https://github.com/netdata/netdata/blob/master/docs/concepts/health-monitoring/alerts.md): With the information that appears on Netdata Cloud and the local dashboard about active alerts, you can configure alerts to match your infrastructure's needs or your team's goals.
23 +
24 +- [**Alarm Entity Type**](https://github.com/netdata/netdata/blob/master/docs/concepts/health-monitoring/alerts.md#entity-types): Entity types that are attached to specific charts and use the `alarm` label.
25 +
26 +- [**Anomaly Advisor**](https://github.com/netdata/netdata/blob/master/docs/concepts/guided-troubleshooting/machine-learning-powered-anomaly-advisor.md): A Netdata feature that lets you quickly surface potentially anomalous metrics and charts related to a particular highlight window of interest.
27 +
28 +## B
29 +
30 +- [**Bookmarks**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/rooms.md#bookmarks-for--essential-resources): Netdata Cloud's bookmarks put your tools in one accessible place. Bookmarks are shared between all War Rooms in a Space, so any users in your Space will be able to see and use them.
31 +
32 +## C
33 +
34 +- [**Child**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-streaming-replication.md#streaming-basics): A node, running Netdata, that streams metric data to one or more parent.
35 +
36 +- [**Cloud** or **Netdata Cloud**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/overview.md): Netdata Cloud is a web application that gives you real-time visibility for your entire infrastructure. With Netdata Cloud, you can view key metrics, insightful charts, and active alarms from all your nodes in a single web interface.
37 +
38 +- [**Collector**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-collection.md#collector-architecture-and-terminology): A catch-all term for any Netdata process that gathers metrics from an endpoint.
39 +
40 +- [**Community**](https://github.com/netdata/netdata/blob/master/docs/getting-started/introduction.md#community): As a company with a passion and genesis in open-source, we are not just very proud of our community, but we consider our users, fans, and chatters to be an imperative part of the Netdata experience and culture.
41 +
42 +- [**Composite Charts**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/netdata-views.md#composite-charts): Charts used by the **Overview** tab which aggregate metrics from all the nodes (or a filtered selection) in a given War Room.
43 +
44 +- [**Context**](https://github.com/netdata/netdata/blob/master/docs/concepts/visualizations/from-raw-metrics-to-visualization.md#context): A way of grouping charts by the types of metrics collected and dimensions displayed. It's kind of like a machine-readable naming and organization scheme.
45 +
46 +- [**Custom dashboards**](https://github.com/netdata/netdata/blob/master/docs/concepts/visualizations/dashboards.md#custom-dashboards) A dashboard that you can create using simple HTML (no javascript is required for basic dashboards).
47 +
48 +## D
49 +
50 +- [**Dashboards**](https://github.com/netdata/netdata/blob/master/docs/concepts/visualizations/dashboards.md): Out-of-the box visual presentation of metrics that allows you to make sense of your infrastructure and its health and performance.
51 +
52 +- [**Definition Bar**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/netdata-views.md#composite-charts): Bar within a composite chart that provides important information and options about the metrics within the chart.
53 +
54 +- [**Dimension** or **Group by**](https://github.com/netdata/netdata/blob/master/docs/concepts/visualizations/from-raw-metrics-to-visualization.md#dimension): A dimension is a value that gets shown on a chart. The drop-down on the dimension bar of a composite chart that allows you to group metrics by dimension, node, or chart.
55 +
56 +- [**Distributed Architecture**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-architecture/distributed-data-architecture.md): The data architecture mindset with which Netdata was built, where all data are collected and stored on the edge, whenever it's possible, creating countless benefits.
57 +
58 +## E
59 +
60 +- [**External Plugins**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-collection.md#collector-architecture-and-terminology): These gather metrics from external processes, such as a webserver or database, and run as independent processes that communicate with the Netdata daemon via pipes.
61 +
62 +## F
63 +
64 +- [Family](https://github.com/netdata/netdata/blob/master/docs/concepts/visualizations/from-raw-metrics-to-visualization.md#family): 1. What we consider our Netdata community of users and engineers. 2. A single instance of a hardware or software resource that needs to be displayed separately from similar instances.
65 +
66 +- [**Flood Protection**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/netdata-views.md#group-by-dimension-node-or-chart): If a node has too many state changes like firing too many alerts or going from reachable to unreachable, Netdata Cloud enables flood protection. As long as a node is in flood protection mode, Netdata Cloud does not send notifications about this node
67 +
68 +- [**Functions** or **Netdata Functions**](https://github.com/netdata/netdata/blob/master/docs/concepts/guided-troubleshooting/netdata-functions.md): Routines exposed by a collector on the Netdata Agent that can bring additional information to support troubleshooting or trigger some action to happen on the node itself.
69 +
70 +## G
71 +
72 +- [**Guided Troubleshooting**](https://github.com/netdata/netdata/blob/master/docs/concepts/guided-troubleshooting/Overview.md): Troubleshooting with our Machine-Learning-powered tools designed to give you a cutting edge advantage in your troubleshooting battles.
73 +
74 +- [**Group by** or **Dimension**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/netdata-views.md#group-by-dimension-node-or-chart): A dimension is a value that gets shown on a chart. The drop-down on the dimension bar of a composite chart that allows you to group metrics by dimension, node, or chart.
75 +
76 +## H
77 +
78 +- [**Headless Collector Streaming**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-streaming-replication.md): Streaming configuration where child `A`, _without_ a database or web dashboard, streams metrics to parent `B`.
79 +
80 +- [**Health Configuration Files**](https://github.com/netdata/netdata/blob/master/docs/concepts/health-monitoring/alerts.md#health-configuration-files): Files that you can edit to configure your Agent's health watchdog service.
81 +
82 +- [**Health Entity Reference**](https://github.com/netdata/netdata/blob/master/docs/concepts/health-monitoring/alerts.md#health-entity-reference):
83 +
84 +- [**High Fidelity** or **High Fidelity Architecture**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-architecture/high-fidelity-monitoring.md): We consider Netdata's monitoring solution "high fidelity" because it provides real time metrics so you can view metrics/changes in seconds since their occur, the highest resolution of metrics to allow you to observe changes occur between seconds, gixed step metric collection to allow you to quantify your observation windows, and unlimited data to search for patterns in data that you don't even believe they are correlated.
85 +
86 +- [**Home** tab](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/netdata-views.md#home): Tab in Netdata Cloud that provides a predefined dashboard of relevant information about entities in the War Room.
87 +
88 +## I
89 +
90 +- [**Internal plugins**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-collection.md#collector-architecture-and-terminology): These gather metrics from `/proc`, `/sys`, and other Linux kernel sources. They are written in `C` and run as threads within the Netdata daemon.
91 +
92 +## K
93 +
94 +- [**Kickstart** or **Kickstart Script**](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md): An automatic one-line installation script named 'kickstart.sh' that works on all Linux distributions and macOS.
95 +
96 +- [**Kubernetes Dashboard** or **Kubernetes View**](https://github.com/netdata/netdata/blob/master/docs/concepts/visualizations/dashboards.md#kubernetes-dashboard): Netdata Cloud features enhanced visualizations for the resource utilization of Kubernetes (k8s) clusters, embedded in the default Overview dashboard.
97 +## M
98 +
99 +- [**Metrics Collection**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-collection.md): With zero configuration, Netdata auto-detects thousands of data sources upon starting and immediately collects per-second metrics. Netdata can immediately collect metrics from these endpoints thanks to 300+ collectors, which all come pre-installed when you install Netdata.
100 +
101 +- [**Metric Correlations**](https://github.com/netdata/netdata/blob/master/docs/concepts/guided-troubleshooting/metric-correlations.md): A Netdata feature that lets you quickly find metrics and charts related to a particular window of interest that you want to explore further.
102 +
103 +- [**Metrics Exporting**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-exporting.md): Netdata allows you to export metrics to external time-series databases with the exporting engine. This system uses a number of connectors to initiate connections to more than thirty supported databases, including InfluxDB, Prometheus, Graphite, ElasticSearch, and much more.
104 +
105 +- [**Metrics Storage**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-storage.md): Upon collection the collected metrics need to be either forwarded, exported or just stored for further treatment. The Agent is capable to store metrics both short and long-term, with or without the usage of non-volatile storage.
106 +
107 +- [**Metrics Streaming Replication**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-streaming-replication.md): Each node running Netdata can stream the metrics it collects, in real time, to another node. Metric streaming allows you to replicate metrics data across multiple nodes, or centralize all your metrics data into a single time-series database (TSDB).
108 +
109 +- [**Module**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-collection.md#collector-architecture-and-terminology): A type of collector.
110 +
111 +## N
112 +
113 +- [**Netdata**](https://github.com/netdata/netdata/blob/master/docs/getting-started/introduction.md): Netdata is a monitoring tool designed by system administrators, DevOps engineers, and developers to collect everything, help you visualize
114 +metrics, troubleshoot complex performance problems, and make data interoperable with the rest of your monitoring stack.
115 +
116 +- [**Netdata Agent** or **Agent**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/overview.md): Netdata's distributed monitoring Agent collects thousands of metrics from systems, hardware, and applications with zero configuration. It runs permanently on all your physical/virtual servers, containers, cloud deployments, and edge/IoT devices.
117 +
118 +- [**Netdata Cloud** or **Cloud**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/overview.md): Netdata Cloud is a web application that gives you real-time visibility for your entire infrastructure. With Netdata Cloud, you can view key metrics, insightful charts, and active alarms from all your nodes in a single web interface.
119 +
120 +- [**Netdata Functions** or **Functions**](https://github.com/netdata/netdata/blob/master/docs/concepts/guided-troubleshooting/netdata-functions.md): Routines exposed by a collector on the Netdata Agent that can bring additional information to support troubleshooting or trigger some action to happen on the node itself.
121 +
122 +<!-- No link for this keyword - [**Netdata Logs**](https://github.com/netdata/netdata/blob/master/docs/tasks/miscellaneous/check-netdata-logs.md): The three log files - `error.log`, `access.log` and `debug.log` - used by Netdata -->
123 +
124 +- [**Notifications**](https://github.com/netdata/netdata/blob/master/docs/concepts/health-monitoring/notifications.md): Netdata can send centralized alert notifications to your team whenever a node enters a warning, critical, or unreachable state. By enabling notifications, you ensure no alert, on any node in your infrastructure, goes unnoticed by you or your team.
125 +
126 +## O
127 +
128 +- [**Obsoletion**(of nodes)](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/spaces.md#obsolete-offline-nodes): Removing nodes from a space.
129 +
130 +- [**Orchestrators**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-collection.md#collector-architecture-and-terminology): External plugins that run and manage one or more modules. They run as independent processes.
131 +
132 +- [**Overview** tab](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/netdata-views.md#overview): Tab in Netdata Cloud that uses composite charts. These charts display real-time aggregated metrics from all the nodes (or a filtered selection) in a given War Room.
133 +
134 +## P
135 +
136 +- [**Parent**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-streaming-replication.md#streaming-basics): A node, running Netdata, that receives streamed metric data.
137 +
138 +- [**Proxy**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-streaming-replication.md#streaming-basics): A node, running Netdata, that receives metric data from a child and "forwards" them on to a separate parent node.
139 +
140 +- [**Proxy Streaming**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-streaming-replication.md#supported-streaming-configurations): Streaming configuration where child `A`, _with or without_ a database, sends metrics to proxy `C`, also _with or without_ a database. `C` sends metrics to parent `B`
141 +
142 +## R
143 +
144 +- [**Registry**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/registry.md): Registry that allows Netdata to provide unified cross-server dashboards.
145 +
146 +- [**Replication Streaming**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-streaming-replication.md): Streaming configuration where child `A`, _with_ a database and web dashboard, streams metrics to parent `B`.
147 +
148 +- [**Room** or **War Room**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/rooms.md): War Rooms organize your connected nodes and provide infrastructure-wide dashboards using real-time metrics and visualizations.
149 +
150 +## S
151 +
152 +- [**Single Node Dashboard**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/netdata-views.md#jump-to-single-node-dashboards-1): A dashboard pre-configured with every installation of the Netdata agent, with thousand of metrics and hundreds of interactive charts that requires no set up.
153 +
154 +<!-- No link for this file in current structure. - [**Snapshots**](https://github.com/netdata/netdata/blob/master/docs/tasks/miscellaneous/snapshot-data.md): An image of your dashboard at any given time, whicn can be imiported into any other node running Netdata or used to genereated a PDF file for your records. -->
155 +
156 +- [**Space**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/spaces.md): A high-level container and virtual collaboration area where you can organize team members, access levels,and the nodes you want to monitor.
157 +
158 +## T
159 +
160 +- [**Template Entity Type**](https://github.com/netdata/netdata/blob/master/docs/concepts/health-monitoring/alerts.md#entity-types): Entity type that defines rules that apply to all charts of a specific context, and use the template label. Templates help you apply one entity to all disks, all network interfaces, all MySQL databases, and so on.
161 +
162 +- [**Tiering**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-agent/metrics-storage.md#tiering): Tiering is a mechanism of providing multiple tiers of data with different granularity of metrics (the frequency they are collected and stored, i.e. their resolution).
163 +
164 +## U
165 +
166 +- [**Unlimited Scalability**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-architecture/unlimited-scalability.md): With Netdata's distributed architecture, you can seamless observe a couple, hundreds or
167 +even thousands of nodes. There are no actual bottlenecks especially if you retain metrics locally in the Agents.
168 +
169 +## V
170 +
171 +- [**Visualizations**](https://github.com/netdata/netdata/blob/master/docs/concepts/visualizations/from-raw-metrics-to-visualization.md): Netdata uses dimensions, contexts, and families to sort your metric data into graphs, charts, and alerts that maximize your understand of your infrastructure and your ability to troubleshoot it, along or on a team.
172 +
173 +## W
174 +
175 +- [**War Room** or **Room**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-cloud/rooms.md): War Rooms organize your connected nodes and provide infrastructure-wide dashboards using real-time metrics and visualizations.
176 +
177 +## Z
178 +
179 +- [**Zero Configuration**](https://github.com/netdata/netdata/blob/master/docs/concepts/netdata-architecture/zero-configuration.md): Netdata is preconfigured and capable to autodetect and monitor any well known application that runs on your system. You just deploy and claim Netdata Agents in your Netdata space, and monitor them in seconds.
docs/guidelines.md
+30 -729
@@ -1,12 +1,4 @@
1 -<!--
2 -title: "Contribute to the documentation"
3 -sidebar_label: "Contribute to the documentation"
4 -custom_edit_url: "https://github.com/netdata/netdata/blob/master/docs/guidelines.md"
5 -sidebar_position: "10"
6 -learn_status: "Published"
7 -learn_topic_type: "Custom"
8 -learn_rel_path: "Contribute"
9 --->
1 +# Contribute to the documentation
2
3 import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
4
@@ -17,750 +9,59 @@ docs (**learn.netdata.cloud**)
9
10 ## Documentation architecture
11
20 -Netdata docs follows has two principals.
12 +Our documentation in https://learn.netdata.cloud is generated by markdown documents in the public
13 +Github repositories of the "netdata" organization.
14
22 -1. Keep the documentation of each component _as close as you can to the codebase_
23 -2. Every component is analyzed via topic related docs.
24 -
25 -To this end:
26 -
27 -1. Documentation lives in every possible repo in the netdata organization. At the moment we contribute to:
28 - - netdata/netdata
29 - - netdata/learn (final site)
30 - - netdata/go.d.plugin
31 - - netdata/agent-service-discovery
32 -
33 - In each of these repos you will find markdown files. These markdown files may or not be part of the final docs. You
34 - understand what documents are part of the final docs in the following section:[_How to update documentation of
35 - learn.netdata.cloud_](#how-to-update-documentation-of-learn-netdata-cloud)
36 -
37 -2. Netdata docs processes are inspired from
38 - the [DITA 1.2 guidelines](http://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/dita-1.2_technicalContent_overview.html)
39 - for Technical content.
40 -
41 -## Topic types
42 -
43 -### Concepts
44 -
45 -A concept introduces a single feature or concept. A concept should answer the questions:
46 -
47 -- What is this?
48 -- Why would I use it?
49 -
50 -Concept topics:
51 -
52 -- Are abstract ideas
53 -- Explain meaning or benefit
54 -- Can stay when specifications change
55 -- Provide background information
56 -
57 -### Tasks
58 -
59 -Concept and reference topics exist to support tasks. _The goal for users … is not to understand a concept but to
60 -complete a task_. A task gives instructions for how to complete a procedure.
61 -
62 -Much of the uncertainty whether a topic is a concept or a reference disappears, when you have strong, solid task topics
63 -in place, furthermore topics directly address your users and their daily tasks and help them to get their job done. A
64 -task **must give an answer** to the **following questions**:
65 -
66 -- How do I create cool espresso drinks with my new coffee machine?
67 -- How do I clean the milk steamer?
68 -
69 -For the title text, use the structure active verb + noun. For example, for instance _Deploy the Agent_.
70 -
71 -### References
72 -
73 -The reference document and information types provide for the separation of fact-based information from concepts and
74 -tasks. \
75 -Factual information may include tables and lists of specifications, parameters, parts, commands, edit-files and other
76 -information that the users are likely to look up. The reference information type allows fact-based content to be
77 -maintained by those responsible for its accuracy and consistency.
78 -
79 -## Contribute to the documentation of learn.netdata.cloud
80 -
81 -### Encapsulate topics into markdown files.
82 -
83 -Netdata uses markdown files to document everything. To implement concrete sections of these [Topic types](#topic-types)
84 -we encapsulate this logic as follows. Every document is characterized by its topic type ('learn_topic_type' metadata
85 -field). To avoid breaking every single netdata concept into numerous small markdown files each document can be either a
86 -single `Reference` or `Concept` or `Task` or a group of `References`, `Concepts`, `Tasks`.
87 -
88 -To this end, every single topic is encapsulated into a `Heading 3 (###)` section. That means, when you have a single
89 -file you only make use of `Headings 4` and lower (`4, 5, 6`, for templated section or subsection). In case you want to
90 -includ multiple (`Concepts` let's say) in a single document, you use `Headings 3` to seperate each concept. `Headings 2`
91 -are used only in case you want to logically group topics inside a document.
92 -
93 -For instance:
94 -
95 -```markdown
96 -
97 -Small introduction of the document.
98 -
99 -### Concept A
100 -
101 -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
102 -aliqua.
103 -
104 -#### Field from template 1
105 -
106 -Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
107 -
108 -#### Field from template 1
109 -
110 -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
111 -
112 -##### Subsection 1
113 -
114 -. . .
115 -
116 -### Concept A
117 -
118 -Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
119 -
120 -#### Field from template 1
121 -
122 -. . .
123 -
124 -
125 -```
126 -
127 -This approach gives a clean and readable outlook in each document from a single sidebar.
128 -
129 -Here you can find the preferred templates for each topic type:
130 -
131 -
132 -<Tabs>
133 - <TabItem value="Concept" label="Concept" default>
134 -
135 - ```markdown
136 - Small intro, give some context to the user of what you will cover on this document
137 -
138 - ### concept title (omit if the document describes only one concept)
139 -
140 - A concept introduces a single feature or concept. A concept should answer the questions:
141 -
142 - 1. What is this?
143 - 2. Why would I use it?
144 -
145 - ```
146 -
147 - </TabItem>
148 - <TabItem value="Task" label="Tasks">
149 -
150 - ```markdown
151 - Small intro, give some context to the user of what you will cover on this document
152 -
153 - ### Task title (omit if the document describes only one task)
154 -
155 - #### Prerequisite
156 -
157 - Unordered list of what you will need.
158 -
159 - #### Steps
160 -
161 - Exact list of step the user must follow
162 -
163 - #### Expected result
164 -
165 - What you expect to see when you complete the steps above
166 -
167 - #### Example
168 -
169 - Example configuration/actions of the task
170 -
171 - #### Related reference documentation
172 -
173 - List of reference docs user needs to be aware of.
174 - ```
175 -
176 - </TabItem>
177 - <TabItem value="Reference-collectors" label="Reference-collectors">
178 -
179 - ```markdown
180 - Small intro, give some context to the user of what you will cover on this document
181 -
182 - ### Reference name (omit if the document describes only one reference)
183 -
184 - #### Requirements
185 -
186 - Document any dependencies needed to run this module
187 -
188 - #### Requirements on the monitored component
189 -
190 - Document any steps user must take to sucessful monitor application,
191 - for instance (create a user)
192 -
193 - #### Configuration files
194 -
195 - table with path and configuration files purpose
196 - Columns: File name | Description (Purpose in a nutshell)
197 -
198 - #### Data collection
199 -
200 - To make changes, see `the ./edit-config task <link>`
201 -
202 - #### Auto discovery
203 -
204 - ##### Single node installation
205 -
206 - . . . we autodetect localhost:port and what configurations are defaults
207 -
208 - ##### Kubernetes installations
209 -
210 - . . . Service discovery, click here
211 -
212 - #### Metrics
213 -
214 - Columns: Metric (Context) | Scope | description (of the context) | dimensions | units (of the context) | Alert triggered
215 -
216 -
217 - #### Alerts
218 -
219 - Collapsible content for every alert, just like the alert guides
220 -
221 - #### Configuration options
222 -
223 - Table with all the configuration options available.
224 -
225 - Columns: name | description | default | file_name
226 -
227 - #### Configuration example
228 -
229 - Default configuration example
230 -
231 - #### Troubleshoot
232 -
233 - backlink to the task to run this module in debug mode (here you provide the debug flags)
234 -
235 -
236 -```
237 -
238 - </TabItem>
239 -</Tabs>
240 -
241 -### Metadata fields
242 -
243 -All Docs that are supposed to be part of learn.netdata.cloud have **hidden** sections in the begining of document. These
244 -sections are plain lines of text and we call them metadata. Their represented as `key : "Value"` pairs. Some of them are
245 -needed from our statice website builder (docusaurus) others are needed for our internal pipelines to build docs
246 -(have prefix `learn_`).
247 -
248 -So let's go through the different necessary metadata tags to get a document properly published on Learn:
249 -
250 -| metadata_key | Value(s) | Frontmatter effect | Mandatory | Limitations |
251 -|:---------------------:|---------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------:|:---------------------------------------:|
252 -| `title` | `String` | Title in each document | yes | |
253 -| `custom_edit_url` | `String` | The source GH link of the file | yes | |
254 -| `description` | `String or multiline String` | - | yes | |
255 -| `sidebar_label` | `String or multiline String` | Name in the TOC tree | yes | |
256 -| `sidebar_position` | `String or multiline String` | Global position in the TOC tree (local for per folder) | yes | |
257 -| `learn_status` | [`Published`, `Unpublished`, `Hidden`] | `Published`: Document visible in learn,<br/> `Unpublished`: Document archived in learn, <br/>`Hidden`: Documentplaced under learn_rel_path but it's hidden] | yes | |
258 -| `learn_topic_type` | [`Concepts`, `Tasks`, `References`, `Getting Started`] | | yes | |
259 -| `learn_rel_path` | `Path` (the path you want this file to appear in learn<br/> without the /docs prefix and the name of the file | | yes | |
260 -| `learn_autogenerated` | `Dictionary` (for internal use) | | no | Keys in the dictionary must be in `' '` |
261 -
262 -:::important
263 -
264 -1. In case any mandatory tags are missing or falsely inputted the file will remain unpublished. This is by design to
265 - prevent non-properly tagged files from getting published.
266 -2. All metadata values must be included in `" "`. From `string` noted text inside the fields use `' ''`
267 -
268 -
269 -While Docusaurus can make use of more metadata tags than the above, these are the minimum we require to publish the file
270 -on Learn.
271 -
272 -:::
273 -
274 -### Placing a document in learn
275 -
276 -Here you can see how the metadata are parsed and create a markdown file in learn.
277 -
278 -![](https://user-images.githubusercontent.com/12612986/207310336-f7cc150b-543c-4f13-be98-5058a4d29284.png)
279 -
280 -### Before you get started
281 -
282 -Anyone interested in contributing to documentation should first read the [Netdata style guide](#styling-guide) further
283 -down below and the [Netdata Community Code of Conduct](https://github.com/netdata/.github/blob/main/CODE_OF_CONDUCT.md).
284 -
285 -Netdata's documentation uses Markdown syntax. If you're not familiar with Markdown, read
286 -the [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) guide from GitHub for the basics on
287 -creating paragraphs, styled text, lists, tables, and more, and read further down about some special
288 -occasions [while writing in MDX](#mdx-and-markdown).
289 -
290 -### Making your first contribution
15 +### Improve existing documentation
16
17 The easiest way to contribute to Netdata's documentation is to edit a file directly on GitHub. This is perfect for small
18 fixes to a single document, such as fixing a typo or clarifying a confusing sentence.
19
295 -Click on the **Edit this page** button on any published document on [Netdata Learn](https://learn.netdata.cloud). Each
296 -page has two of these buttons: One beneath the table of contents, and another at the end of the document, which take you
297 -to GitHub's code editor. Make your suggested changes, keeping the [Netdata style guide](#styling-guide)
298 -in mind, and use the ***Preview changes*** button to ensure your Markdown syntax works as expected.
20 +Each published document on [Netdata Learn](https://learn.netdata.cloud) includes at the bottom a link to
21 +**Edit this page**. Clicking on that link is the recommended way to improve our documentation, as it
22 +leads you directly to GitHub's code editor.
23 +Make your suggested changes, and use the ***Preview changes*** button to ensure your Markdown syntax works as expected.
24
25 Under the **Commit changes** header, write descriptive title for your requested change. Click the **Commit changes**
26 button to initiate your pull request (PR).
27
28 Jump down to our instructions on [PRs](#making-a-pull-request) for your next steps.
29
305 -**Note**: If you wish to contribute documentation that is more tailored from your specific infrastructure
306 -monitoring/troubleshooting experience, please consider submitting a blog post about your experience. Check out our [blog](https://github.com/netdata/blog#readme) repo! Any blog submissions that have
307 -widespread or universal application will be integrated into our permanent documentation.
30 +### Create a new document
31
309 -### Edit locally
32 +You can create a pull request to add a completely new markdown document in any of our public repositories.
33 +After the Github pull request is merged, our documentation team will decide where in the documentation hierarchy to publish
34 +that document.
35 +
36 +If you wish to contribute documentation that is tailored to your specific infrastructure
37 +monitoring/troubleshooting experience, please consider submitting a blog post about your experience.
38 +Check out our [blog](https://github.com/netdata/blog#readme) repo! Any blog submissions that have
39 +widespread or universal application will be integrated into our permanent documentation.
40
311 -Editing documentation locally is the preferred method for complex changes that span multiple documents or change the
312 -documentation's style or structure.
41 +#### Before you get started
42
314 -Create a fork of the Netdata Agent repository by visit the [Netdata repository](https://github.com/netdata/netdata) and
315 -clicking on the **Fork** button.
43 +Anyone interested in contributing significantly to documentation should first read the
44 +[Netdata style guide](https://github.com/netdata/netdata/blob/master/docs/contributing/style-guide.md)
45 +and the [Netdata Community Code of Conduct](https://github.com/netdata/.github/blob/main/CODE_OF_CONDUCT.md).
46
317 -GitHub will ask you where you want to clone the repository. When finished, you end up at the index of your forked
318 -Netdata Agent repository. Clone your fork to your local machine:
47 +Netdata's documentation uses Markdown syntax. If you're not familiar with Markdown, read
48 +the [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) guide from GitHub for the basics on
49 +creating paragraphs, styled text, lists, tables, and more.
50
320 -```bash
321 -git clone https://github.com/YOUR-GITHUB-USERNAME/netdata.git
322 -```
51 +#### Edit locally
52
324 -Create a new branch using `git checkout -b BRANCH-NAME`. Use your favorite text editor to make your changes, keeping
325 -the [Netdata style guide](https://github.com/netdata/netdata/blob/master/docs/contributing/style-guide.md) in mind. Add, commit, and push changes to your fork. When you're
326 -finished, visit the [Netdata Agent Pull requests](https://github.com/netdata/netdata/pulls) to create a new pull request
327 -based on the changes you made in the new branch of your fork.
53 +Editing documentation locally is the preferred method for completely new documents, or complex changes that span multiple
54 +documents. Clone the repository where you wish to make your changes, work on a new branch and create a pull request
55 +with that branch.
56
57 ### Making a pull request
58
331 -Pull requests (PRs) should be concise and informative. See our [PR guidelines](/contribute/handbook#pr-guidelines) for
59 +Pull requests (PRs) should be concise and informative. See our
60 +[PR guidelines](https://github.com/netdata/.github/blob/main/CONTRIBUTING.md#pr-guidelines) for
61 specifics.
62
334 -- The title must follow the [imperative mood](https://en.wikipedia.org/wiki/Imperative_mood) and be no more than ~50
335 - characters.
336 -- The description should explain what was changed and why. Verify that you tested any code or processes that you are
337 - trying to change.
338 -
63 The Netdata team will review your PR and assesses it for correctness, conciseness, and overall quality. We may point to
64 specific sections and ask for additional information or other fixes.
65
66 After merging your PR, the Netdata team rebuilds the [documentation site](https://learn.netdata.cloud) to publish the
67 changed documentation.
344 -
345 -## Styling guide
346 -
347 -The *Netdata style guide* establishes editorial guidelines for any writing produced by the Netdata team or the Netdata
348 -community, including documentation, articles, in-product UX copy, and more. Both internal Netdata teams and external
349 -contributors to any of Netdata's open-source projects should reference and adhere to this style guide as much as
350 -possible.
351 -
352 -Netdata's writing should **empower** and **educate**. You want to help people understand Netdata's value, encourage them
353 -to learn more, and ultimately use Netdata's products to democratize monitoring in their organizations. To achieve these
354 -goals, your writing should be:
355 -
356 -- **Clear**. Use simple words and sentences. Use strong, direct, and active language that encourages readers to action.
357 -- **Concise**. Provide solutions and answers as quickly as possible. Give users the information they need right now,
358 - along with opportunities to learn more.
359 -- **Universal**. Think of yourself as a guide giving a tour of Netdata's products, features, and capabilities to a
360 - diverse group of users. Write to reach the widest possible audience.
361 -
362 -You can achieve these goals by reading and adhering to the principles outlined below.
363 -
364 -If you're not familiar with Markdown, read
365 -the [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) guide from GitHub for the basics on
366 -creating paragraphs, styled text, lists, tables, and more.
367 -
368 -The following sections describe situations in which a specific syntax is required.
369 -
370 -#### Syntax standards (`remark-lint`)
371 -
372 -The Netdata team uses [`remark-lint`](https://github.com/remarkjs/remark-lint) for Markdown code styling.
373 -
374 -- Use a maximum of 120 characters per line.
375 -- Begin headings with hashes, such as `# H1 heading`, `## H2 heading`, and so on.
376 -- Use `_` for italics/emphasis.
377 -- Use `**` for bold.
378 -- Use dashes `-` to begin an unordered list, and put a single space after the dash.
379 -- Tables should be padded so that pipes line up vertically with added whitespace.
380 -
381 -If you want to see all the settings, open the
382 -[`remarkrc.js`](https://github.com/netdata/netdata/blob/master/.remarkrc.js) file in the `netdata/netdata` repository.
383 -
384 -#### MDX and markdown
385 -
386 -While writing in Docusaurus, you might want to take leverage of it's features that are supported in MDX formatted files.
387 -One of those that we use is [Tabs](https://docusaurus.io/docs/next/markdown-features/tabs). They use an HTML syntax,
388 -which requires some changes in the way we write markdown inside them.
389 -
390 -In detail:
391 -
392 -Due to a bug with docusaurus, we prefer to use `<h1>heading</h1> instead of # H1` so that docusaurus doesn't render the
393 -contents of all Tabs on the right hand side, while not being able to navigate
394 -them [relative link](https://github.com/facebook/docusaurus/issues/7008).
395 -
396 -You can use markdown syntax for every other styling you want to do except Admonitions:
397 -For admonitions, follow [this](https://docusaurus.io/docs/markdown-features/admonitions#usage-in-jsx) guide to use
398 -admonitions inside JSX. While writing in JSX, all the markdown stylings have to be in HTML format to be rendered
399 -properly.
400 -
401 -#### Admonitions
402 -
403 -Use admonitions cautiously. Admonitions may draw user's attention, to that end we advise you to use them only for side
404 -content/info, without significantly interrupting the document flow.
405 -
406 -You can find the supported admonitions in the docusaurus's [documentation](https://docusaurus.io/docs/markdown-features/admonitions).
407 -
408 -#### Images
409 -
410 -Don't rely on images to convey features, ideas, or instructions. Accompany every image with descriptive alt text.
411 -
412 -In Markdown, use the standard image syntax, `![](/docs/agent/contributing)`, and place the alt text between the
413 -brackets `[]`. Here's an example using our logo:
414 -
415 -```markdown
416 -![The Netdata logo](/docs/agent/web/gui/static/img/netdata-logomark.svg)
417 -```
418 -
419 -Reference in-product text, code samples, and terminal output with actual text content, not screen captures or other
420 -images. Place the text in an appropriate element, such as a blockquote or code block, so all users can parse the
421 -information.
422 -
423 -#### Syntax highlighting
424 -
425 -Our documentation site at [learn.netdata.cloud](https://learn.netdata.cloud) uses
426 -[Prism](https://v2.docusaurus.io/docs/markdown-features#syntax-highlighting) for syntax highlighting. Netdata can use
427 -any of
428 -the [supported languages by prism-react-renderer](https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/vendor/prism/includeLangs.js)
429 -.
430 -
431 -If no language is specified, Prism tries to guess the language based on its content.
432 -
433 -Include the language directly after the three backticks (```` ``` ````) that start the code block. For highlighting C
434 -code, for example:
435 -
436 -````c
437 -```c
438 -inline char *health_stock_config_dir(void) {
439 - char buffer[FILENAME_MAX + 1];
440 - snprintfz(buffer, FILENAME_MAX, "%s/health.d", netdata_configured_stock_config_dir);
441 - return config_get(CONFIG_SECTION_DIRECTORIES, "stock health config", buffer);
442 -}
443 -```
444 -````
445 -
446 -And the prettified result:
447 -
448 -```c
449 -inline char *health_stock_config_dir(void) {
450 - char buffer[FILENAME_MAX + 1];
451 - snprintfz(buffer, FILENAME_MAX, "%s/health.d", netdata_configured_stock_config_dir);
452 - return config_get(CONFIG_SECTION_DIRECTORIES, "stock health config", buffer);
453 -}
454 -```
455 -
456 -Prism also supports titles and line highlighting. See
457 -the [Docusaurus documentation](https://v2.docusaurus.io/docs/markdown-features#code-blocks) for more information.
458 -
459 -## Language, grammar, and mechanics
460 -
461 -#### Voice and tone
462 -
463 -One way we write empowering, educational content is by using a consistent voice and an appropriate tone.
464 -
465 -*Voice* is like your personality, which doesn't really change day to day.
466 -
467 -*Tone* is how you express your personality. Your expression changes based on your attitude or mood, or based on who
468 -you're around. In writing, your reflect tone in your word choice, punctuation, sentence structure, or even the use of
469 -emoji.
470 -
471 -The same idea about voice and tone applies to organizations, too. Our voice shouldn't change much between two pieces of
472 -content, no matter who wrote each, but the tone might be quite different based on who we think is reading.
473 -
474 -For example, a [blog post](https://www.netdata.cloud/blog/) and a [press release](https://www.netdata.cloud/news/)
475 -should have a similar voice, despite most often being written by different people. However, blog posts are relaxed and
476 -witty, while press releases are focused and academic. You won't see any emoji in a press release.
477 -
478 -##### Voice
479 -
480 -Netdata's voice is authentic, passionate, playful, and respectful.
481 -
482 -- **Authentic** writing is honest and fact-driven. Focus on Netdata's strength while accurately communicating what
483 - Netdata can and cannot do, and emphasize technical accuracy over hard sells and marketing jargon.
484 -- **Passionate** writing is strong and direct. Be a champion for the product or feature you're writing about, and let
485 - your unique personality and writing style shine.
486 -- **Playful** writing is friendly, thoughtful, and engaging. Don't take yourself too seriously, as long as it's not at
487 - the expense of Netdata or any of its users.
488 -- **Respectful** writing treats people the way you want to be treated. Prioritize giving solutions and answers as
489 - quickly as possible.
490 -
491 -##### Tone
492 -
493 -Netdata's tone is fun and playful, but clarity and conciseness comes first. We also tend to be informal, and aren't
494 -afraid of a playful joke or two.
495 -
496 -While we have general standards for voice and tone, we do want every individual's unique writing style to reflect in
497 -published content.
498 -
499 -#### Universal communication
500 -
501 -Netdata is a global company in every sense, with employees, contributors, and users from around the world. We strive to
502 -communicate in a way that is clear and easily understood by everyone.
503 -
504 -Here are some guidelines, pointers, and questions to be aware of as you write to ensure your writing is universal. Some
505 -of these are expanded into individual sections in
506 -the [language, grammar, and mechanics](#language-grammar-and-mechanics) section below.
507 -
508 -- Would this language make sense to someone who doesn't work here?
509 -- Could someone quickly scan this document and understand the material?
510 -- Create an information hierarchy with key information presented first and clearly called out to improve scannability.
511 -- Avoid directional language like "sidebar on the right of the page" or "header at the top of the page" since
512 - presentation elements may adapt for devices.
513 -- Use descriptive links rather than "click here" or "learn more".
514 -- Include alt text for images and image links.
515 -- Ensure any information contained within a graphic element is also available as plain text.
516 -- Avoid idioms that may not be familiar to the user or that may not make sense when translated.
517 -- Avoid local, cultural, or historical references that may be unfamiliar to users.
518 -- Prioritize active, direct language.
519 -- Avoid referring to someone's age unless it is directly relevant; likewise, avoid referring to people with age-related
520 - descriptors like "young" or "elderly."
521 -- Avoid disability-related idioms like "lame" or "falling on deaf ears." Don't refer to a person's disability unless
522 - it’s directly relevant to what you're writing.
523 -- Don't call groups of people "guys." Don't call women "girls."
524 -- Avoid gendered terms in favor of neutral alternatives, like "server" instead of "waitress" and "businessperson"
525 - instead of "businessman."
526 -- When writing about a person, use their communicated pronouns. When in doubt, just ask or use their name. It's OK to
527 - use "they" as a singular pronoun.
528 -
529 -> Some of these guidelines were adapted from MailChimp under the Creative Commons license.
530 -
531 -To ensure Netdata's writing is clear, concise, and universal, we have established standards for language, grammar, and
532 -certain writing mechanics. However, if you're writing about Netdata for an external publication, such as a guest blog
533 -post, follow that publication's style guide or standards, while keeping
534 -the [preferred spelling of Netdata terms](#netdata-specific-terms) in mind.
535 -
536 -#### Active voice
537 -
538 -Active voice is more concise and easier to understand compared to passive voice. When using active voice, the subject of
539 -the sentence is action. In passive voice, the subject is acted upon. A famous example of passive voice is the phrase
540 -"mistakes were made."
541 -
542 -| | |
543 -| --------------- | ----------------------------------------------------------------------------------------- |
544 -| Not recommended | When an alarm is triggered by a metric, a notification is sent by Netdata. |
545 -| **Recommended** | When a metric triggers an alarm, Netdata sends a notification to your preferred endpoint. |
546 -
547 -#### Second person
548 -
549 -Use the second person ("you") to give instructions or "talk" directly to users.
550 -
551 -In these situations, avoid "we," "I," "let's," and "us," particularly in documentation. The "you" pronoun can also be
552 -implied, depending on your sentence structure.
553 -
554 -One valid exception is when a member of the Netdata team or community wants to write about said team or community.
555 -
556 -| | |
557 -| ------------------------------ | ------------------------------------------------------------ |
558 -| Not recommended | To install Netdata, we should try the one-line installer... |
559 -| **Recommended** | To install Netdata, you should try the one-line installer... |
560 -| **Recommended**, implied "you" | To install Netdata, try the one-line installer... |
561 -
562 -#### "Easy" or "simple"
563 -
564 -Using words that imply the complexity of a task or feature goes against our policy
565 -of [universal communication](#universal-communication). If you claim that a task is easy and the reader struggles to
566 -complete it, you may inadvertently discourage them.
567 -
568 -However, if you give users two options and want to relay that one option is genuinely less complex than another, be
569 -specific about how and why.
570 -
571 -For example, don't write, "Netdata's one-line installer is the easiest way to install Netdata." Instead, you might want
572 -to say, "Netdata's one-line installer requires fewer steps than manually installing from source."
573 -
574 -#### Slang, metaphors, and jargon
575 -
576 -A particular word, phrase, or metaphor you're familiar with might not translate well to the other cultures featured
577 -among Netdata's global community. We recommended you avoid slang or colloquialisms in your writing.
578 -
579 -In addition, don't use abbreviations that have not yet been defined in the content. See our section on
580 -[abbreviations](#abbreviations-acronyms-and-initialisms) for additional guidance.
581 -
582 -If you must use industry jargon, such as "mean time to resolution," define the term as clearly and concisely as you can.
583 -
584 -> Netdata helps you reduce your organization's mean time to resolution (MTTR), which is the average time the responsible
585 -> team requires to repair a system and resolve an ongoing incident.
586 -
587 -#### Spelling
588 -
589 -While the Netdata team is mostly *not* American, we still aspire to use American spelling whenever possible, as it is
590 -the standard for the monitoring industry.
591 -
592 -See the [word list](#word-list) for spellings of specific words.
593 -
594 -#### Capitalization
595 -
596 -Follow the general [English standards](https://owl.purdue.edu/owl/general_writing/mechanics/help_with_capitals.html) for
597 -capitalization. In summary:
598 -
599 -- Capitalize the first word of every new sentence.
600 -- Don't use uppercase for emphasis. (Netdata is the BEST!)
601 -- Capitalize the names of brands, software, products, and companies according to their official guidelines. (Netdata,
602 - Docker, Apache, NGINX)
603 -- Avoid camel case (NetData) or all caps (NETDATA).
604 -
605 -Whenever you refer to the company Netdata, Inc., or the open-source monitoring agent the company develops, capitalize
606 -**Netdata**.
607 -
608 -However, if you are referring to a process, user, or group on a Linux system, use lowercase and fence the word in an
609 -inline code block: `` `netdata` ``.
610 -
611 -| | |
612 -| --------------- | ---------------------------------------------------------------------------------------------- |
613 -| Not recommended | The netdata agent, which spawns the netdata process, is actively maintained by netdata, inc. |
614 -| **Recommended** | The Netdata Agent, which spawns the `netdata` process, is actively maintained by Netdata, Inc. |
615 -
616 -##### Capitalization of document titles and page headings
617 -
618 -Document titles and page headings should use sentence case. That means you should only capitalize the first word.
619 -
620 -If you need to use the name of a brand, software, product, and company, capitalize it according to their official
621 -guidelines.
622 -
623 -Also, don't put a period (`.`) or colon (`:`) at the end of a title or header.
624 -
625 -| | |
626 -| --------------- | --------------------------------------------------------------------------------------------------- |
627 -| Not recommended | Getting Started Guide <br />Service Discovery and Auto-Detection: <br />Install netdata with docker |
628 -| **
629 -Recommended** | Getting started guide <br />Service discovery and auto-detection <br />Install Netdata with Docker |
630 -
631 -#### Abbreviations (acronyms and initialisms)
632 -
633 -Use abbreviations (including [acronyms and initialisms](https://www.dictionary.com/e/acronym-vs-abbreviation/)) in
634 -documentation when one exists, when it's widely accepted within the monitoring/sysadmin community, and when it improves
635 -the readability of a document.
636 -
637 -When introducing an abbreviation to a document for the first time, give the reader both the spelled-out version and the
638 -shortened version at the same time. For example:
639 -
640 -> Use Netdata to monitor Extended Berkeley Packet Filter (eBPF) metrics in real-time. After you define an abbreviation, don't switch back and forth. Use only the abbreviation for the rest of the document.
641 -
642 -You can also use abbreviations in a document's title to keep the title short and relevant. If you do this, you should
643 -still introduce the spelled-out name alongside the abbreviation as soon as possible.
644 -
645 -#### Clause order
646 -
647 -When instructing users to take action, give them the context first. By placing the context in an initial clause at the
648 -beginning of the sentence, users can immediately know if they want to read more, follow a link, or skip ahead.
649 -
650 -| | |
651 -| --------------- | ------------------------------------------------------------------------------ |
652 -| Not recommended | Read the reference guide if you'd like to learn more about custom dashboards. |
653 -| **Recommended** | If you'd like to learn more about custom dashboards, read the reference guide. |
654 -
655 -#### Oxford comma
656 -
657 -The Oxford comma is the comma used after the second-to-last item in a list of three or more items. It appears just
658 -before "and" or "or."
659 -
660 -| | |
661 -| --------------- | ---------------------------------------------------------------------------- |
662 -| Not recommended | Netdata can monitor RAM, disk I/O, MySQL queries per second and lm-sensors. |
663 -| **Recommended** | Netdata can monitor RAM, disk I/O, MySQL queries per second, and lm-sensors. |
664 -
665 -#### Future releases or features
666 -
667 -Do not mention future releases or upcoming features in writing unless they have been previously communicated via a
668 -public roadmap.
669 -
670 -In particular, documentation must describe, as accurately as possible, the Netdata Agent _as of
671 -the [latest commit](https://github.com/netdata/netdata/commits/master) in the GitHub repository_. For Netdata Cloud,
672 -documentation must reflect the *current state* of [production](https://app.netdata.cloud).
673 -
674 -#### Informational links
675 -
676 -Every link should clearly state its destination. Don't use words like "here" to describe where a link will take your
677 -reader.
678 -
679 -| | |
680 -| --------------- | ------------------------------------------------------------------------------------------ |
681 -| Not recommended | To install Netdata, click [here](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md). |
682 -| **Recommended** | To install Netdata, read the [installation instructions](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md). |
683 -
684 -Use links as often as required to provide necessary context. Blog posts and guides require less hyperlinks than
685 -documentation. See the section on [linking between documentation](#linking-between-documentation) for guidance on the
686 -Markdown syntax and path structure of inter-documentation links.
687 -
688 -#### Contractions
689 -
690 -Contractions like "you'll" or "they're" are acceptable in most Netdata writing. They're both authentic and playful, and
691 -reinforce the idea that you, as a writer, are guiding users through a particular idea, process, or feature.
692 -
693 -Contractions are generally not used in press releases or other media engagements.
694 -
695 -#### Emoji
696 -
697 -Emoji can add fun and character to your writing, but should be used sparingly and only if it matches the content's tone
698 -and desired audience.
699 -
700 -#### Switching Linux users
701 -
702 -Netdata documentation often suggests that users switch from their normal user to the `netdata` user to run specific
703 -commands. Use the following command to instruct users to make the switch:
704 -
705 -```bash
706 -sudo su -s /bin/bash netdata
707 -```
708 -
709 -#### Hostname/IP address of a node
710 -
711 -Use `NODE` instead of an actual or example IP address/hostname when referencing the process of navigating to a dashboard
712 -or API endpoint in a browser.
713 -
714 -| | |
715 -| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
716 -| Not recommended | Navigate to `http://example.com:19999` in your browser to see Netdata's dashboard. <br />Navigate to `http://203.0.113.0:19999` in your browser to see Netdata's dashboard. |
717 -| **
718 -Recommended** | Navigate to `http://NODE:19999` in your browser to see Netdata's dashboard. |
719 -
720 -If you worry that `NODE` doesn't provide enough context for the user, particularly in documentation or guides designed
721 -for beginners, you can provide an explanation:
722 -
723 -> With the Netdata Agent running, visit `http://NODE:19999/api/v1/info` in your browser, replacing `NODE` with the IP
724 -> address or hostname of your Agent.
725 -
726 -#### Paths and running commands
727 -
728 -When instructing users to run a Netdata-specific command, don't assume the path to said command, because not every
729 -Netdata Agent installation will have commands under the same paths. When applicable, help them navigate to the correct
730 -path, providing a recommendation or instructions on how to view the running configuration, which includes the correct
731 -paths.
732 -
733 -For example, the [configuration](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) doc first teaches users how to find the Netdata config directory
734 -and navigate to it, then runs commands from the `/etc/netdata` path so that the instructions are more universal.
735 -
736 -Don't include full paths, beginning from the system's root (`/`), as these might not work on certain systems.
737 -
738 -| | |
739 -| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
740 -| Not recommended | Use `edit-config` to edit Netdata's configuration: `sudo /etc/netdata/edit-config netdata.conf`. |
741 -| **
742 -Recommended** | Use `edit-config` to edit Netdata's configuration by first navigating to your [Netdata config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory), which is typically at `/etc/netdata`, then running `sudo edit-config netdata.conf`. |
743 -
744 -#### `sudo`
745 -
746 -Include `sudo` before a command if you believe most Netdata users will need to elevate privileges to run it. This makes
747 -our writing more universal, and users on `sudo`-less systems are generally already aware that they need to run commands
748 -differently.
749 -
750 -For example, most users need to use `sudo` with the `edit-config` script, because the Netdata config directory is owned
751 -by the `netdata` user. Same goes for restarting the Netdata Agent with `systemctl`.
752 -
753 -| | |
754 -| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
755 -| Not recommended | Run `edit-config netdata.conf` to configure the Netdata Agent. <br />Run `systemctl restart netdata` to restart the Netdata Agent. |
756 -| **
757 -Recommended** | Run `sudo edit-config netdata.conf` to configure the Netdata Agent. <br />Run `sudo systemctl restart netdata` to restart the Netdata Agent. |
758 -
759 -## Deploy and test docs
760 -
761 -<!--
762 -TODO: Update this section after implemeting a _docker-compose_ for builting and testing learn
763 --->
764 -
765 -The Netdata team aggregates and publishes all documentation at [learn.netdata.cloud](/) using
766 -[Docusaurus](https://v2.docusaurus.io/) over at the [`netdata/learn` repository](https://github.com/netdata/learn).
docs/guides/troubleshoot/monitor-debug-applications-ebpf.md
+1 -1
@@ -243,7 +243,7 @@ You can also read how to [monitor your infrastructure with Netdata Cloud](https:
243
244 Once you've added one or more nodes to a Space in Netdata Cloud, you can see aggregated eBPF metrics in the [Overview
245 dashboard](https://github.com/netdata/netdata/blob/master/docs/visualize/overview-infrastructure.md) under the same **Applications** or **eBPF** sections that you
246 -find on the local Agent dashboard. Or, [create new dashboards](https://github.com/netdata/netdata/blob/master/docs/visualize/create-dashboards.md) using eBPF metrics
246 +find on the local Agent dashboard. Or, [create new dashboards](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/dashboards.md) using eBPF metrics
247 from any number of distributed nodes to see how your application interacts with multiple Linux kernels on multiple Linux
248 systems.
249
docs/metrics-storage-management/enable-streaming.md
+29
@@ -59,6 +59,34 @@ Here are a few example streaming configurations:
59 metrics to parent `B`.
60 - Any node with a database can generate alarms.
61
62 +### A basic auto-scaling setup
63 +
64 +If your nodes are ephemeral, a Netdata parent with persistent storage outside your production infrastructure can be used to
65 +store all the metrics from the Netdata children running on the ephemeral nodes.
66 +
67 +![A diagram of an auto-scaling setup with Netdata](https://user-images.githubusercontent.com/1153921/84290043-0c1c1600-aaf8-11ea-9757-dd8dd8a8ec6c.png)
68 +
69 +### Archiving to a time-series database
70 +
71 +The parent Netdata node can also archive metrics, for all its child nodes, to an external time-series database.
72 +
73 +Check the Netdata [exporting documentation](https://github.com/netdata/netdata/blob/master/docs/export/external-databases.md) for configuring this.
74 +
75 +This is how such a solution will work:
76 +
77 +![Diagram showing an example configuration for archiving to a time-series
78 +database](https://user-images.githubusercontent.com/1153921/84291308-c2ccc600-aaf9-11ea-98a9-89ccbf3a62dd.png)
79 +
80 +### An advanced setup
81 +
82 +Netdata also supports `proxies` with and without a local database, and data retention can be different between all nodes.
83 +
84 +This means a setup like the following is also possible:
85 +
86 +<p align="center">
87 +<img src="https://cloud.githubusercontent.com/assets/2662304/23629551/bb1fd9c2-02c0-11e7-90f5-cab5a3ed4c53.png"/>
88 +</p>
89 +
90 ## Enable streaming between nodes
91
92 The simplest streaming configuration is **replication**, in which a child node streams its metrics in real time to a
@@ -190,3 +218,4 @@ separate parent and child dashboards.
218
219 The child dashboard is also available directly at `http://PARENT-NODE:19999/host/CHILD-HOSTNAME`, which in this example
220 is `http://203.0.113.0:19999/host/netdata-child`.
221 +
docs/metrics-storage-management/reference-streaming.md deleted
-489
@@ -1,489 +0,0 @@
1 -<!--
2 -title: "Streaming reference"
3 -description: "Each node running Netdata can stream the metrics it collects, in real time, to another node. See all of the available settings in this reference document."
4 -type: "reference"
5 -custom_edit_url: "https://github.com/netdata/netdata/edit/master/docs/metrics-storage-management/reference-streaming.md"
6 -sidebar_label: "Streaming reference"
7 -learn_status: "Published"
8 -learn_rel_path: "Configuration"
9 --->
10 -
11 -# Streaming reference
12 -
13 -Each node running Netdata can stream the metrics it collects, in real time, to another node. To learn more, read about
14 -[how streaming works](https://github.com/netdata/netdata/blob/master/docs/metrics-storage-management/enable-streaming.md).
15 -
16 -For a quickstart guide for enabling a simple `parent-child` streaming relationship, see our [stream metrics between
17 -nodes](https://github.com/netdata/netdata/blob/master/docs/metrics-storage-management/enable-streaming.md) doc. All other configuration options and scenarios are
18 -covered in the sections below.
19 -
20 -## Configuration
21 -
22 -There are two files responsible for configuring Netdata's streaming capabilities: `stream.conf` and `netdata.conf`.
23 -
24 -From within your Netdata config directory (typically `/etc/netdata`), [use `edit-config`](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) to
25 -open either `stream.conf` or `netdata.conf`.
26 -
27 -```
28 -sudo ./edit-config stream.conf
29 -sudo ./edit-config netdata.conf
30 -```
31 -
32 -## Settings
33 -
34 -As mentioned above, both `stream.conf` and `netdata.conf` contain settings relevant to streaming.
35 -
36 -### `stream.conf`
37 -
38 -The `stream.conf` file contains three sections. The `[stream]` section is for configuring child nodes.
39 -
40 -The `[API_KEY]` and `[MACHINE_GUID]` sections are both for configuring parent nodes, and share the same settings.
41 -`[API_KEY]` settings affect every child node using that key, whereas `[MACHINE_GUID]` settings affect only the child
42 -node with a matching GUID.
43 -
44 -The file `/var/lib/netdata/registry/netdata.public.unique.id` contains a random GUID that **uniquely identifies each
45 -node**. This file is automatically generated by Netdata the first time it is started and remains unaltered forever.
46 -
47 -#### `[stream]` section
48 -
49 -| Setting | Default | Description |
50 -| :---------------------------------------------- | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51 -| `enabled` | `no` | Whether this node streams metrics to any parent. Change to `yes` to enable streaming. |
52 -| [`destination`](#destination) | ` ` | A space-separated list of parent nodes to attempt to stream to, with the first available parent receiving metrics, using the following format: `[PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL]`. [Read more &rarr;](#destination) |
53 -| `ssl skip certificate verification` | `yes` | If you want to accept self-signed or expired certificates, set to `yes` and uncomment. |
54 -| `CApath` | `/etc/ssl/certs/` | The directory where known certificates are found. Defaults to OpenSSL's default path. |
55 -| `CAfile` | `/etc/ssl/certs/cert.pem` | Add a parent node certificate to the list of known certificates in `CAPath`. |
56 -| `api key` | ` ` | The `API_KEY` to use as the child node. |
57 -| `timeout seconds` | `60` | The timeout to connect and send metrics to a parent. |
58 -| `default port` | `19999` | The port to use if `destination` does not specify one. |
59 -| [`send charts matching`](#send-charts-matching) | `*` | A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) to filter which charts are streamed. [Read more &rarr;](#send-charts-matching) |
60 -| `buffer size bytes` | `10485760` | The size of the buffer to use when sending metrics. The default `10485760` equals a buffer of 10MB, which is good for 60 seconds of data. Increase this if you expect latencies higher than that. The buffer is flushed on reconnect. |
61 -| `reconnect delay seconds` | `5` | How long to wait until retrying to connect to the parent node. |
62 -| `initial clock resync iterations` | `60` | Sync the clock of charts for how many seconds when starting. |
63 -
64 -### `[API_KEY]` and `[MACHINE_GUID]` sections
65 -
66 -| Setting | Default | Description |
67 -| :---------------------------------------------- | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68 -| `enabled` | `no` | Whether this API KEY enabled or disabled. |
69 -| [`allow from`](#allow-from) | `*` | A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) matching the IPs of nodes that will stream metrics using this API key. [Read more &rarr;](#allow-from) |
70 -| `default history` | `3600` | The default amount of child metrics history to retain when using the `save`, `map`, or `ram` memory modes. |
71 -| [`default memory mode`](#default-memory-mode) | `ram` | The [database](https://github.com/netdata/netdata/blob/master/database/README.md) to use for all nodes using this `API_KEY`. Valid settings are `dbengine`, `map`, `save`, `ram`, or `none`. [Read more &rarr;](#default-memory-mode) |
72 -| `health enabled by default` | `auto` | Whether alarms and notifications should be enabled for nodes using this `API_KEY`. `auto` enables alarms when the child is connected. `yes` enables alarms always, and `no` disables alarms. |
73 -| `default postpone alarms on connect seconds` | `60` | Postpone alarms and notifications for a period of time after the child connects. |
74 -| `default proxy enabled` | ` ` | Route metrics through a proxy. |
75 -| `default proxy destination` | ` ` | Space-separated list of `IP:PORT` for proxies. |
76 -| `default proxy api key` | ` ` | The `API_KEY` of the proxy. |
77 -| `default send charts matching` | `*` | See [`send charts matching`](#send-charts-matching). |
78 -
79 -#### `destination`
80 -
81 -A space-separated list of parent nodes to attempt to stream to, with the first available parent receiving metrics, using
82 -the following format: `[PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL]`.
83 -
84 -- `PROTOCOL`: `tcp`, `udp`, or `unix`. (only tcp and unix are supported by parent nodes)
85 -- `HOST`: A IPv4, IPv6 IP, or a hostname, or a unix domain socket path. IPv6 IPs should be given with brackets
86 - `[ip:address]`.
87 -- `INTERFACE` (IPv6 only): The network interface to use.
88 -- `PORT`: The port number or service name (`/etc/services`) to use.
89 -- `SSL`: To enable TLS/SSL encryption of the streaming connection.
90 -
91 -To enable TCP streaming to a parent node at `203.0.113.0` on port `20000` and with TLS/SSL encryption:
92 -
93 -```conf
94 -[stream]
95 - destination = tcp:203.0.113.0:20000:SSL
96 -```
97 -
98 -#### `send charts matching`
99 -
100 -A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) to filter which charts are streamed.
101 -
102 -The default is a single wildcard `*`, which streams all charts.
103 -
104 -To send only a few charts, list them explicitly, or list a group using a wildcard. To send _only_ the `apps.cpu` chart
105 -and charts with contexts beginning with `system.`:
106 -
107 -```conf
108 -[stream]
109 - send charts matching = apps.cpu system.*
110 -```
111 -
112 -To send all but a few charts, use `!` to create a negative match. To send _all_ charts _but_ `apps.cpu`:
113 -
114 -```conf
115 -[stream]
116 - send charts matching = !apps.cpu *
117 -```
118 -
119 -#### `allow from`
120 -
121 -A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) matching the IPs of nodes that
122 -will stream metrics using this API key. The order is important, left to right, as the first positive or negative match is used.
123 -
124 -The default is `*`, which accepts all requests including the `API_KEY`.
125 -
126 -To allow from only a specific IP address:
127 -
128 -```conf
129 -[API_KEY]
130 - allow from = 203.0.113.10
131 -```
132 -
133 -To allow all IPs starting with `10.*`, except `10.1.2.3`:
134 -
135 -```conf
136 -[API_KEY]
137 - allow from = !10.1.2.3 10.*
138 -```
139 -
140 -> If you set specific IP addresses here, and also use the `allow connections` setting in the `[web]` section of
141 -> `netdata.conf`, be sure to add the IP address there so that it can access the API port.
142 -
143 -#### `default memory mode`
144 -
145 -The [database](https://github.com/netdata/netdata/blob/master/database/README.md) to use for all nodes using this `API_KEY`. Valid settings are `dbengine`, `ram`,
146 -`save`, `map`, or `none`.
147 -
148 -- `dbengine`: The default, recommended time-series database (TSDB) for Netdata. Stores recent metrics in memory, then
149 - efficiently spills them to disk for long-term storage.
150 -- `ram`: Stores metrics _only_ in memory, which means metrics are lost when Netdata stops or restarts. Ideal for
151 - streaming configurations that use ephemeral nodes.
152 -- `save`: Stores metrics in memory, but saves metrics to disk when Netdata stops or restarts, and loads historical
153 - metrics on start.
154 -- `map`: Stores metrics in memory-mapped files, like swap, with constant disk write.
155 -- `none`: No database.
156 -
157 -When using `default memory mode = dbengine`, the parent node creates a separate instance of the TSDB to store metrics
158 -from child nodes. The [size of _each_ instance is configurable](https://github.com/netdata/netdata/blob/master/docs/store/change-metrics-storage.md) with the `page
159 -cache size` and `dbengine multihost disk space` settings in the `[global]` section in `netdata.conf`.
160 -
161 -### `netdata.conf`
162 -
163 -| Setting | Default | Description |
164 -| :----------------------------------------- | :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
165 -| **`[global]` section** | | |
166 -| `memory mode` | `dbengine` | Determines the [database type](https://github.com/netdata/netdata/blob/master/database/README.md) to be used on that node. Other options settings include `none`, `ram`, `save`, and `map`. `none` disables the database at this host. This also disables alarms and notifications, as those can't run without a database. |
167 -| **`[web]` section** | | |
168 -| `mode` | `static-threaded` | Determines the [web server](https://github.com/netdata/netdata/blob/master/web/server/README.md) type. The other option is `none`, which disables the dashboard, API, and registry. |
169 -| `accept a streaming request every seconds` | `0` | Set a limit on how often a parent node accepts streaming requests from child nodes. `0` equals no limit. If this is set, you may see `... too busy to accept new streaming request. Will be allowed in X secs` in Netdata's `error.log`. |
170 -
171 -## Examples
172 -
173 -### Per-child settings
174 -
175 -While the `[API_KEY]` section applies settings for any child node using that key, you can also use per-child settings
176 -with the `[MACHINE_GUID]` section.
177 -
178 -For example, the metrics streamed from only the child node with `MACHINE_GUID` are saved in memory, not using the
179 -default `dbengine` as specified by the `API_KEY`, and alarms are disabled.
180 -
181 -```conf
182 -[API_KEY]
183 - enabled = yes
184 - default memory mode = dbengine
185 - health enabled by default = auto
186 - allow from = *
187 -
188 -[MACHINE_GUID]
189 - enabled = yes
190 - memory mode = save
191 - health enabled = no
192 -```
193 -
194 -### Securing streaming with TLS/SSL
195 -
196 -Netdata does not activate TLS encryption by default. To encrypt streaming connections, you first need to [enable TLS
197 -support](https://github.com/netdata/netdata/blob/master/web/server/README.md#enabling-tls-support) on the parent. With encryption enabled on the receiving side, you
198 -need to instruct the child to use TLS/SSL as well. On the child's `stream.conf`, configure the destination as follows:
199 -
200 -```
201 -[stream]
202 - destination = host:port:SSL
203 -```
204 -
205 -The word `SSL` appended to the end of the destination tells the child that connections must be encrypted.
206 -
207 -> While Netdata uses Transport Layer Security (TLS) 1.2 to encrypt communications rather than the obsolete SSL protocol,
208 -> it's still common practice to refer to encrypted web connections as `SSL`. Many vendors, like Nginx and even Netdata
209 -> itself, use `SSL` in configuration files, whereas documentation will always refer to encrypted communications as `TLS`
210 -> or `TLS/SSL`.
211 -
212 -#### Certificate verification
213 -
214 -When TLS/SSL is enabled on the child, the default behavior will be to not connect with the parent unless the server's
215 -certificate can be verified via the default chain. In case you want to avoid this check, add the following to the
216 -child's `stream.conf` file:
217 -
218 -```
219 -[stream]
220 - ssl skip certificate verification = yes
221 -```
222 -
223 -#### Trusted certificate
224 -
225 -If you've enabled [certificate verification](#certificate-verification), you might see errors from the OpenSSL library
226 -when there's a problem with checking the certificate chain (`X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY`). More
227 -importantly, OpenSSL will reject self-signed certificates.
228 -
229 -Given these known issues, you have two options. If you trust your certificate, you can set the options `CApath` and
230 -`CAfile` to inform Netdata where your certificates, and the certificate trusted file, are stored.
231 -
232 -For more details about these options, you can read about [verify
233 -locations](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_load_verify_locations.html).
234 -
235 -Before you changed your streaming configuration, you need to copy your trusted certificate to your child system and add
236 -the certificate to OpenSSL's list.
237 -
238 -On most Linux distributions, the `update-ca-certificates` command searches inside the `/usr/share/ca-certificates`
239 -directory for certificates. You should double-check by reading the `update-ca-certificate` manual (`man
240 -update-ca-certificate`), and then change the directory in the below commands if needed.
241 -
242 -If you have `sudo` configured on your child system, you can use that to run the following commands. If not, you'll have
243 -to log in as `root` to complete them.
244 -
245 -```
246 -# mkdir /usr/share/ca-certificates/netdata
247 -# cp parent_cert.pem /usr/share/ca-certificates/netdata/parent_cert.crt
248 -# chown -R netdata.netdata /usr/share/ca-certificates/netdata/
249 -```
250 -
251 -First, you create a new directory to store your certificates for Netdata. Next, you need to change the extension on your
252 -certificate from `.pem` to `.crt` so it's compatible with `update-ca-certificate`. Finally, you need to change
253 -permissions so the user that runs Netdata can access the directory where you copied in your certificate.
254 -
255 -Next, edit the file `/etc/ca-certificates.conf` and add the following line:
256 -
257 -```
258 -netdata/parent_cert.crt
259 -```
260 -
261 -Now you update the list of certificates running the following, again either as `sudo` or `root`:
262 -
263 -```
264 -# update-ca-certificates
265 -```
266 -
267 -> Some Linux distributions have different methods of updating the certificate list. For more details, please read this
268 -> guide on [adding trusted root certificates](https://github.com/Busindre/How-to-Add-trusted-root-certificates).
269 -
270 -Once you update your certificate list, you can set the stream parameters for Netdata to trust the parent certificate.
271 -Open `stream.conf` for editing and change the following lines:
272 -
273 -```
274 -[stream]
275 - CApath = /etc/ssl/certs/
276 - CAfile = /etc/ssl/certs/parent_cert.pem
277 -```
278 -
279 -With this configuration, the `CApath` option tells Netdata to search for trusted certificates inside `/etc/ssl/certs`.
280 -The `CAfile` option specifies the Netdata parent certificate is located at `/etc/ssl/certs/parent_cert.pem`. With this
281 -configuration, you can skip using the system's entire list of certificates and use Netdata's parent certificate instead.
282 -
283 -#### Expected behaviors
284 -
285 -With the introduction of TLS/SSL, the parent-child communication behaves as shown in the table below, depending on the
286 -following configurations:
287 -
288 -- **Parent TLS (Yes/No)**: Whether the `[web]` section in `netdata.conf` has `ssl key` and `ssl certificate`.
289 -- **Parent port TLS (-/force/optional)**: Depends on whether the `[web]` section `bind to` contains a `^SSL=force` or
290 - `^SSL=optional` directive on the port(s) used for streaming.
291 -- **Child TLS (Yes/No)**: Whether the destination in the child's `stream.conf` has `:SSL` at the end.
292 -- **Child TLS Verification (yes/no)**: Value of the child's `stream.conf` `ssl skip certificate verification`
293 - parameter (default is no).
294 -
295 -| Parent TLS enabled | Parent port SSL | Child TLS | Child SSL Ver. | Behavior |
296 -| :----------------- | :--------------- | :-------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------- |
297 -| No | - | No | no | Legacy behavior. The parent-child stream is unencrypted. |
298 -| Yes | force | No | no | The parent rejects the child connection. |
299 -| Yes | -/optional | No | no | The parent-child stream is unencrypted (expected situation for legacy child nodes and newer parent nodes) |
300 -| Yes | -/force/optional | Yes | no | The parent-child stream is encrypted, provided that the parent has a valid TLS/SSL certificate. Otherwise, the child refuses to connect. |
301 -| Yes | -/force/optional | Yes | yes | The parent-child stream is encrypted. |
302 -
303 -### Proxy
304 -
305 -A proxy is a node that receives metrics from a child, then streams them onward to a parent. To configure a proxy,
306 -configure it as a receiving and a sending Netdata at the same time.
307 -
308 -Netdata proxies may or may not maintain a database for the metrics passing through them. When they maintain a database,
309 -they can also run health checks (alarms and notifications) for the remote host that is streaming the metrics.
310 -
311 -In the following example, the proxy receives metrics from a child node using the `API_KEY` of
312 -`66666666-7777-8888-9999-000000000000`, then stores metrics using `dbengine`. It then uses the `API_KEY` of
313 -`11111111-2222-3333-4444-555555555555` to proxy those same metrics on to a parent node at `203.0.113.0`.
314 -
315 -```conf
316 -[stream]
317 - enabled = yes
318 - destination = 203.0.113.0
319 - api key = 11111111-2222-3333-4444-555555555555
320 -
321 -[66666666-7777-8888-9999-000000000000]
322 - enabled = yes
323 - default memory mode = dbengine
324 -```
325 -
326 -### Ephemeral nodes
327 -
328 -Netdata can help you monitor ephemeral nodes, such as containers in an auto-scaling infrastructure, by always streaming
329 -metrics to any number of permanently-running parent nodes.
330 -
331 -On the parent, set the following in `stream.conf`:
332 -
333 -```conf
334 -[11111111-2222-3333-4444-555555555555]
335 - # enable/disable this API key
336 - enabled = yes
337 -
338 - # one hour of data for each of the child nodes
339 - default history = 3600
340 -
341 - # do not save child metrics on disk
342 - default memory = ram
343 -
344 - # alarms checks, only while the child is connected
345 - health enabled by default = auto
346 -```
347 -
348 -On the child nodes, set the following in `stream.conf`:
349 -
350 -```bash
351 -[stream]
352 - # stream metrics to another Netdata
353 - enabled = yes
354 -
355 - # the IP and PORT of the parent
356 - destination = 10.11.12.13:19999
357 -
358 - # the API key to use
359 - api key = 11111111-2222-3333-4444-555555555555
360 -```
361 -
362 -In addition, edit `netdata.conf` on each child node to disable the database and alarms.
363 -
364 -```bash
365 -[global]
366 - # disable the local database
367 - memory mode = none
368 -
369 -[health]
370 - # disable health checks
371 - enabled = no
372 -```
373 -
374 -## Troubleshooting
375 -
376 -Both parent and child nodes log information at `/var/log/netdata/error.log`.
377 -
378 -If the child manages to connect to the parent you will see something like (on the parent):
379 -
380 -```
381 -2017-03-09 09:38:52: netdata: INFO : STREAM [receive from [10.11.12.86]:38564]: new client connection.
382 -2017-03-09 09:38:52: netdata: INFO : STREAM xxx [10.11.12.86]:38564: receive thread created (task id 27721)
383 -2017-03-09 09:38:52: netdata: INFO : STREAM xxx [receive from [10.11.12.86]:38564]: client willing to stream metrics for host 'xxx' with machine_guid '1234567-1976-11e6-ae19-7cdd9077342a': update every = 1, history = 3600, memory mode = ram, health auto
384 -2017-03-09 09:38:52: netdata: INFO : STREAM xxx [receive from [10.11.12.86]:38564]: initializing communication...
385 -2017-03-09 09:38:52: netdata: INFO : STREAM xxx [receive from [10.11.12.86]:38564]: receiving metrics...
386 -```
387 -
388 -and something like this on the child:
389 -
390 -```
391 -2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: connecting...
392 -2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: initializing communication...
393 -2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: waiting response from remote netdata...
394 -2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: established communication - sending metrics...
395 -```
396 -
397 -The following sections describe the most common issues you might encounter when connecting parent and child nodes.
398 -
399 -### Slow connections between parent and child
400 -
401 -When you have a slow connection between parent and child, Netdata raises a few different errors. Most of the
402 -errors will appear in the child's `error.log`.
403 -
404 -```bash
405 -netdata ERROR : STREAM_SENDER[CHILD HOSTNAME] : STREAM CHILD HOSTNAME [send to PARENT IP:PARENT PORT]: too many data pending - buffer is X bytes long,
406 -Y unsent - we have sent Z bytes in total, W on this connection. Closing connection to flush the data.
407 -```
408 -
409 -On the parent side, you may see various error messages, most commonly the following:
410 -
411 -```
412 -netdata ERROR : STREAM_PARENT[CHILD HOSTNAME,[CHILD IP]:CHILD PORT] : read failed: end of file
413 -```
414 -
415 -Another common problem in slow connections is the child sending a partial message to the parent. In this case, the
416 -parent will write the following to its `error.log`:
417 -
418 -```
419 -ERROR : STREAM_RECEIVER[CHILD HOSTNAME,[CHILD IP]:CHILD PORT] : sent command 'B' which is not known by netdata, for host 'HOSTNAME'. Disabling it.
420 -```
421 -
422 -In this example, `B` was part of a `BEGIN` message that was cut due to connection problems.
423 -
424 -Slow connections can also cause problems when the parent misses a message and then receives a command related to the
425 -missed message. For example, a parent might miss a message containing the child's charts, and then doesn't know
426 -what to do with the `SET` message that follows. When that happens, the parent will show a message like this:
427 -
428 -```
429 -ERROR : STREAM_RECEIVER[CHILD HOSTNAME,[CHILD IP]:CHILD PORT] : requested a SET on chart 'CHART NAME' of host 'HOSTNAME', without a dimension. Disabling it.
430 -```
431 -
432 -### Child cannot connect to parent
433 -
434 -When the child can't connect to a parent for any reason (misconfiguration, networking, firewalls, parent
435 -down), you will see the following in the child's `error.log`.
436 -
437 -```
438 -ERROR : STREAM_SENDER[HOSTNAME] : Failed to connect to 'PARENT IP', port 'PARENT PORT' (errno 113, No route to host)
439 -```
440 -
441 -### 'Is this a Netdata?'
442 -
443 -This question can appear when Netdata starts the stream and receives an unexpected response. This error can appear when
444 -the parent is using SSL and the child tries to connect using plain text. You will also see this message when
445 -Netdata connects to another server that isn't Netdata. The complete error message will look like this:
446 -
447 -```
448 -ERROR : STREAM_SENDER[CHILD HOSTNAME] : STREAM child HOSTNAME [send to PARENT HOSTNAME:PARENT PORT]: server is not replying properly (is it a netdata?).
449 -```
450 -
451 -### Stream charts wrong
452 -
453 -Chart data needs to be consistent between child and parent nodes. If there are differences between chart data on
454 -a parent and a child, such as gaps in metrics collection, it most often means your child's `memory mode`
455 -does not match the parent's. To learn more about the different ways Netdata can store metrics, and thus keep chart
456 -data consistent, read our [memory mode documentation](https://github.com/netdata/netdata/blob/master/database/README.md).
457 -
458 -### Forbidding access
459 -
460 -You may see errors about "forbidding access" for a number of reasons. It could be because of a slow connection between
461 -the parent and child nodes, but it could also be due to other failures. Look in your parent's `error.log` for errors
462 -that look like this:
463 -
464 -```
465 -STREAM [receive from [child HOSTNAME]:child IP]: `MESSAGE`. Forbidding access."
466 -```
467 -
468 -`MESSAGE` will have one of the following patterns:
469 -
470 -- `request without KEY` : The message received is incomplete and the KEY value can be API, hostname, machine GUID.
471 -- `API key 'VALUE' is not valid GUID`: The UUID received from child does not have the format defined in [RFC
472 - 4122](https://tools.ietf.org/html/rfc4122)
473 -- `machine GUID 'VALUE' is not GUID.`: This error with machine GUID is like the previous one.
474 -- `API key 'VALUE' is not allowed`: This stream has a wrong API key.
475 -- `API key 'VALUE' is not permitted from this IP`: The IP is not allowed to use STREAM with this parent.
476 -- `machine GUID 'VALUE' is not allowed.`: The GUID that is trying to send stream is not allowed.
477 -- `Machine GUID 'VALUE' is not permitted from this IP. `: The IP does not match the pattern or IP allowed to connect to
478 - use stream.
479 -
480 -### Netdata could not create a stream
481 -
482 -The connection between parent and child is a stream. When the parent can't convert the initial connection into
483 -a stream, it will write the following message inside `error.log`:
484 -
485 -```
486 -file descriptor given is not a valid stream
487 -```
488 -
489 -After logging this error, Netdata will close the stream.
docs/quickstart/infrastructure.md
+1 -1
@@ -94,7 +94,7 @@ from every node in your infrastructure on a single dashboard.
94 ![An example system CPU
95 dashboard](https://user-images.githubusercontent.com/1153921/108732974-4b09c480-74eb-11eb-87a2-c67e569c08b6.png)
96
97 -Read more about [creating new dashboards](https://github.com/netdata/netdata/blob/master/docs/visualize/create-dashboards.md) for more details about the process and
97 +Read more about [creating new dashboards](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/dashboards.md) for more details about the process and
98 additional tips on best leveraging the feature to help you troubleshoot complex performance problems.
99
100 ## Set up your nodes
docs/visualize/create-dashboards.md deleted
-73
@@ -1,73 +0,0 @@
1 -<!--
2 -title: "Create new dashboards"
3 -description: "Create new dashboards in Netdata Cloud, with any number of metrics from any node on your infrastructure, for targeted troubleshooting."
4 -custom_edit_url: https://github.com/netdata/netdata/edit/master/docs/visualize/create-dashboards.md
5 -sidebar_label: "Create new dashboards"
6 -learn_status: "Published"
7 -learn_topic_type: "Tasks"
8 -learn_rel_path: "Operations/Netdata Cloud Visualizations"
9 --->
10 -
11 -# Create new dashboards
12 -
13 -With Netdata Cloud, you can build new dashboards that put key metrics from any number of distributed systems in one
14 -place for a bird's eye view of your infrastructure. You can create more meaningful visualizations for troubleshooting or
15 -keep a watchful eye on your infrastructure's most meaningful metrics without moving from node to node.
16 -
17 -In the War Room you want to monitor with this dashboard, click on your War Room's dropdown, then click on the green **+
18 -Add** button next to **Dashboards**. In the panel, give your new dashboard a name, and click **+ Add**.
19 -
20 -Click the **Add Chart** button to add your first chart card. From the dropdown, select the node you want to add the
21 -chart from, then the context. Netdata Cloud shows you a preview of the chart before you finish adding it.
22 -
23 -The **Add Text** button creates a new card with user-defined text, which you can use to describe or document a
24 -particular dashboard's meaning and purpose. Enrich the dashboards you create with documentation or procedures on how to
25 -respond
26 -
27 -![A bird's eye dashboard for a single
28 -node](https://user-images.githubusercontent.com/1153921/102650776-a654ba80-4128-11eb-9a65-4f9801b03d4b.png)
29 -
30 -Charts in dashboards
31 -are [fully interactive](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/interact-new-charts.md) and
32 -synchronized. You can
33 -pan through time, zoom, highlight specific timeframes, and more.
34 -
35 -Move any card by clicking on their top panel and dragging them to a new location. Other cards re-sort to the grid system
36 -automatically. You can also resize any card by grabbing the bottom-right corner and dragging it to its new size.
37 -
38 -Hit the **Save** button to finalize your dashboard. Any other member of the War Room can now access it and make changes.
39 -
40 -## Jump to single-node Cloud dashboards
41 -
42 -While dashboards help you associate essential charts from distributed nodes on a single pane of glass, you might need
43 -more detail when troubleshooting an issue. Quickly jump to any node's dashboard by clicking the 3-dot icon in the corner
44 -of any card to open a menu. Hit the **Go to Chart** item.
45 -
46 -Netdata Cloud takes you to the same chart on that node's dashboard. You can now navigate all that node's metrics and
47 -[interact with charts](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/interact-new-charts.md) to
48 -further investigate anomalies or troubleshoot
49 -complex performance problems.
50 -
51 -When viewing a single-node Cloud dashboard, you can also click on the add to dashboard icon <img
52 -src="https://user-images.githubusercontent.com/1153921/87587846-827fdb00-c697-11ea-9f31-aed0b8c6afba.png" alt="Dashboard
53 -icon" class="image-inline" /> to quickly add that chart to a new or existing dashboard. You might find this useful when
54 -investigating an anomaly and want to quickly populate a dashboard with potentially correlated metrics.
55 -
56 -## Pin dashboards and navigate through Netdata Cloud
57 -
58 -Click on the **Pin** button in any dashboard to put those charts into a separate panel at the bottom of the screen. You
59 -can now navigate through Netdata Cloud freely, individual Cloud dashboards, the Nodes view, different War Rooms, or even
60 -different Spaces, and have those valuable metrics follow you.
61 -
62 -Pinning dashboards helps you correlate potentially related charts across your infrastructure and discover root causes
63 -faster.
64 -
65 -## What's next?
66 -
67 -While it's useful to see real-time metrics on flexible dashboards, you need ways to know precisely when an anomaly
68 -strikes. Every Netdata Agent comes with a health watchdog that
69 -uses [alarms](https://github.com/netdata/netdata/blob/master/health/REFERENCE.md) and
70 -[notifications](https://github.com/netdata/netdata/blob/master/docs/monitor/enable-notifications.md) to notify you of
71 -issues seconds after they strike.
72 -
73 -
docs/visualize/overview-infrastructure.md
+1 -1
@@ -85,7 +85,7 @@ given node to quickly _jump to the same chart in that node's single-node dashboa
85 You can use single-node dashboards in Netdata Cloud to drill down on specific issues, scrub backward in time to
86 investigate historical data, and see like metrics presented meaningfully to help you troubleshoot performance problems.
87 All of the familiar [interactions](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/interact-new-charts.md) are available, as is adding any chart
88 -to a [new dashboard](https://github.com/netdata/netdata/blob/master/docs/visualize/create-dashboards.md).
88 +to a [new dashboard](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/dashboards.md).
89
90 ## Nodes view
91
exporting/WALKTHROUGH.md
-10
@@ -1,13 +1,3 @@
1 -<!--
2 -title: "User guide: Exporting to Netdata, Prometheus, Grafana stack"
3 -description: "Using Netdata in conjunction with Prometheus and Grafana."
4 -custom_edit_url: "https://github.com/netdata/netdata/edit/master/exporting/WALKTHROUGH.md"
5 -sidebar_label: "User guide: Netdata, Prometheus, Grafana stack"
6 -learn_status: "Published"
7 -learn_rel_path: "Integrations/Export"
8 -sidebar_position: 100
9 --->
10 -
1 # Netdata, Prometheus, Grafana stack
2
3 ## Intro
exporting/prometheus/README.md
+107 -214
@@ -1,225 +1,21 @@
1 -<!--
2 -title: "Export metrics to Prometheus"
3 -description: "Export Netdata metrics to Prometheus for archiving and further analysis."
4 -custom_edit_url: "https://github.com/netdata/netdata/edit/master/exporting/prometheus/README.md"
5 -sidebar_label: "Using Netdata with Prometheus"
6 -learn_status: "Published"
7 -learn_rel_path: "Integrations/Export"
8 --->
9 -
10 -import { OneLineInstallWget, OneLineInstallCurl } from '@site/src/components/OneLineInstall/'
11 -
1 # Using Netdata with Prometheus
2
14 -Prometheus is a distributed monitoring system which offers a very simple setup along with a robust data model. Recently
15 -Netdata added support for Prometheus. I'm going to quickly show you how to install both Netdata and Prometheus on the
16 -same server. We can then use Grafana pointed at Prometheus to obtain long term metrics Netdata offers. I'm assuming we
17 -are starting at a fresh ubuntu shell (whether you'd like to follow along in a VM or a cloud instance is up to you).
18 -
19 -## Installing Netdata and Prometheus
20 -
21 -### Installing Netdata
22 -
23 -There are number of ways to install Netdata according to
24 -[Installation](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md). The suggested way
25 -of installing the latest Netdata and keep it upgrade automatically.
26 -
27 -<!-- candidate for reuse -->
28 -
29 -To install Netdata, run the following as your normal user:
30 -
31 -<OneLineInstallWget/>
32 -
33 -Or, if you have cURL but not wget (such as on macOS):
34 -
35 -<OneLineInstallCurl/>
36 -
37 -At this point we should have Netdata listening on port 19999. Attempt to take your browser here:
38 -
39 -```sh
40 -http://your.netdata.ip:19999
41 -```
42 -
43 -_(replace `your.netdata.ip` with the IP or hostname of the server running Netdata)_
44 -
45 -### Installing Prometheus
46 -
47 -In order to install Prometheus we are going to introduce our own systemd startup script along with an example of
48 -prometheus.yaml configuration. Prometheus needs to be pointed to your server at a specific target url for it to scrape
49 -Netdata's api. Prometheus is always a pull model meaning Netdata is the passive client within this architecture.
50 -Prometheus always initiates the connection with Netdata.
51 -
52 -#### Download Prometheus
53 -
54 -```sh
55 -cd /tmp && curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest \
56 -| grep "browser_download_url.*linux-amd64.tar.gz" \
57 -| cut -d '"' -f 4 \
58 -| wget -qi -
59 -```
60 -
61 -#### Create prometheus system user
62 -
63 -```sh
64 -sudo useradd -r prometheus
65 -```
66 -
67 -#### Create prometheus directory
68 -
69 -```sh
70 -sudo mkdir /opt/prometheus
71 -sudo chown prometheus:prometheus /opt/prometheus
72 -```
73 -
74 -#### Untar prometheus directory
75 -
76 -```sh
77 -sudo tar -xvf /tmp/prometheus-*linux-amd64.tar.gz -C /opt/prometheus --strip=1
78 -```
79 -
80 -#### Install prometheus.yml
81 -
82 -We will use the following `prometheus.yml` file. Save it at `/opt/prometheus/prometheus.yml`.
3 +Netdata supports exporting metrics to Prometheus in two ways:
4
84 -Make sure to replace `your.netdata.ip` with the IP or hostname of the host running Netdata.
5 + - You can [configure Prometheus to scrape Netdata metrics](#configure-prometheus-to-scrape-netdata-metrics).
6
86 -```yaml
87 -# my global config
88 -global:
89 - scrape_interval: 5s # Set the scrape interval to every 5 seconds. Default is every 1 minute.
90 - evaluation_interval: 5s # Evaluate rules every 5 seconds. The default is every 1 minute.
91 - # scrape_timeout is set to the global default (10s).
92 -
93 - # Attach these labels to any time series or alerts when communicating with
94 - # external systems (federation, remote storage, Alertmanager).
95 - external_labels:
96 - monitor: 'codelab-monitor'
97 -
98 -# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
99 -rule_files:
100 -# - "first.rules"
101 -# - "second.rules"
102 -
103 -# A scrape configuration containing exactly one endpoint to scrape:
104 -# Here it's Prometheus itself.
105 -scrape_configs:
106 - # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
107 - - job_name: 'prometheus'
108 -
109 - # metrics_path defaults to '/metrics'
110 - # scheme defaults to 'http'.
111 -
112 - static_configs:
113 - - targets: [ '0.0.0.0:9090' ]
114 -
115 - - job_name: 'netdata-scrape'
116 -
117 - metrics_path: '/api/v1/allmetrics'
118 - params:
119 - # format: prometheus | prometheus_all_hosts
120 - # You can use `prometheus_all_hosts` if you want Prometheus to set the `instance` to your hostname instead of IP
121 - format: [ prometheus ]
122 - #
123 - # sources: as-collected | raw | average | sum | volume
124 - # default is: average
125 - #source: [as-collected]
126 - #
127 - # server name for this prometheus - the default is the client IP
128 - # for Netdata to uniquely identify it
129 - #server: ['prometheus1']
130 - honor_labels: true
131 -
132 - static_configs:
133 - - targets: [ '{your.netdata.ip}:19999' ]
134 -```
135 -
136 -#### Install nodes.yml
137 -
138 -The following is completely optional, it will enable Prometheus to generate alerts from some Netdata sources. Tweak the
139 -values to your own needs. We will use the following `nodes.yml` file below. Save it at `/opt/prometheus/nodes.yml`, and
140 -add a _- "nodes.yml"_ entry under the _rule_files:_ section in the example prometheus.yml file above.
141 -
142 -```yaml
143 -groups:
144 - - name: nodes
145 -
146 - rules:
147 - - alert: node_high_cpu_usage_70
148 - expr: sum(sum_over_time(netdata_system_cpu_percentage_average{dimension=~"(user|system|softirq|irq|guest)"}[10m])) by (job) / sum(count_over_time(netdata_system_cpu_percentage_average{dimension="idle"}[10m])) by (job) > 70
149 - for: 1m
150 - annotations:
151 - description: '{{ $labels.job }} on ''{{ $labels.job }}'' CPU usage is at {{ humanize $value }}%.'
152 - summary: CPU alert for container node '{{ $labels.job }}'
153 -
154 - - alert: node_high_memory_usage_70
155 - expr: 100 / sum(netdata_system_ram_MB_average) by (job)
156 - * sum(netdata_system_ram_MB_average{dimension=~"free|cached"}) by (job) < 30
157 - for: 1m
158 - annotations:
159 - description: '{{ $labels.job }} memory usage is {{ humanize $value}}%.'
160 - summary: Memory alert for container node '{{ $labels.job }}'
161 -
162 - - alert: node_low_root_filesystem_space_20
163 - expr: 100 / sum(netdata_disk_space_GB_average{family="/"}) by (job)
164 - * sum(netdata_disk_space_GB_average{family="/",dimension=~"avail|cached"}) by (job) < 20
165 - for: 1m
166 - annotations:
167 - description: '{{ $labels.job }} root filesystem space is {{ humanize $value}}%.'
168 - summary: Root filesystem alert for container node '{{ $labels.job }}'
169 -
170 - - alert: node_root_filesystem_fill_rate_6h
171 - expr: predict_linear(netdata_disk_space_GB_average{family="/",dimension=~"avail|cached"}[1h], 6 * 3600) < 0
172 - for: 1h
173 - labels:
174 - severity: critical
175 - annotations:
176 - description: Container node {{ $labels.job }} root filesystem is going to fill up in 6h.
177 - summary: Disk fill alert for Swarm node '{{ $labels.job }}'
178 -```
179 -
180 -#### Install prometheus.service
181 -
182 -Save this service file as `/etc/systemd/system/prometheus.service`:
183 -
184 -```sh
185 -[Unit]
186 -Description=Prometheus Server
187 -AssertPathExists=/opt/prometheus
188 -
189 -[Service]
190 -Type=simple
191 -WorkingDirectory=/opt/prometheus
192 -User=prometheus
193 -Group=prometheus
194 -ExecStart=/opt/prometheus/prometheus --config.file=/opt/prometheus/prometheus.yml --log.level=info
195 -ExecReload=/bin/kill -SIGHUP $MAINPID
196 -ExecStop=/bin/kill -SIGINT $MAINPID
197 -
198 -[Install]
199 -WantedBy=multi-user.target
200 -```
201 -
202 -##### Start Prometheus
203 -
204 -```sh
205 -sudo systemctl start prometheus
206 -sudo systemctl enable prometheus
207 -```
208 -
209 -Prometheus should now start and listen on port 9090. Attempt to head there with your browser.
210 -
211 -If everything is working correctly when you fetch `http://your.prometheus.ip:9090` you will see a 'Status' tab. Click
212 -this and click on 'targets' We should see the Netdata host as a scraped target.
213 -
214 ----
7 + - You can [configure Netdata to push metrics to Prometheus](https://github.com/netdata/netdata/blob/master/exporting/prometheus/remote_write/README.md)
8 + , using the Prometheus remote write API.
9
10 ## Netdata support for Prometheus
11
218 -Before explaining the changes, we have to understand the key differences between Netdata and Prometheus.
12 +Regardless of the methodology, you first need to understand how Netdata structures the metrics it exports to Prometheus
13 +and the capabilities it provides. The examples provided in this document assume that you will be using Netdata as
14 +a metrics endpoint, but the concepts apply as well to the remote write API method.
15
220 -### understanding Netdata metrics
16 +### Understanding Netdata metrics
17
222 -#### charts
18 +#### Charts
19
20 Each chart in Netdata has several properties (common to all its metrics):
21
@@ -234,7 +30,7 @@ Each chart in Netdata has several properties (common to all its metrics):
30
31 - `units` is the units for all the metrics attached to the chart.
32
237 -#### dimensions
33 +#### Dimensions
34
35 Then each Netdata chart contains metrics called `dimensions`. All the dimensions of a chart have the same units of
36 measurement, and are contextually in the same category (ie. the metrics for disk bandwidth are `read` and `write` and
@@ -465,4 +261,101 @@ through a web proxy, or when multiple Prometheus servers are NATed to a single I
261 `&server=NAME` to the URL. This `NAME` is used by Netdata to uniquely identify each Prometheus server and keep track of
262 its last access time.
263
264 +## Configure Prometheus to scrape Netdata metrics
265 +
266 +The following `prometheus.yml` file will scrape all netdata metrics "as collected".
267 +
268 +Make sure to replace `your.netdata.ip` with the IP or hostname of the host running Netdata.
269 +
270 +```yaml
271 +# my global config
272 +global:
273 + scrape_interval: 5s # Set the scrape interval to every 5 seconds. Default is every 1 minute.
274 + evaluation_interval: 5s # Evaluate rules every 5 seconds. The default is every 1 minute.
275 + # scrape_timeout is set to the global default (10s).
276 +
277 + # Attach these labels to any time series or alerts when communicating with
278 + # external systems (federation, remote storage, Alertmanager).
279 + external_labels:
280 + monitor: 'codelab-monitor'
281 +
282 +# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
283 +rule_files:
284 +# - "first.rules"
285 +# - "second.rules"
286 +
287 +# A scrape configuration containing exactly one endpoint to scrape:
288 +# Here it's Prometheus itself.
289 +scrape_configs:
290 + # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
291 + - job_name: 'prometheus'
292 +
293 + # metrics_path defaults to '/metrics'
294 + # scheme defaults to 'http'.
295 +
296 + static_configs:
297 + - targets: [ '0.0.0.0:9090' ]
298 +
299 + - job_name: 'netdata-scrape'
300 +
301 + metrics_path: '/api/v1/allmetrics'
302 + params:
303 + # format: prometheus | prometheus_all_hosts
304 + # You can use `prometheus_all_hosts` if you want Prometheus to set the `instance` to your hostname instead of IP
305 + format: [ prometheus ]
306 + #
307 + # sources: as-collected | raw | average | sum | volume
308 + # default is: average
309 + #source: [as-collected]
310 + #
311 + # server name for this prometheus - the default is the client IP
312 + # for Netdata to uniquely identify it
313 + #server: ['prometheus1']
314 + honor_labels: true
315
316 + static_configs:
317 + - targets: [ '{your.netdata.ip}:19999' ]
318 +```
319 +
320 +### Prometheus alerts for Netdata metrics
321 +
322 +The following is an example of a `nodes.yml` file that will allow Prometheus to generate alerts from some Netdata sources.
323 +Save it at `/opt/prometheus/nodes.yml`, and add a _- "nodes.yml"_ entry under the _rule_files:_ section in the example prometheus.yml file above.
324 +
325 +```yaml
326 +groups:
327 + - name: nodes
328 +
329 + rules:
330 + - alert: node_high_cpu_usage_70
331 + expr: sum(sum_over_time(netdata_system_cpu_percentage_average{dimension=~"(user|system|softirq|irq|guest)"}[10m])) by (job) / sum(count_over_time(netdata_system_cpu_percentage_average{dimension="idle"}[10m])) by (job) > 70
332 + for: 1m
333 + annotations:
334 + description: '{{ $labels.job }} on ''{{ $labels.job }}'' CPU usage is at {{ humanize $value }}%.'
335 + summary: CPU alert for container node '{{ $labels.job }}'
336 +
337 + - alert: node_high_memory_usage_70
338 + expr: 100 / sum(netdata_system_ram_MB_average) by (job)
339 + * sum(netdata_system_ram_MB_average{dimension=~"free|cached"}) by (job) < 30
340 + for: 1m
341 + annotations:
342 + description: '{{ $labels.job }} memory usage is {{ humanize $value}}%.'
343 + summary: Memory alert for container node '{{ $labels.job }}'
344 +
345 + - alert: node_low_root_filesystem_space_20
346 + expr: 100 / sum(netdata_disk_space_GB_average{family="/"}) by (job)
347 + * sum(netdata_disk_space_GB_average{family="/",dimension=~"avail|cached"}) by (job) < 20
348 + for: 1m
349 + annotations:
350 + description: '{{ $labels.job }} root filesystem space is {{ humanize $value}}%.'
351 + summary: Root filesystem alert for container node '{{ $labels.job }}'
352 +
353 + - alert: node_root_filesystem_fill_rate_6h
354 + expr: predict_linear(netdata_disk_space_GB_average{family="/",dimension=~"avail|cached"}[1h], 6 * 3600) < 0
355 + for: 1h
356 + labels:
357 + severity: critical
358 + annotations:
359 + description: Container node {{ $labels.job }} root filesystem is going to fill up in 6h.
360 + summary: Disk fill alert for Swarm node '{{ $labels.job }}'
361 +```
health/README.md
+1 -10
@@ -1,13 +1,4 @@
1 -<!--
2 -title: "Health monitoring"
3 -custom_edit_url: https://github.com/netdata/netdata/edit/master/health/README.md
4 -sidebar_label: "Health monitoring"
5 -learn_status: "Published"
6 -learn_topic_type: "Concepts"
7 -learn_rel_path: "Concepts"
8 --->
9 -
10 -# Health monitoring
1 +# Alerts and notifications
2
3 The Netdata Agent is a health watchdog for the health and performance of your systems, services, and applications. We've
4 worked closely with our community of DevOps engineers, SREs, and developers to define hundreds of production-ready
packaging/installer/README.md
+2 -1
@@ -37,7 +37,8 @@ for the [single line installer](#install-on-linux-with-one-line-installer), or [
37 #### Agent user interface
38
39 To access the UI provided by the locally installed agent, open a browser and navigate to `http://NODE:19999`, replacing `NODE` with either `localhost` or
40 -the hostname/IP address of the remote node. You can also read more about [how the agent dashboard works](https://github.com/netdata/netdata/blob/master/docs/dashboard/how-dashboard-works.md).
40 +the hostname/IP address of the remote node. You can also read more about
41 +[the agent dashboard](https://github.com/netdata/netdata/blob/master/web/gui/README.md).
42
43 #### Configuration
44
streaming/README.md
+246 -394
@@ -1,145 +1,160 @@
1 # Streaming and replication reference
2
3 -Each Netdata node is able to replicate/mirror its database to another Netdata node, by streaming the collected
4 -metrics in real-time. This is quite different to
5 -[data archiving to third party time-series databases](https://github.com/netdata/netdata/blob/master/exporting/README.md).
6 -The nodes that send metrics are called **child** nodes, and the nodes that receive metrics are called **parent** nodes.
7 -
8 -There are also **proxy** nodes, which collect metrics from a child and sends it to a parent.
9 -
10 -When one Netdata node streams metrics another, the receiving instance can use the data for all features of a typical Netdata node, for example:
11 -
12 -- Visualize metrics with a dashboard
13 -- Run health checks that trigger alarms and send alarm notifications
14 -- Export metrics to an external time-series database
15 -
3 This document contains advanced streaming options and suggested deployment options for production.
4 If you haven't already done so, we suggest you first go through the
5 [quick introduction to streaming](https://github.com/netdata/netdata/blob/master/docs/metrics-storage-management/enable-streaming.md)
6 , for your first, basic parent child setup.
7
21 -## Supported configurations
22 -
23 -### Netdata without a database or web API (headless collector)
8 +## Configuration
9
25 -A local Netdata Agent (child), **without any database or alarms**, collects metrics and sends them to another Netdata node
26 -(parent).
27 -The same parent can collect data for any number of child nodes and serves alerts for each child.
10 +There are two files responsible for configuring Netdata's streaming capabilities: `stream.conf` and `netdata.conf`.
11
29 -The node menu shows a list of all "databases streamed to" the parent. Clicking one of those links allows the user to
30 -view the full dashboard of the child node. The URL has the form
31 -`http://parent-host:parent-port/host/child-host/`.
12 +From within your Netdata config directory (typically `/etc/netdata`), [use `edit-config`](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) to
13 +open either `stream.conf` or `netdata.conf`.
14
15 +```
16 +sudo ./edit-config stream.conf
17 +sudo ./edit-config netdata.conf
18 +```
19
34 -In a headless setup, the child acts as a plain data collector. It spawns all external plugins, but instead of maintaining a
35 -local database and accepting dashboard requests, it streams all metrics to the parent.
20 +### `stream.conf`
21
37 -This setup works great to reduce the memory footprint. Depending on the enabled plugins, memory usage is between 6 MiB and 40 MiB. To reduce the memory usage as much as
38 -possible, refer to the [performance optimization guide](https://github.com/netdata/netdata/blob/master/docs/guides/configure/performance.md).
22 +The `stream.conf` file contains three sections. The `[stream]` section is for configuring child nodes.
23
24 +The `[API_KEY]` and `[MACHINE_GUID]` sections are both for configuring parent nodes, and share the same settings.
25 +`[API_KEY]` settings affect every child node using that key, whereas `[MACHINE_GUID]` settings affect only the child
26 +node with a matching GUID.
27
41 -### Database Replication
28 +The file `/var/lib/netdata/registry/netdata.public.unique.id` contains a random GUID that **uniquely identifies each
29 +node**. This file is automatically generated by Netdata the first time it is started and remains unaltered forever.
30
43 -The local Netdata Agent (child), **with a local database (and possibly alarms)**, collects metrics and
44 -sends them to another Netdata node (parent).
31 +#### `[stream]` section
32
46 -The user can use all the functions **at both** `http://child-ip:child-port/` and
47 -`http://parent-host:parent-port/host/child-host/`.
33 +| Setting | Default | Description |
34 +| :---------------------------------------------- | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35 +| `enabled` | `no` | Whether this node streams metrics to any parent. Change to `yes` to enable streaming. |
36 +| [`destination`](#destination) | ` ` | A space-separated list of parent nodes to attempt to stream to, with the first available parent receiving metrics, using the following format: `[PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL]`. [Read more &rarr;](#destination) |
37 +| `ssl skip certificate verification` | `yes` | If you want to accept self-signed or expired certificates, set to `yes` and uncomment. |
38 +| `CApath` | `/etc/ssl/certs/` | The directory where known certificates are found. Defaults to OpenSSL's default path. |
39 +| `CAfile` | `/etc/ssl/certs/cert.pem` | Add a parent node certificate to the list of known certificates in `CAPath`. |
40 +| `api key` | ` ` | The `API_KEY` to use as the child node. |
41 +| `timeout seconds` | `60` | The timeout to connect and send metrics to a parent. |
42 +| `default port` | `19999` | The port to use if `destination` does not specify one. |
43 +| [`send charts matching`](#send-charts-matching) | `*` | A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) to filter which charts are streamed. [Read more &rarr;](#send-charts-matching) |
44 +| `buffer size bytes` | `10485760` | The size of the buffer to use when sending metrics. The default `10485760` equals a buffer of 10MB, which is good for 60 seconds of data. Increase this if you expect latencies higher than that. The buffer is flushed on reconnect. |
45 +| `reconnect delay seconds` | `5` | How long to wait until retrying to connect to the parent node. |
46 +| `initial clock resync iterations` | `60` | Sync the clock of charts for how many seconds when starting. |
47
49 -The child and the parent may have different data retention policies for the same metrics.
48 +### `[API_KEY]` and `[MACHINE_GUID]` sections
49
51 -Alerts for the child are triggered by **both** the child and the parent.
52 -It is possible to enable different alert configurations on the parent and the child.
50 +| Setting | Default | Description |
51 +| :---------------------------------------------- | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52 +| `enabled` | `no` | Whether this API KEY enabled or disabled. |
53 +| [`allow from`](#allow-from) | `*` | A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) matching the IPs of nodes that will stream metrics using this API key. [Read more &rarr;](#allow-from) |
54 +| `default history` | `3600` | The default amount of child metrics history to retain when using the `save`, `map`, or `ram` memory modes. |
55 +| [`default memory mode`](#default-memory-mode) | `ram` | The [database](https://github.com/netdata/netdata/blob/master/database/README.md) to use for all nodes using this `API_KEY`. Valid settings are `dbengine`, `map`, `save`, `ram`, or `none`. [Read more &rarr;](#default-memory-mode) |
56 +| `health enabled by default` | `auto` | Whether alarms and notifications should be enabled for nodes using this `API_KEY`. `auto` enables alarms when the child is connected. `yes` enables alarms always, and `no` disables alarms. |
57 +| `default postpone alarms on connect seconds` | `60` | Postpone alarms and notifications for a period of time after the child connects. |
58 +| `default proxy enabled` | ` ` | Route metrics through a proxy. |
59 +| `default proxy destination` | ` ` | Space-separated list of `IP:PORT` for proxies. |
60 +| `default proxy api key` | ` ` | The `API_KEY` of the proxy. |
61 +| `default send charts matching` | `*` | See [`send charts matching`](#send-charts-matching). |
62
54 -In order for custom chart names on the child to work correctly, follow the form `type.name`. The parent will truncate the `type` part and substitute the original chart `type` to store the name in the database.
63 +#### `destination`
64
56 -### Netdata proxies
65 +A space-separated list of parent nodes to attempt to stream to, with the first available parent receiving metrics, using
66 +the following format: `[PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL]`.
67
58 -The local Netdata Agent(child), with or without a database, collects metrics and sends them to another
59 -Netdata node(**proxy**), which may or may not maintain a database, which forwards them to another
60 -Netdata (parent).
68 +- `PROTOCOL`: `tcp`, `udp`, or `unix`. (only tcp and unix are supported by parent nodes)
69 +- `HOST`: A IPv4, IPv6 IP, or a hostname, or a unix domain socket path. IPv6 IPs should be given with brackets
70 + `[ip:address]`.
71 +- `INTERFACE` (IPv6 only): The network interface to use.
72 +- `PORT`: The port number or service name (`/etc/services`) to use.
73 +- `SSL`: To enable TLS/SSL encryption of the streaming connection.
74
62 -Alerts for the child can be triggered by any of the involved hosts that maintains a database.
75 +To enable TCP streaming to a parent node at `203.0.113.0` on port `20000` and with TLS/SSL encryption:
76
64 -You can daisy-chain any number of Netdata, each with or without a database and
65 -with or without alerts for the child metrics.
77 +```conf
78 +[stream]
79 + destination = tcp:203.0.113.0:20000:SSL
80 +```
81
67 -### Mix and match with exporting engine
82 +#### `send charts matching`
83
69 -All nodes that maintain a database can also send their data to an external database.
70 -This allows quite complex setups.
84 +A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) to filter which charts are streamed.
85
72 -Example:
86 +The default is a single wildcard `*`, which streams all charts.
87
74 -1. Netdata nodes `A` and `B` do not maintain a database and stream metrics to Netdata node `C`(live streaming functionality).
75 -2. Netdata node `C` maintains a database for `A`, `B`, `C` and archives all metrics to `graphite` with 10 second detail (exporting functionality).
76 -3. Netdata node `C` also streams data for `A`, `B`, `C` to Netdata `D`, which also collects data from `E`, `F` and `G` from another DMZ (live streaming functionality).
77 -4. Netdata node `D` is just a proxy, without a database, that streams all data to a remote site at Netdata `H`.
78 -5. Netdata node `H` maintains a database for `A`, `B`, `C`, `D`, `E`, `F`, `G`, `H` and sends all data to `opentsdb` with 5 seconds detail (exporting functionality)
79 -6. Alerts are triggered by `H` for all hosts.
80 -7. Users can use all Netdata nodes that maintain a database to view metrics (i.e. at `H` all hosts can be viewed).
88 +To send only a few charts, list them explicitly, or list a group using a wildcard. To send _only_ the `apps.cpu` chart
89 +and charts with contexts beginning with `system.`:
90
82 -## Configuration
91 +```conf
92 +[stream]
93 + send charts matching = apps.cpu system.*
94 +```
95
84 -The following options affect how Netdata streams:
96 +To send all but a few charts, use `!` to create a negative match. To send _all_ charts _but_ `apps.cpu`:
97
86 -```
87 -[global]
88 - memory mode = none | ram | save | map | dbengine
98 +```conf
99 +[stream]
100 + send charts matching = !apps.cpu *
101 ```
102
91 -`[global].memory mode = none` disables the database at this host. This also disables health
92 -monitoring because a node can't have health monitoring without a database.
103 +#### `allow from`
104
94 -```
95 -[web]
96 - mode = none | static-threaded
97 - accept a streaming request every seconds = 0
98 -```
105 +A space-separated list of [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md) matching the IPs of nodes that
106 +will stream metrics using this API key. The order is important, left to right, as the first positive or negative match is used.
107
100 -`[web].mode = none` disables the API (Netdata will not listen to any ports).
101 -This also disables the registry (there cannot be a registry without an API).
108 +The default is `*`, which accepts all requests including the `API_KEY`.
109
103 -`accept a streaming request every seconds` can be used to set a limit on how often a parent node will accept streaming
104 -requests from its child nodes. 0 sets no limit, 1 means maximum once every second. If this is set, you may see error log
105 -entries "... too busy to accept new streaming request. Will be allowed in X secs".
110 +To allow from only a specific IP address:
111
107 -You can [use](https://github.com/netdata/netdata/blob/master/exporting/README.md#configuration) the exporting engine to configure data archiving to an external database (it archives all databases maintained on
108 -this host).
112 +```conf
113 +[API_KEY]
114 + allow from = 203.0.113.10
115 +```
116
110 -### Streaming configuration
117 +To allow all IPs starting with `10.*`, except `10.1.2.3`:
118
112 -The new file `stream.conf` contains streaming configuration for a sending and a receiving Netdata node.
119 +```conf
120 +[API_KEY]
121 + allow from = !10.1.2.3 10.*
122 +```
123
114 -To configure streaming on your system:
115 -1. Generate an API key using `uuidgen`. Note: API keys are just random GUIDs. You can use the same API key on all your Netdata, or use a different API key for any pair of sending-receiving Netdata nodes.
124 +> If you set specific IP addresses here, and also use the `allow connections` setting in the `[web]` section of
125 +> `netdata.conf`, be sure to add the IP address there so that it can access the API port.
126
117 -2. Authorize the communication between a pair of sending-receiving Netdata nodes using the generated API key.
118 -Once the communication is authorized, the sending Netdata node can push metrics for any number of hosts.
127 +#### `default memory mode`
128
120 -3. To edit `stream.conf`, run `/etc/netdata/edit-config stream.conf`
129 +The [database](https://github.com/netdata/netdata/blob/master/database/README.md) to use for all nodes using this `API_KEY`. Valid settings are `dbengine`, `ram`,
130 +`save`, `map`, or `none`.
131
122 -The following sections describe how you can configure sending and receiving Netdata nodes.
132 +- `dbengine`: The default, recommended time-series database (TSDB) for Netdata. Stores recent metrics in memory, then
133 + efficiently spills them to disk for long-term storage.
134 +- `ram`: Stores metrics _only_ in memory, which means metrics are lost when Netdata stops or restarts. Ideal for
135 + streaming configurations that use ephemeral nodes.
136 +- `save`: Stores metrics in memory, but saves metrics to disk when Netdata stops or restarts, and loads historical
137 + metrics on start.
138 +- `map`: Stores metrics in memory-mapped files, like swap, with constant disk write.
139 +- `none`: No database.
140
124 -##### Options for the sending node
141 +When using `default memory mode = dbengine`, the parent node creates a separate instance of the TSDB to store metrics
142 +from child nodes. The [size of _each_ instance is configurable](https://github.com/netdata/netdata/blob/master/docs/store/change-metrics-storage.md) with the `page
143 +cache size` and `dbengine multihost disk space` settings in the `[global]` section in `netdata.conf`.
144
126 -This is the section for the sending Netdata node. On the receiving node, `[stream].enabled` can be `no`.
127 -If it is `yes`, the receiving node will also stream the metrics to another node (i.e. it will be
128 -a proxy).
145 +### `netdata.conf`
146
130 -```
131 -[stream]
132 - enabled = yes | no
133 - destination = IP:PORT[:SSL] ...
134 - api key = XXXXXXXXXXX
147 +| Setting | Default | Description |
148 +| :----------------------------------------- | :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
149 +| **`[global]` section** | | |
150 +| `memory mode` | `dbengine` | Determines the [database type](https://github.com/netdata/netdata/blob/master/database/README.md) to be used on that node. Other options settings include `none`, `ram`, `save`, and `map`. `none` disables the database at this host. This also disables alarms and notifications, as those can't run without a database. |
151 +| **`[web]` section** | | |
152 +| `mode` | `static-threaded` | Determines the [web server](https://github.com/netdata/netdata/blob/master/web/server/README.md) type. The other option is `none`, which disables the dashboard, API, and registry. |
153 +| `accept a streaming request every seconds` | `0` | Set a limit on how often a parent node accepts streaming requests from child nodes. `0` equals no limit. If this is set, you may see `... too busy to accept new streaming request. Will be allowed in X secs` in Netdata's `error.log`. |
154
136 -[API_KEY]
137 - enabled = yes | no
155 +### Basic use cases
156
139 -[MACHINE_GUID]
140 - enabled = yes | no
141 -```
142 -This is an overview of how these options can be combined:
157 +This is an overview of how the main options can be combined:
158
159 | target|memory<br/>mode|web<br/>mode|stream<br/>enabled|exporting|alarms|dashboard|
160 |------|:-------------:|:----------:|:----------------:|:-----:|:----:|:-------:|
@@ -148,170 +163,26 @@ This is an overview of how these options can be combined:
163 | proxy with db|not `none`|not `none`|`yes`|possible|possible|yes|
164 | central netdata|not `none`|not `none`|`no`|possible|possible|yes|
165
151 -For the options to encrypt the data stream between the child and the parent, refer to [securing the communication](#securing-streaming-communications)
166 +### Per-child settings
167
168 +While the `[API_KEY]` section applies settings for any child node using that key, you can also use per-child settings
169 +with the `[MACHINE_GUID]` section.
170
154 -##### Options for the receiving node
171 +For example, the metrics streamed from only the child node with `MACHINE_GUID` are saved in memory, not using the
172 +default `dbengine` as specified by the `API_KEY`, and alarms are disabled.
173
156 -For a receiving Netdata node, the `stream.conf` looks like this:
157 -
158 -```sh
159 -# replace API_KEY with your uuidgen generated GUID
174 +```conf
175 [API_KEY]
176 enabled = yes
162 - default history = 3600
163 - default memory mode = save
177 + default memory mode = dbengine
178 health enabled by default = auto
179 allow from = *
166 -```
167 -
168 -You can add many such sections, one for each API key. The above are used as default values for
169 -all hosts pushed with this API key.
170 -
171 -You can also add sections like this:
180
173 -```sh
174 -# replace MACHINE_GUID with the child /var/lib/netdata/registry/netdata.public.unique.id
181 [MACHINE_GUID]
182 enabled = yes
177 - history = 3600
183 memory mode = save
179 - health enabled = yes
180 - allow from = *
181 -```
182 -
183 -The above is the parent configuration of a single host, at the parent end. `MACHINE_GUID` is
184 -the unique id the Netdata generating the metrics (i.e. the Netdata that originally collects
185 -them `/var/lib/netdata/registry/netdata.unique.id`). So, metrics for Netdata `A` that pass through
186 -any number of other Netdata, will have the same `MACHINE_GUID`.
187 -
188 -You can also use `default memory mode = dbengine` for an API key or `memory mode = dbengine` for
189 - a single host. The additional `page cache size` and `dbengine multihost disk space` configuration options
190 - are inherited from the global Netdata configuration.
191 -
192 -##### Allow from
193 -
194 -`allow from` settings are [Netdata simple patterns](https://github.com/netdata/netdata/blob/master/libnetdata/simple_pattern/README.md): string matches
195 -that use `*` as wildcard (any number of times) and a `!` prefix for a negative match.
196 -So: `allow from = !10.1.2.3 10.*` will allow all IPs in `10.*` except `10.1.2.3`. The order is
197 -important: left to right, the first positive or negative match is used.
198 -
199 -##### Tracing
200 -
201 -When a child is trying to push metrics to a parent or proxy, it logs entries like these:
202 -
203 -```
204 -2017-02-25 01:57:44: netdata: ERROR: Failed to connect to '10.11.12.1', port '19999' (errno 111, Connection refused)
205 -2017-02-25 01:57:44: netdata: ERROR: STREAM costa-pc [send to 10.11.12.1:19999]: failed to connect
206 -2017-02-25 01:58:04: netdata: INFO : STREAM costa-pc [send to 10.11.12.1:19999]: initializing communication...
207 -2017-02-25 01:58:04: netdata: INFO : STREAM costa-pc [send to 10.11.12.1:19999]: waiting response from remote netdata...
208 -2017-02-25 01:58:14: netdata: INFO : STREAM costa-pc [send to 10.11.12.1:19999]: established communication - sending metrics...
209 -2017-02-25 01:58:14: netdata: ERROR: STREAM costa-pc [send]: discarding 1900 bytes of metrics already in the buffer.
210 -2017-02-25 01:58:14: netdata: INFO : STREAM costa-pc [send]: ready - sending metrics...
211 -```
212 -
213 -The receiving end (proxy or parent) logs entries like these:
214 -
215 -```
216 -2017-02-25 01:58:04: netdata: INFO : STREAM [receive from [10.11.12.11]:33554]: new client connection.
217 -2017-02-25 01:58:04: netdata: INFO : STREAM costa-pc [10.11.12.11]:33554: receive thread created (task id 7698)
218 -2017-02-25 01:58:14: netdata: INFO : Host 'costa-pc' with guid '12345678-b5a6-11e6-8a50-00508db7e9c9' initialized, os: linux, update every: 1, memory mode: ram, history entries: 3600, streaming: disabled, health: enabled, cache_dir: '/var/cache/netdata/12345678-b5a6-11e6-8a50-00508db7e9c9', varlib_dir: '/var/lib/netdata/12345678-b5a6-11e6-8a50-00508db7e9c9', health_log: '/var/lib/netdata/12345678-b5a6-11e6-8a50-00508db7e9c9/health/health-log.db', alarms default handler: '/usr/libexec/netdata/plugins.d/alarm-notify.sh', alarms default recipient: 'root'
219 -2017-02-25 01:58:14: netdata: INFO : STREAM costa-pc [receive from [10.11.12.11]:33554]: initializing communication...
220 -2017-02-25 01:58:14: netdata: INFO : STREAM costa-pc [receive from [10.11.12.11]:33554]: receiving metrics...
221 -```
222 -
223 -For Netdata v1.9+, streaming can also be monitored via `access.log`.
224 -
225 -### Securing streaming communications
226 -
227 -Netdata does not activate TLS encryption by default. To encrypt streaming connections:
228 -1. On the parent node (receiving node), [enable TLS support](https://github.com/netdata/netdata/blob/master/web/server/README.md#enabling-tls-support).
229 -2. On the child's `stream.conf`, configure the destination as follows:
230 -
231 -```
232 -[stream]
233 - destination = host:port:SSL
234 -```
235 -
236 -The word `SSL` appended to the end of the destination tells the child that connections must be encrypted.
237 -
238 -> While Netdata uses Transport Layer Security (TLS) 1.2 to encrypt communications rather than the obsolete SSL protocol,
239 -> it's still common practice to refer to encrypted web connections as `SSL`. Many vendors, like Nginx and even Netdata
240 -> itself, use `SSL` in configuration files, whereas documentation will always refer to encrypted communications as `TLS`
241 -> or `TLS/SSL`.
242 -
243 -#### Certificate verification
244 -
245 -When TLS/SSL is enabled on the child, the default behavior will be to not connect with the parent unless the server's certificate can be verified via the default chain. In case you want to avoid this check, add the following to the child's `stream.conf` file:
246 -
247 -```
248 -[stream]
249 - ssl skip certificate verification = yes
250 -```
251 -
252 -#### Trusted certificate
253 -
254 -If you've enabled [certificate verification](#certificate-verification), you might see errors from the OpenSSL library when there's a problem with checking the certificate chain (`X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY`). More importantly, OpenSSL will reject self-signed certificates.
255 -
256 -Given these known issues, you have two options. If you trust your certificate, you can set the options `CApath` and `CAfile` to inform Netdata where your certificates, and the certificate trusted file, are stored.
257 -
258 -For more details about these options, you can read about [verify locations](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_load_verify_locations.html).
259 -
260 -Before you changed your streaming configuration, you need to copy your trusted certificate to your child system and add the certificate to OpenSSL's list.
261 -
262 -On most Linux distributions, the `update-ca-certificates` command searches inside the `/usr/share/ca-certificates` directory for certificates. You should double-check by reading the `update-ca-certificate` manual (`man update-ca-certificate`), and then change the directory in the below commands if needed.
263 -
264 -If you have `sudo` configured on your child system, you can use that to run the following commands. If not, you'll have to log in as `root` to complete them.
265 -
266 -```
267 -# mkdir /usr/share/ca-certificates/netdata
268 -# cp parent_cert.pem /usr/share/ca-certificates/netdata/parent_cert.crt
269 -# chown -R netdata.netdata /usr/share/ca-certificates/netdata/
270 -```
271 -
272 -First, you create a new directory to store your certificates for Netdata. Next, you need to change the extension on your certificate from `.pem` to `.crt` so it's compatible with `update-ca-certificate`. Finally, you need to change permissions so the user that runs Netdata can access the directory where you copied in your certificate.
273 -
274 -Next, edit the file `/etc/ca-certificates.conf` and add the following line:
275 -
276 -```
277 -netdata/parent_cert.crt
278 -```
279 -
280 -Now you update the list of certificates running the following, again either as `sudo` or `root`:
281 -
282 -```
283 -# update-ca-certificates
284 -```
285 -
286 -> Some Linux distributions have different methods of updating the certificate list. For more details, please read this
287 -> guide on [adding trusted root certificates](https://github.com/Busindre/How-to-Add-trusted-root-certificates).
288 -
289 -Once you update your certificate list, you can set the stream parameters for Netdata to trust the parent certificate. Open `stream.conf` for editing and change the following lines:
290 -
184 + health enabled = no
185 ```
292 -[stream]
293 - CApath = /etc/ssl/certs/
294 - CAfile = /etc/ssl/certs/parent_cert.pem
295 -```
296 -
297 -With this configuration, the `CApath` option tells Netdata to search for trusted certificates inside `/etc/ssl/certs`. The `CAfile` option specifies the Netdata parent certificate is located at `/etc/ssl/certs/parent_cert.pem`. With this configuration, you can skip using the system's entire list of certificates and use Netdata's parent certificate instead.
298 -
299 -#### Expected behaviors
300 -
301 -With the introduction of TLS/SSL, the parent-child communication behaves as shown in the table below, depending on the following configurations:
302 -
303 -- **Parent TLS (Yes/No)**: Whether the `[web]` section in `netdata.conf` has `ssl key` and `ssl certificate`.
304 -- **Parent port TLS (-/force/optional)**: Depends on whether the `[web]` section `bind to` contains a `^SSL=force` or `^SSL=optional` directive on the port(s) used for streaming.
305 -- **Child TLS (Yes/No)**: Whether the destination in the child's `stream.conf` has `:SSL` at the end.
306 -- **Child TLS Verification (yes/no)**: Value of the child's `stream.conf` `ssl skip certificate verification` parameter (default is no).
307 -
308 -| Parent TLS enabled|Parent port SSL|Child TLS|Child SSL Ver.|Behavior|
309 -|:----------------:|:-------------:|:-------:|:------------:|:-------|
310 -| No|-|No|no|Legacy behavior. The parent-child stream is unencrypted.|
311 -| Yes|force|No|no|The parent rejects the child connection.|
312 -| Yes|-/optional|No|no|The parent-child stream is unencrypted (expected situation for legacy child nodes and newer parent nodes)|
313 -| Yes|-/force/optional|Yes|no|The parent-child stream is encrypted, provided that the parent has a valid TLS/SSL certificate. Otherwise, the child refuses to connect.|
314 -| Yes|-/force/optional|Yes|yes|The parent-child stream is encrypted.|
186
187 ### Streaming compression
188
@@ -408,83 +279,147 @@ Same thing applies with the `[MACHINE_GUID]` configuration.
279 [MACHINE_GUID]
280 enable compression = yes | no
281 ```
411 -## Viewing remote host dashboards, using mirrored databases
282
413 -On any receiving Netdata, that maintains remote databases and has its web server enabled,
414 -The node menu will include a list of the mirrored databases.
283 +### Securing streaming with TLS/SSL
284 +
285 +Netdata does not activate TLS encryption by default. To encrypt streaming connections, you first need to [enable TLS
286 +support](https://github.com/netdata/netdata/blob/master/web/server/README.md#enabling-tls-support) on the parent. With encryption enabled on the receiving side, you
287 +need to instruct the child to use TLS/SSL as well. On the child's `stream.conf`, configure the destination as follows:
288 +
289 +```
290 +[stream]
291 + destination = host:port:SSL
292 +```
293 +
294 +The word `SSL` appended to the end of the destination tells the child that connections must be encrypted.
295 +
296 +> While Netdata uses Transport Layer Security (TLS) 1.2 to encrypt communications rather than the obsolete SSL protocol,
297 +> it's still common practice to refer to encrypted web connections as `SSL`. Many vendors, like Nginx and even Netdata
298 +> itself, use `SSL` in configuration files, whereas documentation will always refer to encrypted communications as `TLS`
299 +> or `TLS/SSL`.
300 +
301 +#### Certificate verification
302
416 -![image](https://cloud.githubusercontent.com/assets/2662304/24080824/24cd2d3c-0caf-11e7-909d-a8dd1dbb95d7.png)
303 +When TLS/SSL is enabled on the child, the default behavior will be to not connect with the parent unless the server's
304 +certificate can be verified via the default chain. In case you want to avoid this check, add the following to the
305 +child's `stream.conf` file:
306
418 -Selecting any of these, the server will offer a dashboard using the mirrored metrics.
307 +```
308 +[stream]
309 + ssl skip certificate verification = yes
310 +```
311
420 -## Monitoring ephemeral nodes
312 +#### Trusted certificate
313
422 -Auto-scaling is probably the most trendy service deployment strategy these days.
314 +If you've enabled [certificate verification](#certificate-verification), you might see errors from the OpenSSL library
315 +when there's a problem with checking the certificate chain (`X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY`). More
316 +importantly, OpenSSL will reject self-signed certificates.
317
424 -Auto-scaling detects the need for additional resources and boots VMs on demand, based on a template. Soon after they start running the applications, a load balancer starts distributing traffic to them, allowing the service to grow horizontally to the scale needed to handle the load. When demands falls, auto-scaling starts shutting down VMs that are no longer needed.
318 +Given these known issues, you have two options. If you trust your certificate, you can set the options `CApath` and
319 +`CAfile` to inform Netdata where your certificates, and the certificate trusted file, are stored.
320
426 -![Monitoring ephemeral nodes with Netdata](https://cloud.githubusercontent.com/assets/2662304/23627426/65a9074a-02b9-11e7-9664-cd8f258a00af.png)
321 +For more details about these options, you can read about [verify
322 +locations](https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_load_verify_locations.html).
323
428 -What a fantastic feature for controlling infrastructure costs! Pay only for what you need for the time you need it!
324 +Before you changed your streaming configuration, you need to copy your trusted certificate to your child system and add
325 +the certificate to OpenSSL's list.
326
430 -In auto-scaling, all servers are ephemeral, they live for just a few hours. Every VM is a brand new instance of the application, that was automatically created based on a template.
327 +On most Linux distributions, the `update-ca-certificates` command searches inside the `/usr/share/ca-certificates`
328 +directory for certificates. You should double-check by reading the `update-ca-certificate` manual (`man
329 +update-ca-certificate`), and then change the directory in the below commands if needed.
330
432 -So, how can we monitor them? How can we be sure that everything is working as expected on all of them?
331 +If you have `sudo` configured on your child system, you can use that to run the following commands. If not, you'll have
332 +to log in as `root` to complete them.
333
434 -### The Netdata way
334 +```
335 +# mkdir /usr/share/ca-certificates/netdata
336 +# cp parent_cert.pem /usr/share/ca-certificates/netdata/parent_cert.crt
337 +# chown -R netdata.netdata /usr/share/ca-certificates/netdata/
338 +```
339 +
340 +First, you create a new directory to store your certificates for Netdata. Next, you need to change the extension on your
341 +certificate from `.pem` to `.crt` so it's compatible with `update-ca-certificate`. Finally, you need to change
342 +permissions so the user that runs Netdata can access the directory where you copied in your certificate.
343 +
344 +Next, edit the file `/etc/ca-certificates.conf` and add the following line:
345
436 -We recently made a significant improvement at the core of Netdata to support monitoring such setups.
346 +```
347 +netdata/parent_cert.crt
348 +```
349
438 -Following the Netdata way of monitoring, we wanted:
350 +Now you update the list of certificates running the following, again either as `sudo` or `root`:
351
440 -1. **real-time performance monitoring**, collecting ***thousands of metrics per server per second***, visualized in interactive, automatically created dashboards.
441 -2. **real-time alarms**, for all nodes.
442 -3. **zero configuration**, all ephemeral servers should have exactly the same configuration, and nothing should be configured at any system for each of the ephemeral nodes. We shouldn't care if 10 or 100 servers are spawned to handle the load.
443 -4. **self-cleanup**, so that nothing needs to be done for cleaning up the monitoring infrastructure from the hundreds of nodes that may have been monitored through time.
352 +```
353 +# update-ca-certificates
354 +```
355
445 -### How it works
356 +> Some Linux distributions have different methods of updating the certificate list. For more details, please read this
357 +> guide on [adding trusted root certificates](https://github.com/Busindre/How-to-Add-trusted-root-certificates).
358
447 -All monitoring solutions, including Netdata, work like this:
359 +Once you update your certificate list, you can set the stream parameters for Netdata to trust the parent certificate.
360 +Open `stream.conf` for editing and change the following lines:
361
449 -1. Collect metrics from the system and the running applications
450 -2. Store metrics in a time-series database
451 -3. Examine metrics periodically, for triggering alarms and sending alarm notifications
452 -4. Visualize metrics so that users can see what exactly is happening
362 +```
363 +[stream]
364 + CApath = /etc/ssl/certs/
365 + CAfile = /etc/ssl/certs/parent_cert.pem
366 +```
367
454 -Netdata used to be self-contained, so that all these functions were handled entirely by each server. The changes we made, allow each Netdata to be configured independently for each function. So, each Netdata can now act as:
368 +With this configuration, the `CApath` option tells Netdata to search for trusted certificates inside `/etc/ssl/certs`.
369 +The `CAfile` option specifies the Netdata parent certificate is located at `/etc/ssl/certs/parent_cert.pem`. With this
370 +configuration, you can skip using the system's entire list of certificates and use Netdata's parent certificate instead.
371
456 -- A self-contained system, much like it used to be.
457 -- A data collector that collects metrics from a host and pushes them to another Netdata (with or without a local database and alarms).
458 -- A proxy, which receives metrics from other hosts and pushes them immediately to other Netdata servers. Netdata proxies can also be `store and forward proxies` meaning that they are able to maintain a local database for all metrics passing through them (with or without alarms).
459 -- A time-series database node, where data are kept, alarms are run and queries are served to visualise the metrics.
372 +#### Expected behaviors
373
461 -### Configuring an auto-scaling setup
374 +With the introduction of TLS/SSL, the parent-child communication behaves as shown in the table below, depending on the
375 +following configurations:
376
463 -![A diagram of an auto-scaling setup with Netdata](https://user-images.githubusercontent.com/1153921/84290043-0c1c1600-aaf8-11ea-9757-dd8dd8a8ec6c.png)
377 +- **Parent TLS (Yes/No)**: Whether the `[web]` section in `netdata.conf` has `ssl key` and `ssl certificate`.
378 +- **Parent port TLS (-/force/optional)**: Depends on whether the `[web]` section `bind to` contains a `^SSL=force` or
379 + `^SSL=optional` directive on the port(s) used for streaming.
380 +- **Child TLS (Yes/No)**: Whether the destination in the child's `stream.conf` has `:SSL` at the end.
381 +- **Child TLS Verification (yes/no)**: Value of the child's `stream.conf` `ssl skip certificate verification`
382 + parameter (default is no).
383
465 -You need a Netdata parent. This node should not be ephemeral. It will be the node where all ephemeral child
466 -nodes will send their metrics.
384 +| Parent TLS enabled | Parent port SSL | Child TLS | Child SSL Ver. | Behavior |
385 +| :----------------- | :--------------- | :-------- | :------------- | :--------------------------------------------------------------------------------------------------------------------------------------- |
386 +| No | - | No | no | Legacy behavior. The parent-child stream is unencrypted. |
387 +| Yes | force | No | no | The parent rejects the child connection. |
388 +| Yes | -/optional | No | no | The parent-child stream is unencrypted (expected situation for legacy child nodes and newer parent nodes) |
389 +| Yes | -/force/optional | Yes | no | The parent-child stream is encrypted, provided that the parent has a valid TLS/SSL certificate. Otherwise, the child refuses to connect. |
390 +| Yes | -/force/optional | Yes | yes | The parent-child stream is encrypted. |
391
468 -The parent will need to authorize child nodes to receive their metrics. This is done with an API key.
392 +### Proxy
393
470 -#### API keys
394 +A proxy is a node that receives metrics from a child, then streams them onward to a parent. To configure a proxy,
395 +configure it as a receiving and a sending Netdata at the same time.
396
472 -API keys are just random GUIDs. Use the Linux command `uuidgen` to generate one. You can use the same API key for all your child nodes, or you can configure one API for each of them. This is entirely your decision.
397 +Netdata proxies may or may not maintain a database for the metrics passing through them. When they maintain a database,
398 +they can also run health checks (alarms and notifications) for the remote host that is streaming the metrics.
399
474 -We suggest to use the same API key for each ephemeral node template you have, so that all replicas of the same ephemeral node will have exactly the same configuration.
400 +In the following example, the proxy receives metrics from a child node using the `API_KEY` of
401 +`66666666-7777-8888-9999-000000000000`, then stores metrics using `dbengine`. It then uses the `API_KEY` of
402 +`11111111-2222-3333-4444-555555555555` to proxy those same metrics on to a parent node at `203.0.113.0`.
403
476 -I will use this API_KEY: `11111111-2222-3333-4444-555555555555`. Replace it with your own.
404 +```conf
405 +[stream]
406 + enabled = yes
407 + destination = 203.0.113.0
408 + api key = 11111111-2222-3333-4444-555555555555
409
478 -#### Configuring the parent
410 +[66666666-7777-8888-9999-000000000000]
411 + enabled = yes
412 + default memory mode = dbengine
413 +```
414
480 -To configure the parent node:
415 +### Ephemeral nodes
416
482 -1. On the parent node, edit `stream.conf` by using the `edit-config` script:
483 -`/etc/netdata/edit-config stream.conf`
417 +Netdata can help you monitor ephemeral nodes, such as containers in an auto-scaling infrastructure, by always streaming
418 +metrics to any number of permanently-running parent nodes.
419
485 -2. Set the following parameters:
420 +On the parent, set the following in `stream.conf`:
421
487 -```bash
422 +```conf
423 [11111111-2222-3333-4444-555555555555]
424 # enable/disable this API key
425 enabled = yes
@@ -499,24 +434,7 @@ To configure the parent node:
434 health enabled by default = auto
435 ```
436
502 -_`stream.conf` on the parent, to enable receiving metrics from its child nodes using the API key._
503 -
504 -If you used many API keys, you can add one such section for each API key.
505 -
506 -When done, restart Netdata on the parent node. It is now ready to receive metrics.
507 -
508 -Note that `health enabled by default = auto` will still trigger `last_collected` alarms, if a connected child does not exit gracefully. If the `netdata` process running on the child is
509 -stopped, it will close the connection to the parent, ensuring that no `last_collected` alarms are triggered. For example, a proper container restart would first terminate
510 -the `netdata` process, but a system power issue would leave the connection open on the parent side. In the second case, you will still receive alarms.
511 -
512 -#### Configuring the child nodes
513 -
514 -To configure the child node:
515 -
516 -1. On the child node, edit `stream.conf` by using the `edit-config` script:
517 -`/etc/netdata/edit-config stream.conf`
518 -
519 -2. Set the following parameters:
437 +On the child nodes, set the following in `stream.conf`:
438
439 ```bash
440 [stream]
@@ -526,44 +444,26 @@ To configure the child node:
444 # the IP and PORT of the parent
445 destination = 10.11.12.13:19999
446
529 - # the API key to use
447 + # the API key to use
448 api key = 11111111-2222-3333-4444-555555555555
449 ```
450
533 -_`stream.conf` on child nodes, to enable pushing metrics to their parent at `10.11.12.13:19999`._
534 -
535 -Using just the above configuration, the child nodes will be pushing their metrics to the parent Netdata, but they will still maintain a local database of the metrics and run health checks. To disable them, edit `/etc/netdata/netdata.conf` and set:
451 +In addition, edit `netdata.conf` on each child node to disable the database and alarms.
452
453 ```bash
454 [global]
455 # disable the local database
540 - memory mode = none
456 + memory mode = none
457
458 [health]
459 # disable health checks
460 enabled = no
461 ```
462
547 -_`netdata.conf` configuration on child nodes, to disable the local database and health checks._
548 -
549 -Keep in mind that setting `memory mode = none` will also force `[health].enabled = no` (health checks require access to a local database). But you can keep the database and disable health checks if you need to. You are however sending all the metrics to the parent node, which can handle the health checking (`[health].enabled = yes`)
550 -
551 -#### Netdata unique ID
552 -
553 -The file `/var/lib/netdata/registry/netdata.public.unique.id` contains a random GUID that **uniquely identifies each Netdata Agent**. This file is automatically generated, by Netdata, the first time it is started and remains unaltered forever.
554 -
555 -> If you are building an image to be used for automated provisioning of autoscaled VMs, it important to delete that file from the image, so that each instance of your image will generate its own.
556 -
557 -#### Troubleshooting metrics streaming
463 +## Troubleshooting
464
465 Both parent and child nodes log information at `/var/log/netdata/error.log`.
466
561 -To obtain the error logs, run the following on both the parent and child nodes:
562 -
563 -```
564 -tail -f /var/log/netdata/error.log | grep STREAM
565 -```
566 -
467 If the child manages to connect to the parent you will see something like (on the parent):
468
469 ```
@@ -583,53 +483,7 @@ and something like this on the child:
483 2017-03-09 09:38:28: netdata: INFO : STREAM xxx [send to box:19999]: established communication - sending metrics...
484 ```
485
586 -### Archiving to a time-series database
587 -
588 -The parent Netdata node can also archive metrics, for all its child nodes, to a time-series database. At the time of
589 -this writing, Netdata supports:
590 -
591 -- graphite
592 -- opentsdb
593 -- prometheus
594 -- json document DBs
595 -- all the compatibles to the above (e.g. kairosdb, influxdb, etc)
596 -
597 -Check the Netdata [exporting documentation](https://github.com/netdata/netdata/blob/master/docs/export/external-databases.md) for configuring this.
598 -
599 -This is how such a solution will work:
600 -
601 -![Diagram showing an example configuration for archiving to a time-series
602 -database](https://user-images.githubusercontent.com/1153921/84291308-c2ccc600-aaf9-11ea-98a9-89ccbf3a62dd.png)
603 -
604 -### An advanced setup
605 -
606 -Netdata also supports `proxies` with and without a local database, and data retention can be different between all nodes.
607 -
608 -This means a setup like the following is also possible:
609 -
610 -<p align="center">
611 -<img src="https://cloud.githubusercontent.com/assets/2662304/23629551/bb1fd9c2-02c0-11e7-90f5-cab5a3ed4c53.png"/>
612 -</p>
613 -
614 -## Proxies
615 -
616 -A proxy is a Netdata node that is receiving metrics from a Netdata node, and streams them to another Netdata node.
617 -
618 -Netdata proxies may or may not maintain a database for the metrics passing through them.
619 -When they maintain a database, they can also run health checks (alarms and notifications)
620 -for the remote host that is streaming the metrics.
621 -
622 -To configure a proxy, configure it as a receiving and a sending Netdata at the same time,
623 -using `stream.conf`.
624 -
625 -The sending side of a Netdata proxy, connects and disconnects to the final destination of the
626 -metrics, following the same pattern of the receiving side.
627 -
628 -For a practical example see [Monitoring ephemeral nodes](#monitoring-ephemeral-nodes).
629 -
630 -## Troubleshooting streaming connections
631 -
632 -This section describes the most common issues you might encounter when connecting parent and child nodes.
486 +The following sections describe the most common issues you might encounter when connecting parent and child nodes.
487
488 ### Slow connections between parent and child
489
@@ -647,8 +501,8 @@ On the parent side, you may see various error messages, most commonly the follow
501 netdata ERROR : STREAM_PARENT[CHILD HOSTNAME,[CHILD IP]:CHILD PORT] : read failed: end of file
502 ```
503
650 -Another common problem in slow connections is the CHILD sending a partial message to the parent. In this case,
651 -the parent will write the following in its `error.log`:
504 +Another common problem in slow connections is the child sending a partial message to the parent. In this case, the
505 +parent will write the following to its `error.log`:
506
507 ```
508 ERROR : STREAM_RECEIVER[CHILD HOSTNAME,[CHILD IP]:CHILD PORT] : sent command 'B' which is not known by netdata, for host 'HOSTNAME'. Disabling it.
@@ -673,11 +527,11 @@ down), you will see the following in the child's `error.log`.
527 ERROR : STREAM_SENDER[HOSTNAME] : Failed to connect to 'PARENT IP', port 'PARENT PORT' (errno 113, No route to host)
528 ```
529
676 -### 'Is this a Netdata node?'
530 +### 'Is this a Netdata?'
531
532 This question can appear when Netdata starts the stream and receives an unexpected response. This error can appear when
533 the parent is using SSL and the child tries to connect using plain text. You will also see this message when
680 -Netdata connects to another server that isn't a Netdata node. The complete error message will look like this:
534 +Netdata connects to another server that isn't Netdata. The complete error message will look like this:
535
536 ```
537 ERROR : STREAM_SENDER[CHILD HOSTNAME] : STREAM child HOSTNAME [send to PARENT HOSTNAME:PARENT PORT]: server is not replying properly (is it a netdata?).
@@ -702,15 +556,15 @@ STREAM [receive from [child HOSTNAME]:child IP]: `MESSAGE`. Forbidding access."
556
557 `MESSAGE` will have one of the following patterns:
558
705 -- `request without KEY` : The message received is incomplete and the KEY value can be API, hostname, machine GUID.
706 -- `API key 'VALUE' is not valid GUID`: The UUID received from child does not have the format defined in [RFC 4122]
707 - (https://tools.ietf.org/html/rfc4122)
708 -- `machine GUID 'VALUE' is not GUID.`: This error with machine GUID is like the previous one.
709 -- `API key 'VALUE' is not allowed`: This stream has a wrong API key.
710 -- `API key 'VALUE' is not permitted from this IP`: The IP is not allowed to use STREAM with this parent.
711 -- `machine GUID 'VALUE' is not allowed.`: The GUID that is trying to send stream is not allowed.
712 -- `Machine GUID 'VALUE' is not permitted from this IP. `: The IP does not match the pattern or IP allowed to connect
713 - to use stream.
559 +- `request without KEY` : The message received is incomplete and the KEY value can be API, hostname, machine GUID.
560 +- `API key 'VALUE' is not valid GUID`: The UUID received from child does not have the format defined in [RFC
561 + 4122](https://tools.ietf.org/html/rfc4122)
562 +- `machine GUID 'VALUE' is not GUID.`: This error with machine GUID is like the previous one.
563 +- `API key 'VALUE' is not allowed`: This stream has a wrong API key.
564 +- `API key 'VALUE' is not permitted from this IP`: The IP is not allowed to use STREAM with this parent.
565 +- `machine GUID 'VALUE' is not allowed.`: The GUID that is trying to send stream is not allowed.
566 +- `Machine GUID 'VALUE' is not permitted from this IP. `: The IP does not match the pattern or IP allowed to connect to
567 + use stream.
568
569 ### Netdata could not create a stream
570
@@ -722,5 +576,3 @@ file descriptor given is not a valid stream
576 ```
577
578 After logging this error, Netdata will close the stream.
725 -
726 -
web/README.md
+2 -194
@@ -1,14 +1,4 @@
1 -<!--
2 -title: "Dashboards"
3 -description: "Every Netdata Agent comes bundled with hundreds of interactive, customizable charts designed by monitoring and troubleshooting experts."
4 -custom_edit_url: https://github.com/netdata/netdata/edit/master/web/README.md
5 -sidebar_label: "Dashboards"
6 -learn_status: "Published"
7 -learn_topic_type: "References"
8 -learn_rel_path: "Developers/Web"
9 --->
10 -
11 -# Dashboards
1 +# Agent Dashboards
2
3 Because Netdata is a health monitoring and _performance troubleshooting_ system,
4 we put a lot of emphasis on real-time, meaningful, and context-aware charts.
@@ -16,7 +6,7 @@ we put a lot of emphasis on real-time, meaningful, and context-aware charts.
6 We bundle Netdata with a dashboard and hundreds of charts, designed by both our
7 team and the community, but you can also customize them yourself.
8
19 -There are two primary ways to view Netdata's dashboards:
9 +There are two primary ways to view Netdata's dashboards on the agent:
10
11 1. The [local Agent dashboard](https://github.com/netdata/netdata/blob/master/web/gui/README.md) that comes pre-configured with every Netdata installation. You can
12 see it at `http://NODE:19999`, replacing `NODE` with `localhost`, the hostname of your node, or its IP address. You
@@ -30,188 +20,6 @@ There are two primary ways to view Netdata's dashboards:
20
21 You can also view all the data Netdata collects through the [REST API v1](https://github.com/netdata/netdata/blob/master/web/api/README.md#netdata-rest-api).
22
33 -No matter where you use Netdata's charts, you'll want to know how to [use](#using-charts) them. You'll also want to
34 -understand how Netdata defines [charts](#charts), [dimensions](#dimensions), [families](#families), and
35 -[contexts](#contexts).
36 -
37 -## Using charts
38 -
39 -Netdata's charts are far from static. They are interactive, real-time, and work
40 -with your mouse, touchpad, or touchscreen!
41 -
42 -Hover over any chart to temporarily pause it and see the exact values presented
43 -as different [dimensions](#dimensions). Click or tap stop the chart from automatically updating with new metrics, thereby locking it to a single timeframe.
44 -
45 -![Animated GIF of hovering over a chart to see
46 -values](https://user-images.githubusercontent.com/1153921/62968279-9227dd00-bdbf-11e9-9112-1d21444d0f31.gif)
47 -
48 -You can change how charts show their metrics by zooming in or out, moving
49 -forward or backward in time, or selecting a specific timeframe for more in-depth
50 -analysis.
51 -
52 -Whenever you use a chart in this way, Netdata synchronizes all the other charts
53 -to match it.
54 -
55 -You can change how charts show their metrics in a few different ways, each of
56 -which have a few methods:
57 -
58 -| Manipulation | Method #1 | Method #2 | Method #3 |
59 -|--- |--- |--- |--- |
60 -| **Reset** charts to default auto-refreshing state  | `double click` | `double tap` (touchpad/touchscreen)  |  |
61 -| **Select** a certain timeframe | `ALT` + `mouse selection`  | `⌘` + `mouse selection` (macOS)  |  |
62 -| **Pan** forward or back in time  | `click and drag` | `touch and drag` (touchpad/touchscreen)  |  |
63 -| **Zoom** to a specific timeframe | `SHIFT` + `mouse selection`  |  |  |
64 -| **Zoom** in/out  | `SHIFT`/`ALT` + `mouse scrollwheel`  | `SHIFT`/`ALT` + `two-finger pinch` (touchpad/touchscreen)  | `SHIFT`/`ALT` + `two-finger scroll` (touchpad/touchscreen) |
65 -
66 -Here's how chart synchronization looks while zooming and panning:
67 -
68 -![Animated GIF of the standard Netdata dashboard being manipulated and synchronizing
69 -charts](https://user-images.githubusercontent.com/1153921/80839230-b034a800-8baf-11ea-9cb2-99c1e10f0f85.gif)
70 -
71 -You can also perform all these actions using the small
72 -rewind/play/fast-forward/zoom-in/zoom-out buttons that appear in the
73 -bottom-right corner of each chart.
74 -
75 -Additionally, resize charts by clicking-and-dragging the icon on the bottom-right corner of any chart. To restore the
76 -chart to its original height, double-click the same icon.
77 -
78 -![Animated GIF of resizing a chart and resetting it to the default
79 -height](https://user-images.githubusercontent.com/1153921/80842459-7d41e280-8bb6-11ea-9488-1bc29f94d7f2.gif)
80 -
81 -## Charts, contexts, families
82 -
83 -Before customizing the standard web dashboard, creating a custom dashboard,
84 -configuring an alarm, or writing a collector, it's crucial to understand how
85 -Netdata organizes metrics into charts, dimensions, families, and contexts.
86 -
87 -### Charts
88 -
89 -A **chart** is an individual, interactive, always-updating graphic displaying
90 -one or more collected/calculated metrics. Charts are generated by
91 -[collectors](https://github.com/netdata/netdata/blob/master/collectors/README.md).
92 -
93 -Here's the system CPU chart, the first chart displayed on the standard
94 -dashboard:
95 -
96 -![Screenshot of the system CPU chart in the Netdata
97 -dashboard](https://user-images.githubusercontent.com/1153921/62720972-0b8a8e80-b9c0-11e9-930b-4829f7b17cfd.png)
98 -
99 -Netdata displays a chart's name in parentheses above the chart. For example, if
100 -you navigate to the system CPU chart, you'll see the label: **Total CPU
101 -utilization (system.cpu)**. In this case, the chart's name is `system.cpu`.
102 -Netdata derives the name from the chart's [context](#contexts).
103 -
104 -### Dimensions
105 -
106 -A **dimension** is a value that gets shown on a chart. The value can be raw data
107 -or calculated values, such as percentages, aggregates, and more.
108 -
109 -Charts are capable of showing more than one dimension. Netdata shows these
110 -dimensions on the right side of the chart, beneath the date and time. Again, the
111 -`system.cpu` chart will serve as a good example.
112 -
113 -![Screenshot of the dimensions shown in the system CPU chart in the Netdata
114 -dashboard](https://user-images.githubusercontent.com/1153921/62721031-2bba4d80-b9c0-11e9-9dca-32403617ce72.png)
115 -
116 -Here, the `system.cpu` chart is showing many dimensions, such as `user`,
117 -`system`, `softirq`, `irq`, and more.
118 -
119 -Note that other applications sometimes use the word _series_ instead of
120 -_dimension_.
121 -
122 -### Families
123 -
124 -A **family** is _one_ instance of a monitored hardware or software resource that
125 -needs to be monitored and displayed separately from similar instances.
126 -
127 -For example, if your system has multiple disk drives at `sda` and `sdb`, Netdata
128 -will put each interface into their own family. Same goes for software resources,
129 -like multiple MySQL instances. We call these instances "families" because the
130 -charts associated with a single disk instance, for example, are often related to
131 -each other. Relatives, family... get it?
132 -
133 -When relevant, Netdata prefers to organize charts by family. When you visit the
134 -**Disks** section, you will see your disk drives organized into families, and
135 -each family will have one or more charts: `disk`, `disk_ops`, `disk_backlog`,
136 -`disk_util`, `disk_await`, `disk_avgsz`, `disk_svctm`, `disk_mops`, and
137 -`disk_iotime`.
138 -
139 -In the screenshot below, the disk family `sdb` shows a few gauges, followed by a
140 -few of the associated charts:
141 -
142 -![Screenshot of a disk drive family and associated charts in the Netdata
143 -dashboard](https://user-images.githubusercontent.com/1153921/62721362-e34f5f80-b9c0-11e9-8d2e-9a3bec48e920.png)
144 -
145 -Netdata also creates separate submenu entries for each family in the right
146 -navigation page so you can easily navigate to the instance you're interested in.
147 -Here, Netdata has made several submenus under the **Disk** menu.
148 -
149 -![Screenshot of the disks menu and
150 -submenus](https://user-images.githubusercontent.com/1153921/62721531-3cb78e80-b9c1-11e9-89c2-fdd736aec7d4.png)
151 -
152 -### Contexts
153 -
154 -A **context** is a way of grouping charts by the types of metrics collected and
155 -dimensions displayed. Different charts with the same context will show the same
156 -dimensions, but for different instances (families) of hardware/software
157 -resources.
158 -
159 -For example, the **Disks** section will often use many contexts (`disk.io`,
160 -`disk.ops`, `disk.backlog`, `disk.util`, and so on). Netdata then creates an
161 -individual chart for each context, and groups them by family.
162 -
163 -Netdata names charts according to their context according to the following
164 -structure: `[context].[family]`. A chart with the `disk.util` context, in the
165 -`sdb` family, gets the name `disk_util.sdb`. Netdata shows that name in the
166 -top-left corner of a chart.
167 -
168 -Given the four example contexts, and two families of `sdb` and `sdd`, Netdata
169 -will create the following charts and their names:
170 -
171 -| Context | `sdb` family | `sdd` family |
172 -|----------------|--------------------|--------------------|
173 -| `disk.io` | `disk_io.sdb` | `disk_io.sdd` |
174 -| `disk.ops` | `disk_ops.sdb` | `disk_ops.sdd` |
175 -| `disk.backlog` | `disk_backlog.sdb` | `disk_backlog.sdd` |
176 -| `disk.util` | `disk_util.sdb` | `disk_util.sdd` |
177 -
178 -And here's what two of those charts in the `disk.io` context look like under
179 -`sdb` and `sdd` families:
180 -
181 -![context_01](https://user-images.githubusercontent.com/1153921/62728232-177e4c80-b9d0-11e9-9e29-2a6c59d4d873.png)
182 -![context_02](https://user-images.githubusercontent.com/1153921/62728234-1b11d380-b9d0-11e9-8904-07befd8ac592.png)
183 -
184 -As you can see in the screenshot, you can view the context of a chart if you
185 -hover over the date above the list of dimensions. A tooltip will appear that
186 -shows you two pieces of information: the collector that produces the chart, and
187 -the chart's context.
188 -
189 -Netdata also uses [contexts for alarm templates](https://github.com/netdata/netdata/blob/master/health/REFERENCE.md#alarm-line-on). You can create an alarm for the
190 -`net.packets` context to receive alerts for any chart with that context, no matter which family it's attached to.
191 -
192 -## Positive and negative values on charts
193 -
194 -To improve clarity on charts, Netdata dashboards present **positive** values for
195 -metrics representing `read`, `input`, `inbound`, `received` and **negative**
196 -values for metrics representing `write`, `output`, `outbound`, `sent`.
197 -
198 -![Screenshot showing positive and negative
199 -values](https://user-images.githubusercontent.com/1153921/81870401-9d649080-952a-11ea-80e3-4a7b480252ee.gif)
200 -
201 -_Netdata charts showing the bandwidth and packets of a network interface.
202 -`received` is positive and `sent` is negative._
203 -
204 -## Autoscaled y-axis
205 -
206 -Netdata charts automatically zoom vertically, to visualize the variation of each
207 -metric within the visible timeframe.
208 -
209 -![Animated GIF showing the auso-scaling Y
210 -axis](https://user-images.githubusercontent.com/1153921/80838276-8084a080-8bad-11ea-8167-8d5ab2fb1be1.gif)
211 -
212 -_A zero-based `stacked` chart, automatically switches to an auto-scaled `area`
213 -chart when a single dimension is selected._
214 -
23 ## dashboard.js
24
25 Netdata uses the `dashboards.js` file to define, configure, create, and update