Project: Netdata (Observability and Analysis / Observability)
File: deployment-strategies.md

This section provides a quick overview of a few common deployment options. The next sections go into configuration examples and further reading. To help our users have a complete experience of Netdata when they install it for the first time, a Netdata Agent with default configuration is a complete monitoring solution out of the box, having all these features enabled and available. The Agent will act as a stand-alone Agent by default, and this is great to start out with for small setups and home labs. By , you can see an overview of all your nodes, with aggregated charts and centralized alerting, without setting up a Parent. An Agent connected to a Parent is called a Child. It will stream metrics to its Parent. The Parent can then take care of storing metrics on behalf of that node (with longer retention), handle metrics queries for showing dashboards, and provide alerting. When using Cloud, it is recommended that just the Parent is connected to Cloud. Child Agents can then be configured to have short retention, in RAM instead of on Disk, and have alerting and other features disabled. Because they don't need to connect to Cloud themselves, those children can then be further secured by not allowing outbound traffic. This setup allows for leaner Child nodes and is good for setups with more than a handful of nodes. Metrics data remains accessible if the Child node is temporarily unavailable or decommissioned, although there is no failover in case the Parent becomes unavailable. For high availability, Parents can be configured to stream data for their children between them, and keep the data sets in sync. Child Agents are configured with the addresses of both Parent Agents, but will only stream to one of them at a time. When that Parent becomes unavailable, it reconnects to another. When the first Parent becomes available again, that Parent will catch up by receiving the backlog from the second. With both Parent Agents connected to Cloud, Cloud will route queries to either Parent transparently, depending on their availability. Alerts trigger on either Parent will stream to Cloud, and Cloud will deduplicate and debounce state changes to prevent spurious notifications. The stand-alone setup is configured out of the box with reasonable defaults, but please consult our for details, including the overview of . For setups involving Child and Parent Agents, the Agents need to be configured for , through the configuration file `stream.conf`. This will instruct the Child to stream data to the Parent and the Parent to accept streaming connections for one or more Child Agents. To secure this connection, both need set up a shared API key (to replace the string `APIKEY` in the examples below). Additionally, the Child is configured with one or more addresses of Parent Agents (`PARENTIP_ADDRESS`). An API key is a key created with `uuidgen` and is used for authentication and/or customization in the Parent side. I.e. a Child will stream using the API key, and a Parent is configured to accept connections from Child, but can also apply different options for children by using multiple different API keys. The easiest setup uses just one API key for all Child Agents. As mentioned above, the recommendation is to not claim the Child to Cloud directly during your setup, avoiding establishing an

To reduce the footprint of the Netdata Agent on your production system, some capabilities can be switched OFF on the Child and kept ON on the Parent. In this example, Machine Learning and Alerting are disabled in 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. On the child node, edit `netdata.conf` by using the edit-config script: `/etc/netdata/edit-config netdata.conf` set the following parameters: ```yaml [db] mode = ram retention = 1200 update every = 1 [ml] enabled = no [health] enabled = no [web] bind to = lo [plugins] ``` To edit `stream.conf`, again use the edit-config script: `/etc/netdata/edit-config stream.conf`. Set the following parameters: ```yaml [stream] enabled = yes destination = PARENTIPADDRESS:19999 api key = API_KEY ``` For the Parent, besides setting up streaming, the example will also provide an example configuration of multiple of metrics , for 10 children, with about 2k metrics each. 1s granularity at tier 0 for 1 week 1m granularity at tier 1 for 1 month 1h granularity at tier 2 for 1 year Requiring: 25GB of disk 3.5GB of RAM (2.5GB under pressure) On the Parent, edit `netdata.conf` with `/etc/netdata/edit-config netdata.conf` and set the following parameters: ```yaml [db] mode = dbengine storage tiers = 3 dbengine page descriptors in file mapped memory = yes update every = 1 dbengine multihost disk space MB = 12000 dbengine page cache size MB = 1400 dbengine tier 1 page cache size MB = 512 dbengine tier 1 multihost disk space MB = 4096 dbengine tier 1 update every iterations = 60 dbengine tier 1 backfill = new dbengine tier 2 page cache size MB = 128 dbengine tier 2 multihost disk space MB = 2048 dbengine tier 2 update every iterations = 60 dbengine tier 2 backfill = new [ml] [health] [web] ``` On the Parent node, edit `stream.conf` with `/etc/netdata/edit-config stream.conf`, and then set the following parameters: ```yaml [API_KEY] enabled = yes ``` In order to setup activeactive 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. The Agent will only connect to one Parent at a time, falling back to the next if the previous failed. These examples use the same API key between Parent Agents as for connections from Child Agents. On both Netdata Parent and all Child Agents, edit `stream.conf` with `/etc/netdata/edit-config stream.conf`: ```yaml [stream] enabled = yes destination = PARENT2IP_ADDRESS:19999 api key = API_KEY [API_KEY] enabled = yes ``` ```yaml [stream] enabled = yes destination = PARENT1IP_ADDRESS:19999 api key = API_KEY [API_KEY] enabled = yes ``` ```yaml [stream] enabled = yes destination = PARENT1IPADDRESS:19999 PARENT2IPADDRESS:19999 api key = API_KEY ``` We strongly recommend the following configuration changes for production deployments: Understand Netdata's and To safeguard your infrastructure and comply with your organization's security policies. Set up to: Offload Netdata Agents running on production systems and free system resources for the production applications running on them. Isolate production systems from the rest of the world and improve security. Increase data retention. Make your data highly available. To save valuable system resources, especially when running on weak IoT devices. We also suggest that you: For increased security, user management and access to our latest tools for advanced dashboarding and troubleshooting. To control Netdata's memory use, when you have a lot of ephemeral metrics. To organize systems, metrics, and alerts.