Netdata's zero-configuration collection, storage, and visualization features work for many users, infrastructures, and use cases, but there are some situations where you might want to configure your nodes.
For example, you might want to increase metrics retention, configure a collector based on your infrastructure's unique
setup, or secure the local dashboard by restricting it to only connections from
Whatever the reason, Netdata users should know how to configure individual nodes to act decisively if an incident, anomaly, or change in infrastructure affects how their Agents should peform.
The Netdata config directory
On most Linux systems, using our recommended one-line installation, the
Netdata config directory is
/etc/netdata/. The config directory contains several configuration files with the
.conf extension, a few directories, and a shell script named
Some operating systems will use
/opt/netdata/etc/netdata/as the config directory. If you're not sure where yours is, navigate to
http://NODE:19999/netdata.confin your browser, replacing
NODEwith the IP address or hostname of your node, and find the
# config directory =setting. The value listed is the config directory for your system.
All of Netdata's documentation assumes that your config directory is at
/etc/netdata, and that you're running any
scripts from inside that directory.
Netdata's configuration files
Upon installation, the Netdata config directory contains a few files and directories.
netdata.confis the main configuration file. This is where you'll find most configuration options. This doc won't go into exhaustive detail about each setting. You can read descriptions for each in the daemon config doc.
origis a symbolic link to the directory
/usr/lib/netdata/conf.d, which contains stock configuration files. Stock versions are copied into the config directory when opened with
edit-config. Do not edit the files in
/usr/lib/netdata/conf.d, as they are overwritten by updates to the Netdata Agent.
edit-configis a shell script used for editing configuration files.
custom-plugins.d/, which are directories for each of Netdata's orchestrators. These directories can each contain additional
.conffiles for configuring specific collectors.
edit-config to edit
The recommended way to easily and safely edit Netdata's configuration is with the
edit-config script. This script
opens existing Netdata configuration files using your system's
$EDITOR. If the file doesn't yet exist in your config
directory, the script copies the stock version from
/usr/lib/netdata/conf.d and opens it for editing.
edit-config without any options to see details on its usage and a list of all the configuration files you can
./edit-config netdata.conf. You may need to elevate your privileges with
sudo or another
edit-config to write into the config directory. Use your
$EDITOR, make your changes, and save the file.
EDITORenvironment variable on your system to edit the file. On many systems, that is defaulted to
nano. To change this variable for the current session (it will revert to the default when you reboot), export a new value:
export EDITOR=nano. Or, make the change permanent.
After you make your changes, you need to restart the Agent with
service netdata restart.
Here's an example of editing the node's hostname, which appears in both the local dashboard and in Netdata Cloud.
Other configuration files
You can edit any Netdata configuration file using
edit-config. A few examples:
The documentation for each of Netdata's components explains which file(s) to edit to achieve the desired behavior.
Take advantage of this newfound understanding of node configuration to add security to your node. We have a few best practices based on how you use the Netdata Agent and Netdata Cloud.
You can also take what you've learned about node configuration to tweak the Agent's behavior or enable new features: