@cryptotaxi247 / netdata-1 / commits / e24c40dcb

Optimize the cheat sheet to be in a printable form factor (#14903)

* initial optimization for printable cheat sheet * add one more line break * add some useful links in the introduction dropdown * Apply suggestions from code review Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud> * updates from code review * Update cheatsheet.md * updates from code review * remove printing elements, change the name of the page and add a description --------- Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud>

Fotis Voutsas committed Apr 20, 2023 at 19:02 UTC e24c40dcbfbdebe6db40605451b4d862f0703ca5
1 file changed +82 -88
docs/cloud/cheatsheet.md
+82 -88
@@ -1,26 +1,40 @@
1 -# Management and configuration cheatsheet
1 +# Useful management and configuration actions
2
3 -import {
4 - OneLineInstallWget,
5 - OneLineInstallCurl,
6 -} from '@site/src/components/OneLineInstall/';
3 +Below you will find some of the most common actions that one can take while using Netdata. You can use this page as a quick reference for installing Netdata, connecting a node to the Cloud, properly editing the configuration, accessing Netdata's API, and more!
4
8 -Use our management &amp; configuration cheatsheet to simplify your interactions with Netdata, including configuration,
9 -using charts, managing the daemon, and more.
5 +### Install Netdata
6
11 -## Install Netdata
7 +```bash
8 +wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh
9
13 -#### Install Netdata
10 +# Or, if you have cURL but not wget (such as on macOS):
11 +curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh
12 +```
13 +
14 +#### Connect a node to Netdata Cloud
15 +
16 +To do so, sign in to Netdata Cloud, on your Space under the Nodes tab, click `Add Nodes` and paste the provided command into your node’s terminal and run it.
17 +You can also copy the Claim token and pass it to the installation script with `--claim-token` and re-run it.
18
15 -<OneLineInstallWget />
19 +### Configuration
20
17 -Or, if you have cURL but not wget (such as on macOS):
21 +**Netdata's config directory** is `/etc/netdata/` but in some operating systems it might be `/opt/netdata/etc/netdata/`.
22 +Look for the `# config directory =` line over at `http://NODE_IP:19999/netdata.conf` to find your config directory.
23
19 -<OneLineInstallCurl />
24 +From within that directory you can run `sudo ./edit-config netdata.conf` **to edit Netdata's configuration.**
25 +You can edit other config files too, by specifying their filename after `./edit-config`.
26 +You are expected to use this method in all following configuration changes.
27
21 -#### Claim a node to Netdata Cloud
28 +<!-- #### Edit Netdata's other config files (examples):
29
23 -To do so, sign in to Netdata Cloud, click the `Claim Nodes` button, choose the `War Rooms` to add nodes to, then click `Copy` to copy the full script to your clipboard. Paste that into your node’s terminal and run it.
30 +- `$ sudo ./edit-config apps_groups.conf`
31 +- `$ sudo ./edit-config ebpf.conf`
32 +- `$ sudo ./edit-config health.d/load.conf`
33 +- `$ sudo ./edit-config go.d/prometheus.conf`
34 +
35 +#### View the running Netdata configuration: `http://NODE:19999/netdata.conf`
36 +
37 +> Replace `NODE` with the IP address or hostname of your node. Often `localhost`.
38
39 ## Metrics collection & retention
40
@@ -51,15 +65,17 @@ sudo ./edit-config netdata.conf
65 ```
66 [global]
67 update every = 5
54 -```
68 +``` -->
69 +
70 +---
71
72 #### Enable/disable plugins (groups of collectors)
73
58 -```
74 +```bash
75 sudo ./edit-config netdata.conf
76 ```
77
62 -```
78 +```conf
79 [plugins]
80 go.d = yes # enabled
81 node.d = no # disabled
@@ -67,100 +83,82 @@ sudo ./edit-config netdata.conf
83
84 #### Enable/disable specific collectors
85
86 +```bash
87 +sudo ./edit-config go.d.conf # edit a plugin's config
88 ```
71 -sudo ./edit-config go.d.conf
72 -```
73 -
74 -> `Or python.d.conf, node.d.conf, edbpf.conf, and so on`.
89
76 -```
90 +```yaml
91 modules:
92 activemq: no # disabled
79 - bind: no # disabled
93 cockroachdb: yes # enabled
94 ```
95
83 -#### Edit a collector's config (example)
96 +#### Edit a collector's config
97
98 +```bash
99 +sudo ./edit-config go.d/mysql.conf
100 ```
86 -$ sudo ./edit-config go.d/mysql.conf
87 -$ sudo ./edit-config ebpf.conf
88 -$ sudo ./edit-config python.d/anomalies.conf
89 -```
90 -
91 -## Configuration
92 -
93 -#### The Netdata config directory: `/etc/netdata`
94 -
95 -> If you don't have such a directory:
96 -> 📄 [Find your netdata.conf file](https://github.com/netdata/netdata/blob/master/daemon/config/README.md)
97 -> The cheatsheet assumes you’re running all commands from within the Netdata config directory!
98 -
99 -#### Edit Netdata's main config file: `$ sudo ./edit-config netdata.conf`
100 -
101 -#### Edit Netdata's other config files (examples):
102 -
103 -- `$ sudo ./edit-config apps_groups.conf`
104 -- `$ sudo ./edit-config ebpf.conf`
105 -- `$ sudo ./edit-config health.d/load.conf`
106 -- `$ sudo ./edit-config go.d/prometheus.conf`
107 -
108 -#### View the running Netdata configuration: `http://NODE:19999/netdata.conf`
109 -
110 -> Replace `NODE` with the IP address or hostname of your node. Often `localhost`.
101
112 -## Alarms & notifications
102 +### Alarms & notifications
103
114 -#### Add a new alarm
104 +<!-- #### Add a new alarm
105
106 ```
107 sudo touch health.d/example-alarm.conf
108 sudo ./edit-config health.d/example-alarm.conf
109 +``` -->
110 +After any change, reload the Netdata health configuration:
111 +
112 +```bash
113 +netdatacli reload-health
114 +#or if that command doesn't work on your installation, use:
115 +killall -USR2 netdata
116 ```
117
118 #### Configure a specific alarm
119
123 -```
120 +```bash
121 sudo ./edit-config health.d/example-alarm.conf
122 ```
123
124 #### Silence a specific alarm
125
129 -```
126 +```bash
127 sudo ./edit-config health.d/example-alarm.conf
131 - to: silent
128 ```
129
134 -#### Disable alarms and notifications
135 -
130 ```
137 -[health]
138 - enabled = no
131 + to: silent
132 ```
133
141 -> After any change, reload the Netdata health configuration
142 -
143 -```
144 -netdatacli reload-health
145 -```
134 +<!-- #### Disable alarms and notifications
135
147 -or if that command doesn't work on your installation, use:
136 +```conf
137 +[health]
138 + enabled = no
139 +``` -->
140
149 -```
150 -killall -USR2 netdata
151 -```
141 +---
142
153 -## Manage the daemon
143 +### Manage the daemon
144
145 | Intent | Action |
146 | :-------------------------- | --------------------------------------------------------------------: |
157 -| Start Netdata | `$ sudo systemctl start netdata` |
158 -| Stop Netdata | `$ sudo systemctl stop netdata` |
159 -| Restart Netdata | `$ sudo systemctl restart netdata` |
160 -| Reload health configuration | `$ sudo netdatacli reload-health` <br></br> `$ killall -USR2 netdata` |
147 +| Start Netdata | `$ sudo service netdata start` |
148 +| Stop Netdata | `$ sudo service netdata stop` |
149 +| Restart Netdata | `$ sudo service netdata restart` |
150 +| Reload health configuration | `$ sudo netdatacli reload-health` `$ killall -USR2 netdata` |
151 | View error logs | `less /var/log/netdata/error.log` |
152 +| View collectors logs | `less /var/log/netdata/collector.log` |
153 +
154 +#### Change the port Netdata listens to (example, set it to port 39999)
155 +
156 +```conf
157 +[web]
158 +default port = 39999
159 +```
160
163 -## See metrics and dashboards
161 +### See metrics and dashboards
162
163 #### Netdata Cloud: `https://app.netdata.cloud`
164
@@ -168,8 +166,11 @@ killall -USR2 netdata
166
167 > Replace `NODE` with the IP address or hostname of your node. Often `localhost`.
168
171 -#### Access the Netdata API: `http://NODE:19999/api/v1/info`
169 +### Access the Netdata API
170
171 +You can access the API like this: `http://NODE:19999/api/VERSION/REQUEST`.
172 +If you want to take a look at all the API requests, check our API page at <https://learn.netdata.cloud/api>
173 +<!--
174 ## Interact with charts
175
176 | Intent | Action |
@@ -179,9 +180,9 @@ killall -USR2 netdata
180 | Zoom to a specific timeframe | **Cloud**<br/>use the `select and zoom` button on any chart and then do a `mouse selection` <br/><br/> **Agent**<br/>`SHIFT` + `mouse selection` |
181 | Pan forward or back in time | `click` & `drag` <br/> `touch` & `drag` (touchpad/touchscreen) |
182 | Select a certain timeframe | `ALT` + `mouse selection` <br/> WIP need to evaluate this `command?` + `mouse selection` (macOS) |
182 -| Reset to default auto refreshing state | `double click` |
183 +| Reset to default auto refreshing state | `double click` | -->
184
184 -## Dashboards
185 +<!-- ## Dashboards
186
187 #### Disable the local dashboard
188
@@ -190,22 +191,15 @@ Use the `edit-config` script to edit the `netdata.conf` file.
191 ```
192 [web]
193 mode = none
193 -```
194 -
195 -#### Change the port Netdata listens to (port 39999)
196 -
197 -```
198 -[web]
199 -default port = 39999
200 -```
194 +``` -->
195
202 -#### Opt out from anonymous statistics
196 +<!-- #### Opt out from anonymous statistics
197
198 ```
199 sudo touch .opt-out-from-anonymous-statistics
206 -```
200 +``` -->
201
208 -## Understanding the dashboard
202 +<!-- ## Understanding the dashboard
203
204 **Charts**: A visualization displaying one or more collected/calculated metrics in a time series. Charts are generated
205 by collectors.
@@ -218,4 +212,4 @@ separately from similar instances. Example, disks named
212 **sda**, **sdb**, **sdc**, and so on.
213
214 **Contexts**: A grouping of charts based on the types of metrics collected and visualized.
221 -**disk.io**, **disk.ops**, and **disk.backlog** are all contexts.
215 +**disk.io**, **disk.ops**, and **disk.backlog** are all contexts. -->