@cryptotaxi247 / netdata-1 / commits / 36a2237b4

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

Chris Akritidis committed Mar 17, 2023 at 06:42 UTC 36a2237b4a0c5a0bce06c8d848a8800622f01216
1 file changed +15 -25
docs/configure/nodes.md
+15 -25
@@ -1,14 +1,3 @@
1 -<!--
2 -title: "Configure the Netdata Agent"
3 -description: "Netdata is zero-configuration for most users, but complex infrastructures may require you to tweak some of the Agent's granular settings."
4 -custom_edit_url: "https://github.com/netdata/netdata/edit/master/docs/configure/nodes.md"
5 -sidebar_label: "Configuration"
6 -learn_status: "Published"
7 -learn_topic_type: "Tasks"
8 -learn_rel_path: "Configuration"
9 -sidebar_position: 30
10 --->
11 -
1 # Configure the Netdata Agent
2
3 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/
63
64 The **recommended way to easily and safely edit Netdata's configuration** is with the `edit-config` script. This script
65 opens existing Netdata configuration files using your system's `$EDITOR`. If the file doesn't yet exist in your config
77 -directory, the script copies the stock version from `/usr/lib/netdata/conf.d` and opens it for editing.
66 +directory, the script copies the stock version from `/usr/lib/netdata/conf.d` (or wherever the symlink `orig` under the config directory leads to)
67 +to the proper place in the config directory and opens the copy for editing.
68 +
69 +If you have trouble running the script, you can manually copy the file and edit the copy.
70 +
71 +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`
72
79 -Run `edit-config` without any options to see details on its usage and a list of all the configuration files you can
80 -edit.
73 +Run `edit-config` without options, to see details on its usage, or `edit-config --list` to see a list of all the configuration
74 +files you can edit.
75
76 ```bash
83 -./edit-config
77 USAGE:
85 - ./edit-config FILENAME
78 + ./edit-config [options] FILENAME
79
80 Copy and edit the stock config file named: FILENAME
81 if FILENAME is already copied, it will be edited as-is.
82
90 - The EDITOR shell variable is used to define the editor to be used.
91 -
92 - Stock config files at: '/usr/lib/netdata/conf.d'
83 + Stock config files at: '/etc/netdata/../../usr/lib/netdata/conf.d'
84 User config files at: '/etc/netdata'
85
95 - Available files in '/usr/lib/netdata/conf.d' to copy and edit:
86 + The editor to use can be specified either by setting the EDITOR
87 + environment variable, or by using the --editor option.
88 +
89 + The file to edit can also be specified using the --file option.
90
97 -./apps_groups.conf ./health.d/phpfpm.conf
98 -./aws_kinesis.conf ./health.d/pihole.conf
99 -./charts.d/ap.conf ./health.d/portcheck.conf
100 -./charts.d/apcupsd.conf ./health.d/postgres.conf
101 -...
91 + For a list of known config files, run './edit-config --list'
92 ```
93
94 To edit `netdata.conf`, run `./edit-config netdata.conf`. You may need to elevate your privileges with `sudo` or another