cheatsheet.mdx 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. ---
  2. title: "'Netdata management and configuration cheatsheet'"
  3. description: "'Connecting an Agent to the Cloud allows a Netdata Agent, running on a distributed node, to securely connect to Netdata Cloud via the encrypted Agent-Cloud link (ACLK).'"
  4. image: "/cheatsheet/cheatsheet-meta.png"
  5. sidebar_label: "Cheatsheet"
  6. custom_edit_url: "https://github.com/netdata/netdata/blob/master/docs/cloud/cheatsheet.mdx"
  7. part_of_learn: "True"
  8. learn_status: "Published"
  9. learn_topic_type: "Getting started"
  10. learn_rel_path: "Getting started"
  11. ---
  12. import {
  13. OneLineInstallWget,
  14. OneLineInstallCurl,
  15. } from '@site/src/components/OneLineInstall/';
  16. Use our management & configuration cheatsheet to simplify your interactions with Netdata, including configuration,
  17. using charts, managing the daemon, and more.
  18. ## Install Netdata
  19. #### Install Netdata
  20. <OneLineInstallWget />
  21. Or, if you have cURL but not wget (such as on macOS):
  22. <OneLineInstallCurl />
  23. #### Claim a node to Netdata Cloud
  24. 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.
  25. ## Metrics collection & retention
  26. You can tweak your settings in the netdata.conf file.
  27. 📄 [Find your netdata.conf file](https://learn.netdata.cloud/guides/step-by-step/step-04#find-your-netdataconf-file)
  28. Open a new terminal and navigate to the netdata.conf file. Use the edit-config script to make changes: `sudo ./edit-config netdata.conf`
  29. The most popular settings to change are:
  30. #### Increase metrics retention (4GiB)
  31. ```
  32. sudo ./edit-config netdata.conf
  33. ```
  34. ```
  35. [global]
  36. dbengine multihost disk space = 4096
  37. ```
  38. #### Reduce the collection frequency (every 5 seconds)
  39. ```
  40. sudo ./edit-config netdata.conf
  41. ```
  42. ```
  43. [global]
  44. update every = 5
  45. ```
  46. #### Enable/disable plugins (groups of collectors)
  47. ```
  48. sudo ./edit-config netdata.conf
  49. ```
  50. ```
  51. [plugins]
  52. go.d = yes # enabled
  53. node.d = no # disabled
  54. ```
  55. #### Enable/disable specific collectors
  56. ```
  57. sudo ./edit-config go.d.conf
  58. ```
  59. > `Or python.d.conf, node.d.conf, edbpf.conf, and so on`.
  60. ```
  61. modules:
  62. activemq: no # disabled
  63. bind: no # disabled
  64. cockroachdb: yes # enabled
  65. ```
  66. #### Edit a collector's config (example)
  67. ```
  68. $ sudo ./edit-config go.d/mysql.conf
  69. $ sudo ./edit-config ebpf.conf
  70. $ sudo ./edit-config python.d/anomalies.conf
  71. ```
  72. ## Configuration
  73. #### The Netdata config directory: `/etc/netdata`
  74. > If you don't have such a directory:
  75. > 📄 [Find your netdata.conf file](https://learn.netdata.cloud/guides/step-by-step/step-04#find-your-netdataconf-file)
  76. > The cheatsheet assumes you’re running all commands from within the Netdata config directory!
  77. #### Edit Netdata's main config file: `$ sudo ./edit-config netdata.conf`
  78. #### Edit Netdata's other config files (examples):
  79. - `$ sudo ./edit-config apps_groups.conf`
  80. - `$ sudo ./edit-config ebpf.conf`
  81. - `$ sudo ./edit-config health.d/load.conf`
  82. - `$ sudo ./edit-config go.d/prometheus.conf`
  83. #### View the running Netdata configuration: `http://NODE:19999/netdata.conf`
  84. > Replace `NODE` with the IP address or hostname of your node. Often `localhost`.
  85. ## Alarms & notifications
  86. #### Add a new alarm
  87. ```
  88. sudo touch health.d/example-alarm.conf
  89. sudo ./edit-config health.d/example-alarm.conf
  90. ```
  91. #### Configure a specific alarm
  92. ```
  93. sudo ./edit-config health.d/example-alarm.conf
  94. ```
  95. #### Silence a specific alarm
  96. ```
  97. sudo ./edit-config health.d/example-alarm.conf
  98. to: silent
  99. ```
  100. #### Disable alarms and notifications
  101. ```
  102. [health]
  103. enabled = no
  104. ```
  105. > After any change, reload the Netdata health configuration
  106. ```
  107. netdatacli reload-health
  108. ```
  109. or if that command doesn't work on your installation, use:
  110. ```
  111. killall -USR2 netdata
  112. ```
  113. ## Manage the daemon
  114. | Intent | Action |
  115. | :-------------------------- | --------------------------------------------------------------------: |
  116. | Start Netdata | `$ sudo systemctl start netdata` |
  117. | Stop Netdata | `$ sudo systemctl stop netdata` |
  118. | Restart Netdata | `$ sudo systemctl restart netdata` |
  119. | Reload health configuration | `$ sudo netdatacli reload-health` <br></br> `$ killall -USR2 netdata` |
  120. | View error logs | `less /var/log/netdata/error.log` |
  121. ## See metrics and dashboards
  122. #### Netdata Cloud: `https://app.netdata.cloud`
  123. #### Local dashboard: `https://NODE:19999`
  124. > Replace `NODE` with the IP address or hostname of your node. Often `localhost`.
  125. #### Access the Netdata API: `http://NODE:19999/api/v1/info`
  126. ## Interact with charts
  127. | Intent | Action |
  128. | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
  129. | Stop a chart from updating | `click` |
  130. | Zoom | **Cloud** <br/> use the `zoom in` and `zoom out` buttons on any chart (upper right corner) <br/><br/> **Agent**<br/>`SHIFT` or `ALT` + `mouse scrollwheel` <br/> `SHIFT` or `ALT` + `two-finger pinch` (touchscreen) <br/> `SHIFT` or `ALT` + `two-finger scroll` (touchscreen) |
  131. | 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` |
  132. | Pan forward or back in time | `click` & `drag` <br/> `touch` & `drag` (touchpad/touchscreen) |
  133. | Select a certain timeframe | `ALT` + `mouse selection` <br/> WIP need to evaluate this `command?` + `mouse selection` (macOS) |
  134. | Reset to default auto refreshing state | `double click` |
  135. ## Dashboards
  136. #### Disable the local dashboard
  137. Use the `edit-config` script to edit the `netdata.conf` file.
  138. ```
  139. [web]
  140. mode = none
  141. ```
  142. #### Change the port Netdata listens to (port 39999)
  143. ```
  144. [web]
  145. default port = 39999
  146. ```
  147. #### Opt out from anonymous statistics
  148. ```
  149. sudo touch .opt-out-from-anonymous-statistics
  150. ```
  151. ## Understanding the dashboard
  152. **Charts**: A visualization displaying one or more collected/calculated metrics in a time series. Charts are generated
  153. by collectors.
  154. **Dimensions**: Any value shown on a chart, which can be raw or calculated values, such as percentages, averages,
  155. minimums, maximums, and more.
  156. **Families**: One instance of a monitored hardware or software resource that needs to be monitored and displayed
  157. separately from similar instances. Example, disks named
  158. **sda**, **sdb**, **sdc**, and so on.
  159. **Contexts**: A grouping of charts based on the types of metrics collected and visualized.
  160. **disk.io**, **disk.ops**, and **disk.backlog** are all contexts.