From 36a2237b4a0c5a0bce06c8d848a8800622f01216 Mon Sep 17 00:00:00 2001 From: Chris Akritidis <43294513+cakrit@users.noreply.github.com> Date: Fri, 17 Mar 2023 06:42:02 -0700 Subject: Update edit-config documentation (#14749) * Update edit-config documentation * Update docs/configure/nodes.md * Update docs/configure/nodes.md * Apply suggestions from code review * Update docs/configure/nodes.md --- docs/configure/nodes.md | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) (limited to 'docs') diff --git a/docs/configure/nodes.md b/docs/configure/nodes.md index 4454a1fea4..0f31715ae8 100644 --- a/docs/configure/nodes.md +++ b/docs/configure/nodes.md @@ -1,14 +1,3 @@ - - # Configure the Netdata Agent Netdata's zero-configuration collection, storage, and visualization features work for many users, infrastructures, and @@ -74,31 +63,32 @@ See [configure agent containers](https://github.com/netdata/netdata/blob/master/ 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. +directory, the script copies the stock version from `/usr/lib/netdata/conf.d` (or wherever the symlink `orig` under the config directory leads to) +to the proper place in the config directory and opens the copy for editing. + +If you have trouble running the script, you can manually copy the file and edit the copy. + +e.g. `cp /usr/lib/netdata/conf.d/go.d/bind.conf /etc/netdata/go.d/bind.conf; vi /etc/netdata/go.d/bind.conf` -Run `edit-config` without any options to see details on its usage and a list of all the configuration files you can -edit. +Run `edit-config` without options, to see details on its usage, or `edit-config --list` to see a list of all the configuration +files you can edit. ```bash -./edit-config USAGE: - ./edit-config FILENAME + ./edit-config [options] FILENAME Copy and edit the stock config file named: FILENAME if FILENAME is already copied, it will be edited as-is. - The EDITOR shell variable is used to define the editor to be used. - - Stock config files at: '/usr/lib/netdata/conf.d' + Stock config files at: '/etc/netdata/../../usr/lib/netdata/conf.d' User config files at: '/etc/netdata' - Available files in '/usr/lib/netdata/conf.d' to copy and edit: + The editor to use can be specified either by setting the EDITOR + environment variable, or by using the --editor option. + + The file to edit can also be specified using the --file option. -./apps_groups.conf ./health.d/phpfpm.conf -./aws_kinesis.conf ./health.d/pihole.conf -./charts.d/ap.conf ./health.d/portcheck.conf -./charts.d/apcupsd.conf ./health.d/postgres.conf -... + For a list of known config files, run './edit-config --list' ``` To edit `netdata.conf`, run `./edit-config netdata.conf`. You may need to elevate your privileges with `sudo` or another -- cgit v1.2.3