Browse Source

Database docs edits (#19075)

Co-authored-by: ilyam8 <ilya@netdata.cloud>
Fotis Voutsas 3 months ago
parent
commit
88defc763e

+ 1 - 0
docs/DICTIONARY.md

@@ -16,6 +16,7 @@ When the context is clear, we can omit the "Netdata" prefix for brevity.
 | Term                 | Definition                                         |
 |----------------------|----------------------------------------------------|
 | **Tier** (**Tiers**) | Database storage layers with different granularity |
+| **Mode(s)**          | The different Modes of the Database                |
 
 ## Streaming
 

+ 1 - 1
docs/dashboards-and-charts/visualization-date-and-time-controls.md

@@ -81,7 +81,7 @@ beyond stored historical metrics, you'll see this message:
 
 ![image](https://user-images.githubusercontent.com/70198089/225851033-43b95164-a651-48f2-8915-6aac9739ed93.png)
 
-At any time, [configure the internal TSDB's storage capacity](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md) to expand your
+At any time, [configure the internal TSDB's storage capacity](/src/database/README.md) to expand your
 depth of historical metrics.
 
 ### Timezone selector

+ 18 - 18
docs/deployment-guides/deployment-strategies.md

@@ -2,7 +2,7 @@
 
 ## Deployment Options Overview
 
-This section provides a quick overview for a few common deployment options for Netdata.
+This section provides a quick overview of a few common deployment options for Netdata.
 
 You can read about [Standalone Deployment](/docs/deployment-guides/standalone-deployment.md) and [Deployment with Centralization Points](/docs/deployment-guides/deployment-with-centralization-points.md) in the documentation inside this section.
 
@@ -24,9 +24,9 @@ An API key is a key created with `uuidgen` and is used for authentication and/or
 
 #### Child config
 
-As mentioned above, we do not recommend to connect the Child to Cloud directly during your setup.
+As mentioned above, we do not recommend connecting the Child to Cloud directly during your setup.
 
-This is done in order to reduce the footprint of the Netdata Agent on your production system, as some capabilities can be switched OFF for the Child and kept ON for the Parent.
+This is done to reduce the footprint of the Netdata Agent on your production system, as some capabilities can be switched OFF for the Child and kept ON for the Parent.
 
 In this example, Machine Learning and Alerting are disabled for the Child, so that the Parent can take the load. We also use RAM instead of disk to store metrics with limited retention, covering temporary network issues.
 
@@ -34,14 +34,14 @@ In this example, Machine Learning and Alerting are disabled for the Child, so th
 
 On the child node, edit `netdata.conf` by using the [edit-config](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script and set the following parameters:
 
-```yaml
+```text
 [db]
     # https://github.com/netdata/netdata/blob/master/src/database/README.md
     # none = no retention, ram = some retention in ram
     mode = ram
     # The retention in seconds.
-    # This provides some tolerance to the time the child has to find a parent in
-    # order to transfer the data. For IoT this can be lowered to 120.
+    # This provides some tolerance to the time the child has to find a parent 
+    # to transfer the data. For IoT, this can be lowered to 120.
     retention = 1200
     # The granularity of metrics, in seconds.
     # You may increase this to lower CPU resources.
@@ -56,8 +56,7 @@ On the child node, edit `netdata.conf` by using the [edit-config](/docs/netdata-
     # Disable remote access to the local dashboard
     bind to = lo
 [plugins]
-    # Uncomment the following line to disable all external plugins on extreme
-    # IoT cases by default.
+    # Uncomment the following line to disable all external plugins on extreme IoT cases by default.
     # enable running new plugins = no
 ```
 
@@ -65,7 +64,7 @@ On the child node, edit `netdata.conf` by using the [edit-config](/docs/netdata-
 
 To edit `stream.conf`, use again the [edit-config](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script and set the following parameters:
 
-```yaml
+```text
 [stream]
     # Stream metrics to another Netdata
     enabled = yes
@@ -77,7 +76,7 @@ To edit `stream.conf`, use again the [edit-config](/docs/netdata-agent/configura
 
 #### Parent config
 
-For the Parent, besides setting up streaming, this example also provides configuration for multiple [tiers of metrics storage](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md), for 10 Children, with about 2k metrics each. This allows for:
+For the Parent, besides setting up streaming, this example also provides configuration for multiple [tiers of metrics storage](/src/database/README.md#tiers), for 10 Children, with about 2k metrics each. This allows for:
 
 - 1s granularity at tier 0 for 1 week
 - 1m granularity at tier 1 for 1 month
@@ -92,7 +91,7 @@ Requiring:
 
 On the Parent, edit `netdata.conf` by using the [edit-config](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script and set the following parameters:
 
-```yaml
+```text
 [db]
     mode = dbengine
     dbengine tier backfill = new
@@ -124,19 +123,19 @@ On the Parent node, edit `stream.conf` by using the [edit-config](/docs/netdata-
 
 ```yaml
 [API_KEY]
-    # Accept metrics streaming from other Agents with the specified API key
-    enabled = yes
+  # Accept metrics streaming from other Agents with the specified API key
+  enabled = yes
 ```
 
 ### Active–Active Parents
 
-In order to setup active–active streaming between Parent 1 and Parent 2, Parent 1 needs to be instructed to stream data to Parent 2 and Parent 2 to stream data to Parent 1. The Child Agents need to be configured with the addresses of both Parent Agents. An Agent will only connect to one Parent at a time, falling back to the next upon failure. These examples use the same API key between Parent Agents and for connections for Child Agents.
+To set up active–active streaming between Parent 1 and Parent 2, Parent 1 needs to be instructed to stream data to Parent 2 and Parent 2 to stream data to Parent 1. The Child Agents need to be configured with the addresses of both Parent Agents. An Agent will only connect to one Parent at a time, falling back to the next upon failure. These examples use the same API key between Parent Agents and for connections for Child Agents.
 
 On both Netdata Parent and all Child Agents, edit `stream.conf` by using the [edit-config](/docs/netdata-agent/configuration/README.md#edit-a-configuration-file-using-edit-config) script:
 
 #### stream.conf on Parent 1
 
-```yaml
+```text
 [stream]
     # Stream metrics to another Netdata
     enabled = yes
@@ -147,11 +146,12 @@ On both Netdata Parent and all Child Agents, edit `stream.conf` by using the [ed
 [API_KEY]
     # Accept metrics streams from Parent 2 and Child Agents
     enabled = yes
+
 ```
 
 #### stream.conf on Parent 2
 
-```yaml
+```text
 [stream]
     # Stream metrics to another Netdata
     enabled = yes
@@ -165,7 +165,7 @@ On both Netdata Parent and all Child Agents, edit `stream.conf` by using the [ed
 
 #### stream.conf on Child Agents
 
-```yaml
+```text
 [stream]
     # Stream metrics to another Netdata
     enabled = yes
@@ -193,7 +193,7 @@ We also suggest that you:
 
    For increased security, user management and access to our latest features, tools and troubleshooting solutions.
 
-2. [Change how long Netdata stores metrics](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md)
+2. [Change how long Netdata stores metrics](/src/database/README.md#modes)
 
    To control Netdata's memory use, when you have a lot of ephemeral metrics.
 

+ 1 - 1
docs/exporting-metrics/enable-an-exporting-connector.md

@@ -9,7 +9,7 @@ the OpenTSDB and Graphite connectors.
 >
 > When you enable the exporting engine and a connector, the Netdata Agent exports metrics _beginning from the time you
 > restart its process_, not the entire
-> [database of long-term metrics](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md).
+> [database of long-term metrics](/src/database/README.md).
 
 Once you understand how to enable a connector, you can apply that knowledge to any other connector.
 

+ 4 - 4
docs/glossary.md

@@ -35,7 +35,7 @@ Use the alphabetized list below to find the answer to your single-term questions
 
 - [**Cloud** or **Netdata Cloud**](/docs/netdata-cloud/README.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 alerts from all your nodes in a single web interface.
 
-- [**Collector**](/src/collectors/README.md#collector-architecture-and-terminology): A catch-all term for any Netdata process that gathers metrics from an endpoint.
+- [**Collector**](/src/collectors/README.md): A catch-all term for any Netdata process that gathers metrics from an endpoint.
 
 - [**Community**](https://community.netdata.cloud/): 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.
 
@@ -75,7 +75,7 @@ Use the alphabetized list below to find the answer to your single-term questions
 
 ## I
 
-- [**Internal plugins**](/src/collectors/README.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.
+- [**Internal plugins**](/src/collectors/README.md): These gather metrics from `/proc`, `/sys`, and other Linux kernel sources. They are written in `C` and run as threads within the Netdata daemon.
 
 ## K
 
@@ -91,7 +91,7 @@ Use the alphabetized list below to find the answer to your single-term questions
 
 - [**Metrics Exporting**](/docs/exporting-metrics/README.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.
 
-- [**Metrics Storage**](/docs/netdata-agent/configuration/optimizing-metrics-database/change-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.
+- [**Metrics Storage**](/src/database/README.md#modes): 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.
 
 - [**Metrics Streaming Replication**](/docs/observability-centralization-points/README.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).
 
@@ -111,7 +111,7 @@ metrics, troubleshoot complex performance problems, and make data interoperable
 
 - [**Obsoletion**(of nodes)](/docs/dashboards-and-charts/nodes-tab.md): Removing nodes from a space.
 
-- [**Orchestrators**](/src/collectors/README.md#collector-architecture-and-terminology): External plugins that run and manage one or more modules. They run as independent processes.
+- [**Orchestrators**](/src/collectors/README.md): External plugins that run and manage one or more modules. They run as independent processes.
 
 ## P
 

+ 1 - 1
docs/netdata-agent/configuration/common-configuration-changes.md

@@ -19,7 +19,7 @@ changes reflected in those visualizations due to the way Netdata Cloud proxies m
 
 ### Increase the long-term metrics retention period
 
-Read our doc on [increasing long-term metrics storage](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md) for details.
+Read our doc on [increasing long-term metrics storage](/src/database/README.md#tiers) for details.
 
 ## Modify alerts and notifications
 

+ 15 - 17
docs/netdata-agent/configuration/optimize-the-netdata-agents-performance.md

@@ -17,16 +17,16 @@ Netdata for production use.
 
 The following table summarizes the effect of each optimization on the CPU, RAM and Disk IO utilization in production.
 
-| Optimization                                                                                                                      | CPU                | RAM                | Disk IO            |
-|-----------------------------------------------------------------------------------------------------------------------------------|--------------------|--------------------|--------------------|
-| [Use streaming and replication](#use-streaming-and-replication)                                                                   | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
-| [Disable unneeded plugins or collectors](#disable-unneeded-plugins-or-collectors)                                                 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
-| [Reduce data collection frequency](#reduce-collection-frequency)                                                                  | :heavy_check_mark: |                    | :heavy_check_mark: |
-| [Change how long Netdata stores metrics](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md) |                    | :heavy_check_mark: | :heavy_check_mark: |
-| [Use a different metric storage database](/src/database/README.md)                                                                |                    | :heavy_check_mark: | :heavy_check_mark: |
-| [Disable machine learning](#disable-machine-learning)                                                                             | :heavy_check_mark: |                    |                    |
-| [Use a reverse proxy](#run-netdata-behind-a-proxy)                                                                                | :heavy_check_mark: |                    |                    |
-| [Disable/lower gzip compression for the Agent dashboard](#disablelower-gzip-compression-for-the-dashboard)                        | :heavy_check_mark: |                    |                    |
+| Optimization                                                                                               | CPU                | RAM                | Disk IO            |
+|------------------------------------------------------------------------------------------------------------|--------------------|--------------------|--------------------|
+| [Use streaming and replication](#use-streaming-and-replication)                                            | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| [Disable unneeded plugins or collectors](#disable-unneeded-plugins-or-collectors)                          | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
+| [Reduce data collection frequency](#reduce-collection-frequency)                                           | :heavy_check_mark: |                    | :heavy_check_mark: |
+| [Change how long Netdata stores metrics](/src/database/README.md#tiers)                                    |                    | :heavy_check_mark: | :heavy_check_mark: |
+| [Use a different metric storage database](/src/database/README.md)                                         |                    | :heavy_check_mark: | :heavy_check_mark: |
+| [Disable machine learning](#disable-machine-learning)                                                      | :heavy_check_mark: |                    |                    |
+| [Use a reverse proxy](#run-netdata-behind-a-proxy)                                                         | :heavy_check_mark: |                    |                    |
+| [Disable/lower gzip compression for the Agent dashboard](#disablelower-gzip-compression-for-the-dashboard) | :heavy_check_mark: |                    |                    |
 
 ## Resources required by a default Netdata installation
 
@@ -72,7 +72,7 @@ The memory footprint of Netdata is mainly influenced by the number of metrics co
 To estimate and control memory consumption, you can (either one or a combination of the following actions):
 
 1. [Disable unneeded plugins or collectors](#disable-unneeded-plugins-or-collectors)
-2. [Change how long Netdata stores metrics](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md)
+2. [Change how long Netdata stores metrics](/src/database/README.md#tiers)
 3. [Use a different metric storage database](/src/database/README.md).
 
 ### Disk footprint and I/O
@@ -90,7 +90,7 @@ To optimize your disk footprint in any aspect described below, you can:
 
 To configure retention, you can:
 
-1. [Change how long Netdata stores metrics](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md).
+1. [Change how long Netdata stores metrics](/src/database/README.md#tiers).
 
 To control disk I/O:
 
@@ -127,8 +127,7 @@ See [using a different metric storage database](/src/database/README.md).
 
 ## Disable unneeded plugins or collectors
 
-If you know that you don't need an [entire plugin or a specific
-collector](/src/collectors/README.md#collector-architecture-and-terminology),
+If you know that you don't need an [entire plugin or a specific collector](/src/collectors/README.md),
 you can disable any of them. Keep in mind that if a plugin/collector has nothing to do, it simply shuts down and doesn’t consume system resources. You will only improve the Agent's performance by disabling plugins/collectors that are
 actively collecting metrics.
 
@@ -191,8 +190,7 @@ every` for an individual collector is less than the global, the Netdata Agent us
 the [collectors configuration reference](/src/collectors/REFERENCE.md) for
 details.
 
-To reduce the frequency of
-an [internal_plugin/collector](/src/collectors/README.md#collector-architecture-and-terminology),
+To reduce the frequency of an [internal_plugin/collector](/src/collectors/README.md),
 open `netdata.conf` and find the appropriate section. For example, to reduce the frequency of the `apps` plugin, which
 collects and visualizes metrics on application resource utilization:
 
@@ -213,7 +211,7 @@ update_every: 10
 ## Lower memory usage for metrics retention
 
 See how
-to [change how long Netdata stores metrics](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md).
+to [change how long Netdata stores metrics](/src/database/README.md#tiers).
 
 ## Use a different metric storage database
 

+ 0 - 138
docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md

@@ -1,138 +0,0 @@
-# Change how long Netdata stores metrics
-
-Netdata offers a granular approach to data retention, allowing you to manage storage based on both **time** and **disk
-space**. This provides greater control and helps you optimize storage usage for your specific needs.
-
-**Default Retention Limits**:
-
-| Tier |     Resolution      | Time Limit | Size Limit (min 256 MB) |
-|:----:|:-------------------:|:----------:|:-----------------------:|
-|  0   |  high (per second)  |    14d     |          1 GiB          |
-|  1   | middle (per minute) |    3mo     |          1 GiB          |
-|  2   |   low (per hour)    |     2y     |          1 GiB          |
-
-> **Note**: If a user sets a disk space size less than 256 MB for a tier, Netdata will automatically adjust it to 256 MB.
-
-With these defaults, Netdata requires approximately 4 GiB of storage space (including metadata).
-
-## Retention Settings
-
-> **In a parent-child setup**, these settings manage the shared storage space used by the Netdata parent Agent for storing metrics collected by both the parent and its child nodes.
-
-You can fine-tune retention for each tier by setting a time limit or size limit. Setting a limit to 0 disables it,
-allowing for no time-based deletion for that tier or using all available space, respectively. This enables various
-retention strategies as shown in the table below:
-
-| Setting                        | Retention Behavior                                                                                                                        |
-|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
-| Size Limit = 0, Time Limit > 0 | **Time-based only:** data is stored for a specific duration regardless of disk usage.                                                     |
-| Time Limit = 0, Size Limit > 0 | **Space-based only:** data is stored until it reaches a certain amount of disk space, regardless of time.                                 |
-| Time Limit > 0, Size Limit > 0 | **Combined time and space limits:** data is deleted once it reaches either the time limit or the disk space limit, whichever comes first. |
-
-You can change these limits in `netdata.conf`:
-
-```text
-[db]
-    mode = dbengine
-    storage tiers = 3
-
-    # Tier 0, per second data. Set to 0 for no limit.
-    dbengine tier 0 retention size = 1GiB
-    dbengine tier 0 retention time = 14d
-
-    # Tier 1, per minute data. Set to 0 for no limit.
-    dbengine tier 1 retention size = 1GiB
-    dbengine tier 1 retention time = 3mo
-
-    # Tier 2, per hour data. Set to 0 for no limit.
-    dbengine tier 2 retention size = 1GiB
-    dbengine tier 2 retention time = 2y
-```
-
-## Monitoring Retention Utilization
-
-Netdata provides a visual representation of storage utilization for both time and space limits across all tiers within
-the 'dbengine retention' subsection of the 'Netdata Monitoring' section on the dashboard. This chart shows exactly how
-your storage space (disk space limits) and time (time limits) are used for metric retention.
-
-## Legacy configuration
-
-### v1.99.0 and prior
-
-Netdata prior to v2 supports the following configuration options in  `netdata.conf`.
-They have the same defaults as the latest v2, but the unit of each value is given in the option name, not at the value.
-
-```text
-storage tiers = 3
-# Tier 0, per second data. Set to 0 for no limit.
-dbengine tier 0 disk space MB = 1024
-dbengine tier 0 retention days = 14
-# Tier 1, per minute data. Set to 0 for no limit.
-dbengine tier 1 disk space MB = 1024
-dbengine tier 1 retention days = 90
-# Tier 2, per hour data. Set to 0 for no limit.
-dbengine tier 2 disk space MB = 1024
-dbengine tier 2 retention days = 730
-```
-
-### v1.45.6 and prior
-
-Netdata versions prior to v1.46.0 relied on a disk space-based retention.
-
-**Default Retention Limits**:
-
-| Tier |     Resolution      | Size Limit |
-|:----:|:-------------------:|:----------:|
-|  0   |  high (per second)  |   256 MB   |
-|  1   | middle (per minute) |   128 MB   |
-|  2   |   low (per hour)    |   64 GiB   |
-
-You can change these limits in `netdata.conf`:
-
-```text
-[db]
-    mode = dbengine
-    storage tiers = 3
-    # Tier 0, per second data
-    dbengine multihost disk space MB = 256
-    # Tier 1, per minute data
-    dbengine tier 1 multihost disk space MB = 1024
-    # Tier 2, per hour data
-    dbengine tier 2 multihost disk space MB = 1024
-```
-
-### v1.35.1 and prior
-
-These versions of the Agent do not support tiers. You could change the metric retention for the parent and
-all of its children only with the `dbengine multihost disk space MB` setting. This setting accounts the space allocation
-for the parent node and all of its children.
-
-To configure the database engine, look for the `page cache size MB` and `dbengine multihost disk space MB` settings in
-the `[db]` section of your `netdata.conf`.
-
-```text
-[db]
-    dbengine page cache size MB = 32
-    dbengine multihost disk space MB = 256
-```
-
-### v1.23.2 and prior
-
-_For Netdata Agents earlier than v1.23.2_, the Agent on the parent node uses one dbengine instance for itself, and
-another instance for every child node it receives metrics from. If you had four streaming nodes, you would have five
-instances in total (`1 parent + 4 child nodes = 5 instances`).
-
-The Agent allocates resources for each instance separately using the `dbengine disk space MB` (**deprecated**) setting.
-If `dbengine disk space MB`(**deprecated**) is set to the default `256`, each instance is given 256 MiB in disk space,
-which means the total disk space required to store all instances is,
-roughly, `256 MiB * 1 parent * 4 child nodes = 1280 MiB`.
-
-#### Backward compatibility
-
-All existing metrics belonging to child nodes are automatically converted to legacy dbengine instances and the localhost
-metrics are transferred to the multihost dbengine instance.
-
-All new child nodes are automatically transferred to the multihost dbengine instance and share its page cache and disk
-space. If you want to migrate a child node from its legacy dbengine instance to the multihost dbengine instance, you
-must delete the instance's directory, which is located in `/var/cache/netdata/MACHINE_GUID/dbengine`, after stopping the
-Agent.

+ 1 - 1
docs/netdata-agent/sizing-netdata-agents/disk-requirements-and-retention.md

@@ -36,7 +36,7 @@ gantt
 **Configuring dbengine mode and retention**:
 
 - Enable dbengine mode: The dbengine mode is already the default, so no configuration change is necessary. For reference, the dbengine mode can be configured by setting `[db].mode` to `dbengine` in `netdata.conf`.
-- Adjust retention (optional): see [Change how long Netdata stores metrics](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md).
+- Adjust retention (optional): see [Change how long Netdata stores metrics](/src/database/README.md#tiers).
 
 ## `ram`
 

+ 1 - 1
docs/netdata-agent/sizing-netdata-agents/ram-requirements.md

@@ -1,6 +1,6 @@
 # RAM Utilization
 
-Using the default [Database Tier configuration](/docs/netdata-agent/configuration/optimizing-metrics-database/change-metrics-storage.md), Netdata needs about 16KiB per unique metric collected, independently of the data collection frequency.
+Using the default [Database Tier configuration](/src/database/README.md#tiers), Netdata needs about 16KiB per unique metric collected, independently of the data collection frequency.
 
 ## Children
 

Some files were not shown because too many files changed in this diff