Fix variety of linter errors across docs (#7944)
* Fixes for database/readme.md * Fixes for registry/readme.md * Fixes for daemon/readme.md * Fixes for database/engine/readme.md * Fixes for registry/readme.md * Fix for cli/readme.md * Fixes on docs/a-github-star-is-important.md * A few more documents
Joel Hans committed
Feb 8, 2020 at 16:36 UTC
666101a213d9f0036a0b9a5d84fcada5618dd66a
9 files changed
+272
-153
cli/README.md
+1
-1
@@ -23,6 +23,6 @@ reload-claiming-state
23
Reload agent claiming state from disk.
24
```
25
26
-Those commands are the same that can be sent to netdata via [signals](../daemon#command-line-options).
26
+Those commands are the same that can be sent to netdata via [signals](../daemon/README.md#command-line-options).
27
28
[](<>)
daemon/README.md
+7
-7
@@ -307,14 +307,14 @@ You can set Netdata scheduling policy in `netdata.conf`, like this:
307
308
You can use the following:
309
310
-| policy | description |
311
-|:----:|:----------|
312
-| `idle` | use CPU only when there is spare - this is lower than nice 19 - it is the default for Netdata and it is so low that Netdata will run in "slow motion" under extreme system load, resulting in short (1-2 seconds) gaps at the charts. |
313
-| `other`<br/>or<br/>`nice` | this is the default policy for all processes under Linux. It provides dynamic priorities based on the `nice` level of each process. Check below for setting this `nice` level for netdata. |
310
+| policy | description |
311
+| :-----------------------: | :---------- |
312
+| `idle` | use CPU only when there is spare - this is lower than nice 19 - it is the default for Netdata and it is so low that Netdata will run in "slow motion" under extreme system load, resulting in short (1-2 seconds) gaps at the charts. |
313
+| `other`<br/>or<br/>`nice` | this is the default policy for all processes under Linux. It provides dynamic priorities based on the `nice` level of each process. Check below for setting this `nice` level for netdata. |
314
| `batch` | This policy is similar to `other` in that it schedules the thread according to its dynamic priority (based on the `nice` value). The difference is that this policy will cause the scheduler to always assume that the thread is CPU-intensive. Consequently, the scheduler will apply a small scheduling penalty with respect to wake-up behavior, so that this thread is mildly disfavored in scheduling decisions. |
315
-| `fifo` | `fifo` can be used only with static priorities higher than 0, which means that when a `fifo` threads becomes runnable, it will always immediately preempt any currently running `other`, `batch`, or `idle` thread. `fifo` is a simple scheduling algorithm without time slicing. |
316
-| `rr` | a simple enhancement of `fifo`. Everything described above for `fifo` also applies to `rr`, except that each thread is allowed to run only for a maximum time quantum. |
317
-| `keep`<br/>or<br/>`none` | do not set scheduling policy, priority or nice level - i.e. keep running with whatever it is set already (e.g. by systemd). |
315
+| `fifo` | `fifo` can be used only with static priorities higher than 0, which means that when a `fifo` threads becomes runnable, it will always immediately preempt any currently running `other`, `batch`, or `idle` thread. `fifo` is a simple scheduling algorithm without time slicing. |
316
+| `rr` | a simple enhancement of `fifo`. Everything described above for `fifo` also applies to `rr`, except that each thread is allowed to run only for a maximum time quantum. |
317
+| `keep`<br/>or<br/>`none` | do not set scheduling policy, priority or nice level - i.e. keep running with whatever it is set already (e.g. by systemd). |
318
319
For more information see `man sched`.
320
database/README.md
+1
-1
@@ -226,4 +226,4 @@ Netdata will create charts for kernel memory de-duplication performance, like th
226
227

228
229
-[](<>)
\ No newline at end of file
229
+[](<>)
database/engine/README.md
+4
-4
@@ -170,10 +170,10 @@ so as to avoid all disk bottlenecks.
170
The reported numbers are the following:
171
172
| device | page cache | dataset | reads/sec | writes/sec |
173
-| :---: | :---: | ---: | ---: | ---: |
174
-| HDD | 64 MiB | 4.1 GiB | 813K | 18.0M |
175
-| SSD | 64 MiB | 9.8 GiB | 1.7M | 43.0M |
176
-| N/A | 16 GiB | 6.8 GiB |118.2M | 30.2M |
173
+| :----: | :--------: | ------: | --------: | ---------: |
174
+| HDD | 64 MiB | 4.1 GiB | 813K | 18.0M |
175
+| SSD | 64 MiB | 9.8 GiB | 1.7M | 43.0M |
176
+| N/A | 16 GiB | 6.8 GiB | 118.2M | 30.2M |
177
178
where "reads/sec" is the number of metric data points being read from the database via its API per second and
179
"writes/sec" is the number of metric data points being written to the database per second.
docs/a-github-star-is-important.md
+7
-3
@@ -1,10 +1,14 @@
1
# A GitHub star is important
2
3
-**GitHub stars** allow Netdata to expand its reach, its community, especially attract people with skills willing to contribute to it.
3
+**GitHub stars** allow Netdata to expand its reach, its community, especially attract people with skills willing to
4
+contribute to it.
5
5
-Compared to its first release, Netdata is now **twice as fast**, has all its bugs settled and a lot more functionality. This happened because a lot of people find it useful, use it daily at home and work, **rely on it** and **contribute to it**.
6
+Compared to its first release, Netdata is now **twice as fast**, has all its bugs settled and a lot more functionality.
7
+This happened because a lot of people find it useful, use it daily at home and work, **rely on it** and **contribute to
8
+it**.
9
7
-**GitHub stars** also **motivate** us. They state that you find our work **useful**. They give us strength to continue, to work **harder** to make it even **better**.
10
+**GitHub stars** also **motivate** us. They state that you find our work **useful**. They give us strength to continue,
11
+to work **harder** to make it even **better**.
12
13
So, give Netdata a **GitHub star**, at the top right of this page.
14
docs/configuration-guide.md
+111
-62
@@ -1,26 +1,40 @@
1
# Configuration guide
2
3
-No configuration is required to run Netdata, but you will find plenty of options to tweak, so that you can adapt it to your particular needs.
3
+No configuration is required to run Netdata, but you will find plenty of options to tweak, so that you can adapt it to
4
+your particular needs.
5
6
<details markdown="1"><summary>Configuration files are placed in `/etc/netdata`.</summary>
7
Depending on your installation method, Netdata will have been installed either directly under `/`, or under `/opt/netdata`. The paths mentioned here and in the documentation in general assume that your installation is under `/`. If it is not, you will find the exact same paths under `/opt/netdata` as well. (i.e. `/etc/netdata` will be `/opt/netdata/etc/netdata`).</details>
8
9
Under that directory you will see the following:
10
10
-- `netdata.conf` is [the main configuration file](../daemon/config/#daemon-configuration)
11
-- `edit-config` is an sh script that you can use to easily and safely edit the configuration. Just run it to see its usage.
12
-- Other directories, initially empty, where your custom configurations for alarms and collector plugins/modules will be copied from the stock configuration, if and when you customize them using `edit-config`.
13
-- `orig` is a symbolic link to the directory `/usr/lib/netdata/conf.d`, which contains the stock configurations for everything not included in `netdata.conf`:
14
- - `health_alarm_notify.conf` is where you configure how and to who Netdata will send [alarm notifications](../health/notifications/#netdata-alarm-notifications).
15
- - `health.d` is the directory that contains the alarm triggers for [health monitoring](../health/#health-monitoring). It contains one .conf file per collector.
16
- - The [modular plugin orchestrators](../collectors/plugins.d/#external-plugins-overview) have:
17
- - One config file each, mainly to turn their modules on and off: `python.d.conf` for [python](../collectors/python.d.plugin/#pythondplugin), `node.d.conf` for [nodejs](../collectors/node.d.plugin/#nodedplugin) and `charts.d.conf` for [bash](../collectors/charts.d.plugin/#chartsdplugin) modules.
11
+- `netdata.conf` is [the main configuration file](../daemon/config/README.md#daemon-configuration)
12
+- `edit-config` is an sh script that you can use to easily and safely edit the configuration. Just run it to see its
13
+ usage.
14
+- Other directories, initially empty, where your custom configurations for alarms and collector plugins/modules will
15
+ be copied from the stock configuration, if and when you customize them using `edit-config`.
16
+- `orig` is a symbolic link to the directory `/usr/lib/netdata/conf.d`, which contains the stock configurations for
17
+ everything not included in `netdata.conf`:
18
+ - `health_alarm_notify.conf` is where you configure how and to who Netdata will send [alarm
19
+ notifications](../health/notifications/README.md#netdata-alarm-notifications).
20
+ - `health.d` is the directory that contains the alarm triggers for [health
21
+ monitoring](../health/README.md#health-monitoring). It contains one .conf file per collector.
22
+ - The [modular plugin orchestrators](../collectors/plugins.d/README.md#external-plugins-overview) have:
23
+ - One config file each, mainly to turn their modules on and off: `python.d.conf` for
24
+ [python](../collectors/python.d.plugin/README.md#pythondplugin), `node.d.conf` for
25
+ [nodejs](../collectors/node.d.plugin/README.md#nodedplugin) and `charts.d.conf` for
26
+ [bash](../collectors/charts.d.plugin/README.md#chartsdplugin) modules.
27
- One directory each, where the module-specific configuration files can be found.
19
- - `stream.conf` is where you configure [streaming and replication](../streaming/#streaming-and-replication)
20
- - `stats.d` is a directory under which you can add .conf files to add [synthetic charts](../collectors/statsd.plugin/#synthetic-statsd-charts).
21
- - Individual collector plugin config files, such as `fping.conf` for the [fping plugin](../collectors/fping.plugin/) and `apps_groups.conf` for the [apps plugin](../collectors/apps.plugin/)
28
+ - `stream.conf` is where you configure [streaming and
29
+ replication](../streaming/README.md#streaming-and-replication)
30
+ - `stats.d` is a directory under which you can add .conf files to add [synthetic
31
+ charts](../collectors/statsd.plugin/README.md#synthetic-statsd-charts).
32
+ - Individual collector plugin config files, such as `fping.conf` for the [fping
33
+ plugin](../collectors/fping.plugin/) and `apps_groups.conf` for the [apps plugin](../collectors/apps.plugin/)
34
23
-So there are many configuration files to control every aspect of Netdata's behavior. It can be overwhelming at first, but you won't have to deal with any of them, unless you have specific things you need to change. The following HOWTO will guide you on how to customize your Netdata, based on what you want to do.
35
+So there are many configuration files to control every aspect of Netdata's behavior. It can be overwhelming at first,
36
+but you won't have to deal with any of them, unless you have specific things you need to change. The following HOWTO
37
+will guide you on how to customize your Netdata, based on what you want to do.
38
39
## How to
40
@@ -33,100 +47,135 @@ In <http://localhost:19999/netdata.conf>, you will see the following two paramet
47
# stock config directory = /usr/lib/netdata/conf.d
48
```
49
36
-To persist your configurations, don't edit the files under the `stock config directory` directly. Use the `sudo [config directory]/edit-config` command, or copy the stock config file to its proper place under the `config directory` and edit it there.
50
+To persist your configurations, don't edit the files under the `stock config directory` directly. Use the `sudo [config
51
+directory]/edit-config` command, or copy the stock config file to its proper place under the `config directory` and edit
52
+it there.
53
54
### Change what I see
55
40
-##### Increase the metrics retention period
56
+#### Increase the metrics retention period
57
42
-Increase `history` in [netdata.conf \[global\]](../daemon/config/#global-section-options). Just ensure you understand [how much memory will be required](../database/)
58
+Increase `history` in [netdata.conf \[global\]](../daemon/config/README.md#global-section-options). Just ensure you
59
+understand [how much memory will be required](../database/).
60
44
-##### Reduce the data collection frequency
61
+#### Reduce the data collection frequency
62
46
-Increase `update every` in [netdata.conf \[global\]](../daemon/config/#global-section-options). This is another way to increase your metrics retention period, but at a lower resolution than the default 1s.
63
+Increase `update every` in [netdata.conf \[global\]](../daemon/config/README.md#global-section-options). This is another
64
+way to increase your metrics retention period, but at a lower resolution than the default 1s.
65
48
-##### Modify how a chart is displayed
66
+#### Modify how a chart is displayed
67
50
-In `netdata.conf` under `# Per chart configuration` you will find several [\[CHART_NAME\] sections](../daemon/config/#per-chart-configuration), where you can control all aspects of a specific chart.
68
+In `netdata.conf` under `# Per chart configuration` you will find several [\[CHART_NAME\]
69
+sections](../daemon/config/README.md#per-chart-configuration), where you can control all aspects of a specific chart.
70
52
-##### Disable a collector
71
+#### Disable a collector
72
54
-Entire plugins can be turned off from the [netdata.conf \[plugins\]](../daemon/config/#plugins-section-options) section. To disable specific modules of a plugin orchestrator, you need to edit one of the following:
73
+Entire plugins can be turned off from the [netdata.conf \[plugins\]](../daemon/config/README.md#plugins-section-options)
74
+section. To disable specific modules of a plugin orchestrator, you need to edit one of the following:
75
56
-- `python.d.conf` for [python](../collectors/python.d.plugin/#pythondplugin)
57
-- `node.d.conf` for [nodejs](../collectors/node.d.plugin/#nodedplugin)
58
-- `charts.d.conf` for [bash](../collectors/charts.d.plugin/#chartsdplugin)
76
+- `python.d.conf` for [python](../collectors/python.d.plugin/README.md)
77
+- `node.d.conf` for [nodejs](../collectors/node.d.plugin/README.md)
78
+- `charts.d.conf` for [bash](../collectors/charts.d.plugin/README.md)
79
60
-##### Show charts with zero metrics
80
+#### Show charts with zero metrics
81
62
-By default, Netdata will enable monitoring metrics for disks, memory, and network only when they are not zero. If they are constantly zero they are ignored. Metrics that will start having values, after Netdata is started, will be detected and charts will be automatically added to the dashboard (a refresh of the dashboard is needed for them to appear though). Use `yes` instead of `auto` in plugin configuration sections to enable these charts permanently. You can also set the `enable zero metrics` option to `yes` in the `[global]` section which enables charts with zero metrics for all internal Netdata plugins.
82
+By default, Netdata will enable monitoring metrics for disks, memory, and network only when they are not zero. If they
83
+are constantly zero they are ignored. Metrics that will start having values, after Netdata is started, will be detected
84
+and charts will be automatically added to the dashboard (a refresh of the dashboard is needed for them to appear
85
+though). Use `yes` instead of `auto` in plugin configuration sections to enable these charts permanently. You can also
86
+set the `enable zero metrics` option to `yes` in the `[global]` section which enables charts with zero metrics for all
87
+internal Netdata plugins.
88
89
### Modify alarms and notifications
90
66
-##### Add a new alarm
91
+#### Add a new alarm
92
68
-You can add a new alarm definition either by editing an existing stock alarm config file under `health.d` (e.g. `/etc/netdata/edit-config health.d/load.conf`), or by adding a new `.conf` file under `/etc/netdata/health.d`. The documentation on how to define an alarm is in [health monitoring](../health/#health-monitoring). It is suggested to look at some of the stock alarm definitions, so you can ensure you understand how the various options work.
93
+You can add a new alarm definition either by editing an existing stock alarm config file under `health.d` (e.g.
94
+`/etc/netdata/edit-config health.d/load.conf`), or by adding a new `.conf` file under `/etc/netdata/health.d`. The
95
+documentation on how to define an alarm is in [health monitoring](../health/README.md). It is
96
+suggested to look at some of the stock alarm definitions, so you can ensure you understand how the various options work.
97
70
-##### Turn off all alarms and notifications
98
+#### Turn off all alarms and notifications
99
72
-Just set `enabled = no` in the [netdata.conf \[health\]](../daemon/config/#health-section-options) section
100
+Just set `enabled = no` in the [netdata.conf \[health\]](../daemon/config/README.md#health-section-options) section
101
74
-##### Modify or disable a specific alarm
102
+#### Modify or disable a specific alarm
103
76
-The `health.d` directory that contains the alarm triggers for [health monitoring](../health/#health-monitoring). It has one .conf file per collector. You can easily find the .conf file you will need to modify, by looking for the "source" line on the table that appears on the right side of an alarm on the Netdata gui.
104
+The `health.d` directory that contains the alarm triggers for [health monitoring](../health/README.md). It has
105
+one .conf file per collector. You can easily find the .conf file you will need to modify, by looking for the "source"
106
+line on the table that appears on the right side of an alarm on the Netdata gui.
107
78
-For example, if you click on Alarms and go to the tab 'All', the default Netdata installation will show you at the top the configured alarm for `10 min cpu usage` (it's the name of the badge). Looking at the table on the right side, you will see a row that says: `source 4@/usr/lib/netdata/conf.d/health.d/cpu.conf`. This way, you know that you will need to run `/etc/netdata/edit-config health.d/cpu.conf` and look for alarm at line 4 of the conf file.
108
+For example, if you click on Alarms and go to the tab 'All', the default Netdata installation will show you at the top
109
+the configured alarm for `10 min cpu usage` (it's the name of the badge). Looking at the table on the right side, you
110
+will see a row that says: `source 4@/usr/lib/netdata/conf.d/health.d/cpu.conf`. This way, you know that you will need
111
+to run `/etc/netdata/edit-config health.d/cpu.conf` and look for alarm at line 4 of the conf file.
112
113
As stated at the top of the .conf file, **you can disable an alarm notification by setting the 'to' line to: silent**.
81
-To modify how the alarm gets triggered, we suggest that you go through the guide on [health monitoring](../health/#health-monitoring).
114
+To modify how the alarm gets triggered, we suggest that you go through the guide on [health
115
+monitoring](../health/README.md#health-monitoring).
116
83
-##### Receive notifications using my preferred method
117
+#### Receive notifications using my preferred method
118
85
-You only need to configure `health_alarm_notify.conf`. To learn how to do it, read first [alarm notifications](../health/notifications/#netdata-alarm-notifications) and then open the submenu `Supported Notifications` under `Alarm notifications` in the documentation to find the specific page on your preferred notification method.
119
+You only need to configure `health_alarm_notify.conf`. To learn how to do it, read first [alarm
120
+notifications](../health/notifications/README.md#netdata-alarm-notifications) and then open the submenu `Supported
121
+Notifications` under `Alarm notifications` in the documentation to find the specific page on your preferred notification
122
+method.
123
124
### Make security-related customizations
125
89
-##### Change the Netdata web server access lists
126
+#### Change the Netdata web server access lists
127
91
-You have several options under the [netdata.conf \[web\]](../web/server/#access-lists) section.
128
+You have several options under the [netdata.conf \[web\]](../web/server/README.md#access-lists) section.
129
93
-##### Stop sending info to registry.my-netdata.io
130
+#### Stop sending info to registry.my-netdata.io
131
95
-You will need to configure the [registry] section in `netdata.conf`. First read the [registry documentation](../registry/). In it, are instructions on how to [run your own registry](../registry/#run-your-own-registry).
132
+You will need to configure the `[registry]` section in `netdata.conf`. First read the [registry
133
+documentation](../registry/). In it, are instructions on how to [run your own
134
+registry](../registry/README.md#run-your-own-registry).
135
97
-##### Change the IP address/port Netdata listens to
136
+#### Change the IP address/port Netdata listens to
137
99
-The settings are under `netdata.conf` [web]. Look at the [web server documentation](../web/server/#binding-netdata-to-multiple-ports) for more info.
138
+The settings are under the `[web]` section. Look at the [web server
139
+documentation](../web/server/README.md#binding-netdata-to-multiple-ports) for more info.
140
141
### System resource usage
142
103
-##### Reduce the resources Netdata uses
143
+#### Reduce the resources Netdata uses
144
105
-The page on [Netdata performance](Performance.md) has an excellent guide on how to reduce the Netdata cpu/disk/RAM utilization to levels suitable even for the weakest [IoT devices](netdata-for-IoT.md).
145
+The page on [Netdata performance](Performance.md) has an excellent guide on how to reduce the Netdata cpu/disk/RAM
146
+utilization to levels suitable even for the weakest [IoT devices](netdata-for-IoT.md).
147
107
-##### Change when Netdata saves metrics to disk
148
+#### Change when Netdata saves metrics to disk
149
109
-[netdata.conf \[global\]](../daemon/config/#global-section-options) : `memory mode`
150
+[netdata.conf \[global\]](../daemon/config/README.md#global-section-options): `memory mode`
151
111
-##### Prevent Netdata from getting immediately killed when my server runs out of memory
152
+#### Prevent Netdata from getting immediately killed when my server runs out of memory
153
113
-You can change the Netdata [OOM score](../daemon/#oom-score) in `netdata.conf` [global].
154
+You can change the Netdata [OOM score](../daemon/README.md#oom-score) in `[global]`.
155
156
### Other
157
117
-##### Move Netdata directories
158
+#### Move Netdata directories
159
119
-The various directory paths are in [netdata.conf \[global\]](../daemon/config/#global-section-options).
160
+The various directory paths are in [netdata.conf \[global\]](../daemon/config/README.md#global-section-options).
161
162
## How Netdata configuration works
163
123
-The configuration files are `name = value` dictionaries with `[sections]`. Write whatever you like there as long as it follows this simple format.
164
+The configuration files are `name = value` dictionaries with `[sections]`. Write whatever you like there as long as it
165
+follows this simple format.
166
125
-Netdata loads this dictionary and then when the code needs a value from it, it just looks up the `name` in the dictionary at the proper `section`. In all places, in the code, there are both the `names` and their `default values`, so if something is not found in the configuration file, the default is used. The lookup is made using B-Trees and hashes (no string comparisons), so they are super fast. Also the `names` of the settings can be `my super duper setting that once set to yes, will turn the world upside down = no` - so goodbye to most of the documentation involved.
167
+Netdata loads this dictionary and then when the code needs a value from it, it just looks up the `name` in the
168
+dictionary at the proper `section`. In all places, in the code, there are both the `names` and their `default values`,
169
+so if something is not found in the configuration file, the default is used. The lookup is made using B-Trees and hashes
170
+(no string comparisons), so they are super fast. Also the `names` of the settings can be `my super duper setting that
171
+once set to yes, will turn the world upside down = no` - so goodbye to most of the documentation involved.
172
127
-Next, Netdata can generate a valid configuration for the user to edit. No need to remember anything. Just get the configuration from the server (`/netdata.conf` on your Netdata server), edit it and save it.
173
+Next, Netdata can generate a valid configuration for the user to edit. No need to remember anything. Just get the
174
+configuration from the server (`/netdata.conf` on your Netdata server), edit it and save it.
175
129
-Last, what about options you believe you have set, but you misspelled?When you get the configuration file from the server, there will be a comment above all `name = value` pairs the server does not use. So you know that whatever you wrote there, is not used.
176
+Last, what about options you believe you have set, but you misspelled?When you get the configuration file from the
177
+server, there will be a comment above all `name = value` pairs the server does not use. So you know that whatever you
178
+wrote there, is not used.
179
180
## Netdata simple patterns
181
@@ -136,15 +185,15 @@ So, Netdata supports [simple patterns](../libnetdata/simple_pattern/).
185
186
## Netdata labels
187
139
-Since version 1.20, Netdata accepts user defined labels for host. The labels are defined in the section `[host labels]`.
140
-To define a label inside this section, some rules needs to be followed, or Netdata will reject the label. The following
188
+Since version 1.20, Netdata accepts user defined labels for host. The labels are defined in the section `[host labels]`.
189
+To define a label inside this section, some rules needs to be followed, or Netdata will reject the label. The following
190
restrictions are applied for label names:
191
143
-- Names cannot start with `_`, but it can be present in other parts of the name.
144
-- Names only accept alphabet letters, numbers, dots, and dashes.
192
+- Names cannot start with `_`, but it can be present in other parts of the name.
193
+- Names only accept alphabet letters, numbers, dots, and dashes.
194
146
-The policy for values is more flexible, but you can not use exclamation marks (`!`), whitespaces (` `), single quotes (`'`),
147
-double quotes (`"`), or asterisks (`*`),
148
-because they are used to compare label values in health alarms and templates.
195
+The policy for values is more flexible, but you can not use exclamation marks (`!`), whitespaces (` `), single quotes
196
+(`'`), double quotes (`"`), or asterisks (`*`), because they are used to compare label values in health alarms and
197
+templates.
198
199
[](<>)
docs/high-performance-netdata.md
+27
-17
@@ -1,19 +1,23 @@
1
# High performance Netdata
2
3
-If you plan to run a Netdata public on the internet, you will get the most performance out of it by following these rules:
3
+If you plan to run a Netdata public on the internet, you will get the most performance out of it by following these
4
+rules:
5
6
## 1. run behind nginx
7
7
-The internal web server is optimized to provide the best experience with few clients connected to it. Normally a web browser will make 4-6 concurrent connections to a web server, so that it can send requests in parallel. To best serve a single client, Netdata spawns a thread for each connection it receives (so 4-6 threads per connected web browser).
8
+The internal web server is optimized to provide the best experience with few clients connected to it. Normally a web
9
+browser will make 4-6 concurrent connections to a web server, so that it can send requests in parallel. To best serve a
10
+single client, Netdata spawns a thread for each connection it receives (so 4-6 threads per connected web browser).
11
9
-If you plan to have your Netdata public on the internet, this strategy wastes resources. It provides a lock-free environment so each thread is autonomous to serve the browser, but it does not scale well. Running Netdata behind nginx, idle connections to Netdata can be reused, thus improving significantly the performance of Netdata.
12
+If you plan to have your Netdata public on the internet, this strategy wastes resources. It provides a lock-free
13
+environment so each thread is autonomous to serve the browser, but it does not scale well. Running Netdata behind nginx,
14
+idle connections to Netdata can be reused, thus improving significantly the performance of Netdata.
15
16
In the following nginx configuration we do the following:
17
13
-- allow nginx to maintain up to 1024 idle connections to Netdata (so Netdata will have up to 1024 threads waiting for requests)
14
-
18
+- allow nginx to maintain up to 1024 idle connections to Netdata (so Netdata will have up to 1024 threads waiting for
19
+ requests)
20
- allow nginx to compress the responses of Netdata (later we will disable gzip compression at Netdata)
16
-
21
- we disable wordpress pingback attacks and allow only GET, HEAD and OPTIONS requests.
22
23
```conf
@@ -55,7 +59,7 @@ server {
59
60
Then edit `/etc/netdata/netdata.conf` and set these config options:
61
58
-```
62
+```conf
63
[global]
64
bind socket to IP = 127.0.0.1
65
access log = none
@@ -66,24 +70,28 @@ Then edit `/etc/netdata/netdata.conf` and set these config options:
70
These options:
71
72
- `[global].bind socket to IP = 127.0.0.1` makes Netdata listen only for requests from localhost (nginx).
69
-- `[global].access log = none` disables the access.log of Netdata. It is not needed since Netdata only listens for requests on 127.0.0.1 and thus only nginx can access it. nginx has its own access.log for your record.
70
-- `[global].disconnect idle web clients after seconds = 3600` will kill inactive web threads after an hour of inactivity.
71
-- `[global].enable web responses gzip compression = no` disables gzip compression at Netdata (nginx will compress the responses).
73
+- `[global].access log = none` disables the access.log of Netdata. It is not needed since Netdata only listens for
74
+ requests on 127.0.0.1 and thus only nginx can access it. nginx has its own access.log for your record.
75
+- `[global].disconnect idle web clients after seconds = 3600` will kill inactive web threads after an hour of
76
+ inactivity.
77
+- `[global].enable web responses gzip compression = no` disables gzip compression at Netdata (nginx will compress the
78
+ responses).
79
80
## 2. increase open files limit (non-systemd)
81
75
-By default Linux limits open file descriptors per process to 1024. This means that less than half of this number of client connections can be accepted by both nginx and Netdata. To increase them, create 2 new files:
82
+By default Linux limits open file descriptors per process to 1024. This means that less than half of this number of
83
+client connections can be accepted by both nginx and Netdata. To increase them, create 2 new files:
84
85
1. `/etc/security/limits.d/nginx.conf`, with these contents:
86
79
-```
87
+```conf
88
nginx soft nofile 10000
89
nginx hard nofile 30000
90
```
91
92
2. `/etc/security/limits.d/netdata.conf`, with these contents:
93
86
-```
94
+```conf
95
netdata soft nofile 10000
96
netdata hard nofile 30000
97
```
@@ -96,20 +104,22 @@ sysctl -p
104
105
## 2b. increase open files limit (systemd)
106
99
-Thanks to [@leleobhz](https://github.com/netdata/netdata/issues/655#issue-163932584), this is what you need to raise the limits using systemd:
107
+Thanks to [@leleobhz](https://github.com/netdata/netdata/issues/655#issue-163932584), this is what you need to raise the
108
+limits using systemd:
109
101
-This is based on <https://ma.ttias.be/increase-open-files-limit-in-mariadb-on-centos-7-with-systemd/> and here worked as following:
110
+This is based on <https://ma.ttias.be/increase-open-files-limit-in-mariadb-on-centos-7-with-systemd/> and here worked as
111
+following:
112
113
1. Create the folders in /etc:
114
105
-```
115
+```bash
116
mkdir -p /etc/systemd/system/netdata.service.d
117
mkdir -p /etc/systemd/system/nginx.service.d
118
```
119
120
2. Create limits.conf in each folder as following:
121
112
-```
122
+```conf
123
[Service]
124
LimitNOFILE=30000
125
```
docs/netdata-for-IoT.md
+30
-9
@@ -4,29 +4,50 @@
4
5
> New to Netdata? Check its demo: **<https://my-netdata.io/>**
6
>
7
-> [](https://registry.my-netdata.io/#netdata_registry) [](https://registry.my-netdata.io/#netdata_registry) [](https://registry.my-netdata.io/#netdata_registry)
7
+>[](https://registry.my-netdata.io/#netdata_registry)
9
+>[](https://registry.my-netdata.io/#netdata_registry)
11
+>[](https://registry.my-netdata.io/#netdata_registry)
13
>
9
-> [](https://registry.my-netdata.io/#netdata_registry) [](https://registry.my-netdata.io/#netdata_registry) [](https://registry.my-netdata.io/#netdata_registry)
14
+>[](https://registry.my-netdata.io/#netdata_registry)
16
+>[](https://registry.my-netdata.io/#netdata_registry)
18
+>[](https://registry.my-netdata.io/#netdata_registry)
20
21
---
22
13
-Netdata is a **very efficient** server performance monitoring solution. When running in server hardware, it can collect thousands of system and application metrics **per second** with just 1% CPU utilization of a single core. Its web server responds to most data requests in about **half a millisecond** making its web dashboards spontaneous, amazingly fast!
23
+Netdata is a **very efficient** server performance monitoring solution. When running in server hardware, it can collect
24
+thousands of system and application metrics **per second** with just 1% CPU utilization of a single core. Its web server
25
+responds to most data requests in about **half a millisecond** making its web dashboards spontaneous, amazingly fast!
26
15
-Netdata can also be a very efficient real-time monitoring solution for **IoT devices** (RPIs, routers, media players, wifi access points, industrial controllers and sensors of all kinds). Netdata will generally run everywhere a Linux kernel runs (and it is glibc and [musl-libc](https://www.musl-libc.org/) friendly).
27
+Netdata can also be a very efficient real-time monitoring solution for **IoT devices** (RPIs, routers, media players,
28
+wifi access points, industrial controllers and sensors of all kinds). Netdata will generally run everywhere a Linux
29
+kernel runs (and it is glibc and [musl-libc](https://www.musl-libc.org/) friendly).
30
17
-You can use it as both a data collection agent (where you pull data using its API), for embedding its charts on other web pages / consoles, but also for accessing it directly with your browser to view its dashboard.
31
+You can use it as both a data collection agent (where you pull data using its API), for embedding its charts on other
32
+web pages / consoles, but also for accessing it directly with your browser to view its dashboard.
33
19
-The Netdata web API already provides **reduce** functions allowing it to report **average** and **max** for any timeframe. It can also respond in many formats including JSON, JSONP, CSV, HTML. Its API is also a **google charts** provider so it can directly be used by google sheets, google charts, google widgets.
34
+The Netdata web API already provides **reduce** functions allowing it to report **average** and **max** for any
35
+timeframe. It can also respond in many formats including JSON, JSONP, CSV, HTML. Its API is also a **google charts**
36
+provider so it can directly be used by google sheets, google charts, google widgets.
37
38

39
23
-Although Netdata has been significantly optimized to lower the CPU and RAM resources it consumes, the plethora of data collection plugins may be inappropriate for weak IoT devices. Please follow the guide on [running Netdata in embedded devices](Performance.md)
40
+Although Netdata has been significantly optimized to lower the CPU and RAM resources it consumes, the plethora of data
41
+collection plugins may be inappropriate for weak IoT devices. Please follow the guide on [running Netdata in embedded
42
+devices](Performance.md)
43
44
## Monitoring RPi temperature
45
27
-The python version of the sensors plugin uses `lm-sensors`. Unfortunately the temperature reading of RPi are not supported by `lm-sensors`.
46
+The python version of the sensors plugin uses `lm-sensors`. Unfortunately the temperature reading of RPi are not
47
+supported by `lm-sensors`.
48
29
-Netdata also has a bash version of the sensors plugin that can read RPi temperatures. It is disabled by default to avoid the conflicts with the python version.
49
+Netdata also has a bash version of the sensors plugin that can read RPi temperatures. It is disabled by default to avoid
50
+the conflicts with the python version.
51
52
To enable it, run `sudo edit-config charts.d.conf` and uncomment this line:
53
registry/README.md
+84
-49
@@ -1,22 +1,27 @@
1
# Registry
2
3
-The Netdata registry implements the node menu on the top left corner of the Netdata dashboards and enables the Netdata cloud features, such as the node view.
4
-The node menu lists the Netdata servers you have visited. The node view offers a lot of additional features on top of the menu,
5
-[with many more to come](https://blog.netdata.cloud/posts/netdata-cloud-announcement/).
6
-To enable the global Netdata registry and the cloud features, you need to Sign In to Netdata cloud. By signing in, you opt in to let the registry receive and store
7
-the information described [here](#what-data-does-the-registry-store).
8
-You can still get the node menu, but not the cloud features, if you [run your own registry](#run-your-own-registry).
3
+The Netdata registry implements the node menu on the top left corner of the Netdata dashboards and enables the Netdata
4
+cloud features, such as the node view. The node menu lists the Netdata servers you have visited. The node view offers a
5
+lot of additional features on top of the menu, [with many more to
6
+come](https://blog.netdata.cloud/posts/netdata-cloud-announcement/). To enable the global Netdata registry and the cloud
7
+features, you need to Sign In to Netdata cloud. By signing in, you opt in to let the registry receive and store the
8
+information described [here](#what-data-does-the-registry-store). You can still get the node menu, but not the cloud
9
+features, if you [run your own registry](#run-your-own-registry).
10
11
## Why?
12
13
Netdata provides distributed monitoring.
14
14
-Traditional monitoring solutions centralize all the data to provide unified dashboards across all servers. Before Netdata, this was the standard practice. However it has a few issues:
15
+Traditional monitoring solutions centralize all the data to provide unified dashboards across all servers. Before
16
+Netdata, this was the standard practice. However it has a few issues:
17
18
1. due to the resources required, the number of metrics collected is limited.
17
-2. for the same reason, the data collection frequency is not that high, at best it will be once every 10 or 15 seconds, at worst every 5 or 10 mins.
18
-3. the central monitoring solution needs dedicated resources, thus becoming "another bottleneck" in the whole ecosystem. It also requires maintenance, administration, etc.
19
-4. most centralized monitoring solutions are usually only good for presenting _statistics of past performance_ (i.e. cannot be used for real-time performance troubleshooting).
19
+2. for the same reason, the data collection frequency is not that high, at best it will be once every 10 or 15 seconds,
20
+ at worst every 5 or 10 mins.
21
+3. the central monitoring solution needs dedicated resources, thus becoming "another bottleneck" in the whole
22
+ ecosystem. It also requires maintenance, administration, etc.
23
+4. most centralized monitoring solutions are usually only good for presenting _statistics of past performance_ (i.e.
24
+ cannot be used for real-time performance troubleshooting).
25
26
Netdata follows a different approach:
27
@@ -26,38 +31,50 @@ Netdata follows a different approach:
31
4. Netdata servers do not talk to each other
32
5. your browser connects all the Netdata servers
33
29
-Using Netdata, your monitoring infrastructure is embedded on each server, limiting significantly the need of additional resources. Netdata is blazingly fast, very resource efficient and utilizes server resources that already exist and are spare (on each server). This allows **scaling out** the monitoring infrastructure.
34
+Using Netdata, your monitoring infrastructure is embedded on each server, limiting significantly the need of additional
35
+resources. Netdata is blazingly fast, very resource efficient and utilizes server resources that already exist and are
36
+spare (on each server). This allows **scaling out** the monitoring infrastructure.
37
31
-However, the Netdata approach introduces a few new issues that need to be addressed, one being **the list of Netdata we have installed**, i.e. the URLs our Netdata servers are listening.
38
+However, the Netdata approach introduces a few new issues that need to be addressed, one being **the list of Netdata we
39
+have installed**, i.e. the URLs our Netdata servers are listening.
40
33
-To solve this, Netdata utilizes a **central registry**. This registry, together with certain browser features, allow Netdata to provide unified cross-server dashboards.
34
-For example, when you jump from server to server using the node menu, several session settings (like the currently viewed charts, the current zoom and pan operations on the charts, etc.) are propagated to the new server, so that the new dashboard will come with exactly the same view.
35
-Netdata cloud has a roadmap to [offer many more features](https://blog.netdata.cloud/posts/netdata-cloud-announcement/) over and above the simple node menu.
41
+To solve this, Netdata utilizes a **central registry**. This registry, together with certain browser features, allow
42
+Netdata to provide unified cross-server dashboards. For example, when you jump from server to server using the node
43
+menu, several session settings (like the currently viewed charts, the current zoom and pan operations on the charts,
44
+etc.) are propagated to the new server, so that the new dashboard will come with exactly the same view. Netdata cloud
45
+has a roadmap to [offer many more features](https://blog.netdata.cloud/posts/netdata-cloud-announcement/) over and above
46
+the simple node menu.
47
48
## What data does the registry store?
49
50
The registry keeps track of 4 entities:
51
41
-1. **machines**: i.e. the Netdata installations (a random GUID generated by each Netdata the first time it starts; we call this **machine_guid**)
52
+1. **machines**: i.e. the Netdata installations (a random GUID generated by each Netdata the first time it starts; we
53
+ call this **machine_guid**)
54
55
For each Netdata installation (each `machine_guid`) the registry keeps track of the different URLs it is accessed.
56
45
-2. **persons**: i.e. the web browsers accessing the Netdata installations (a random GUID generated by the registry the first time it sees a new web browser; we call this **person_guid**)
57
+2. **persons**: i.e. the web browsers accessing the Netdata installations (a random GUID generated by the registry the
58
+ first time it sees a new web browser; we call this **person_guid**)
59
60
For each person, the registry keeps track of the Netdata installations it has accessed and their URLs.
61
62
3. **URLs** of Netdata installations (as seen by the web browsers)
63
51
- For each URL, the registry keeps the URL and nothing more. Each URL is linked to _persons_ and _machines_. The only way to find a URL is to know its **machine_guid** or have a **person_guid** it is linked to it.
64
+ For each URL, the registry keeps the URL and nothing more. Each URL is linked to _persons_ and _machines_. The only
65
+ way to find a URL is to know its **machine_guid** or have a **person_guid** it is linked to it.
66
53
-4. **accounts**: i.e. the information used to sign-in via one of the available sign-in methods. Depending on the method, this may include an email, an email and a profile picture.
67
+4. **accounts**: i.e. the information used to sign-in via one of the available sign-in methods. Depending on the
68
+ method, this may include an email, an email and a profile picture.
69
55
-For _persons_/_accounts_ and _machines_, the registry keeps links to _URLs_, each link with 2 timestamps (first time seen, last time seen) and a counter (number of times it has been seen).
56
-*machines_, _persons_ and timestamps are stored in the Netdata registry regardless of whether you sign in or not.
70
+For _persons_/_accounts_ and _machines_, the registry keeps links to _URLs_, each link with 2 timestamps (first time
71
+seen, last time seen) and a counter (number of times it has been seen). *machines_, _persons_ and timestamps are stored
72
+in the Netdata registry regardless of whether you sign in or not.
73
74
## Who talks to the registry?
75
60
-Your web browser **only**! If sending this information is against your policies, you can [run your own registry](#run-your-own-registry)
76
+Your web browser **only**! If sending this information is against your policies, you can [run your own
77
+registry](#run-your-own-registry)
78
79
Your Netdata servers do not talk to the registry. This is a UML diagram of its operation:
80
@@ -65,12 +82,14 @@ Your Netdata servers do not talk to the registry. This is a UML diagram of its o
82
83
## Which is the default registry?
84
68
-`https://registry.my-netdata.io`, which is currently served by `https://london.my-netdata.io`. This registry listens to both HTTP and HTTPS requests but the default is HTTPS.
69
-`https://netdata.cloud` is the additional registry endpoint, that enables [the cloud features](https://blog.netdata.cloud/posts/netdata-cloud-announcement/). It only accepts HTTPS.
85
+`https://registry.my-netdata.io`, which is currently served by `https://london.my-netdata.io`. This registry listens to
86
+both HTTP and HTTPS requests but the default is HTTPS. `https://netdata.cloud` is the additional registry endpoint, that
87
+enables [the cloud features](https://blog.netdata.cloud/posts/netdata-cloud-announcement/). It only accepts HTTPS.
88
89
### Can this registry handle the global load of Netdata installations?
90
73
-Yeap! The registry can handle 50.000 - 100.000 requests **per second per core** (depending on the type of CPU, the computer's memory bandwidth, etc). 50.000 is on J1900 (celeron 2Ghz).
91
+Yeap! The registry can handle 50.000 - 100.000 requests **per second per core** (depending on the type of CPU, the
92
+computer's memory bandwidth, etc). 50.000 is on J1900 (celeron 2Ghz).
93
94
We believe, it can do it...
95
@@ -80,7 +99,7 @@ We believe, it can do it...
99
100
**To turn any Netdata into a registry**, edit `/etc/netdata/netdata.conf` and set:
101
83
-```
102
+```conf
103
[registry]
104
enabled = yes
105
registry to announce = http://your.registry:19999
@@ -88,21 +107,24 @@ We believe, it can do it...
107
108
Restart your Netdata to activate it.
109
91
-Then, you need to tell **all your other Netdata servers to advertise your registry**, instead of the default. To do this, on each of your Netdata servers, edit `/etc/netdata/netdata.conf` and set:
110
+Then, you need to tell **all your other Netdata servers to advertise your registry**, instead of the default. To do
111
+this, on each of your Netdata servers, edit `/etc/netdata/netdata.conf` and set:
112
93
-```
113
+```conf
114
[registry]
115
enabled = no
116
registry to announce = http://your.registry:19999
117
```
118
99
-Note that we have not enabled the registry on the other servers. Only one Netdata (the registry) needs `[registry].enabled = yes`.
119
+Note that we have not enabled the registry on the other servers. Only one Netdata (the registry) needs
120
+`[registry].enabled = yes`.
121
122
This is it. You have your registry now.
123
103
-You may also want to give your server different names under the node menu (i.e. to have them sorted / grouped). You can change its registry name, by setting on each Netdata server:
124
+You may also want to give your server different names under the node menu (i.e. to have them sorted / grouped). You can
125
+change its registry name, by setting on each Netdata server:
126
105
-```
127
+```conf
128
[registry]
129
registry hostname = Group1 - Master DB
130
```
@@ -113,31 +135,35 @@ So this server will appear in the node menu as `Group1 - Master DB`. The max nam
135
136
Netdata v1.9+ support limiting access to the registry from given IPs, like this:
137
116
-```
138
+```conf
139
[registry]
140
allow from = *
141
```
142
121
-`allow from` settings are [Netdata simple patterns](../libnetdata/simple_pattern/): string matches that use `*` as wildcard (any number of times) and a `!` prefix for a negative match. So: `allow from = !10.1.2.3 10.*` will allow all IPs in `10.*` except `10.1.2.3`. The order is important: left to right, the first positive or negative match is used.
143
+`allow from` settings are [Netdata simple patterns](../libnetdata/simple_pattern/): string matches that use `*` as
144
+wildcard (any number of times) and a `!` prefix for a negative match. So: `allow from = !10.1.2.3 10.*` will allow all
145
+IPs in `10.*` except `10.1.2.3`. The order is important: left to right, the first positive or negative match is used.
146
123
-Keep in mind that connections to Netdata API ports are filtered by `[web].allow connections from`. So, IPs allowed by `[registry].allow from` should also be allowed by `[web].allow connection from`.
147
+Keep in mind that connections to Netdata API ports are filtered by `[web].allow connections from`. So, IPs allowed by
148
+`[registry].allow from` should also be allowed by `[web].allow connection from`.
149
125
-The patterns can be matches over IP addresses or FQDN of the host.
126
-In order to check the FQDN of the connection without opening the Netdata agent to DNS-spoofing, a reverse-dns record
127
-must be setup for the connecting host. At connection time the reverse-dns of the peer IP address is resolved, and
128
-a forward DNS resolution is made to validate the IP address against the name-pattern.
150
+The patterns can be matches over IP addresses or FQDN of the host. In order to check the FQDN of the connection without
151
+opening the Netdata agent to DNS-spoofing, a reverse-dns record must be setup for the connecting host. At connection
152
+time the reverse-dns of the peer IP address is resolved, and a forward DNS resolution is made to validate the IP address
153
+against the name-pattern.
154
130
-Please note that this process can be expensive on a machine that is serving many connections. The behaviour of
131
-the pattern matching can be controlled with the following setting:
132
-```
155
+Please note that this process can be expensive on a machine that is serving many connections. The behaviour of the
156
+pattern matching can be controlled with the following setting:
157
+
158
+```conf
159
[registry]
160
allow by dns = heuristic
161
```
162
163
The settings are:
138
-* `yes` allows the pattern to match DNS names.
139
-* `no` disables DNS matching for the patterns (they only match IP addresses).
140
-* `heuristic` will estimate if the patterns should match FQDNs by the presence or absence of `:`s or alpha-characters.
164
+- `yes` allows the pattern to match DNS names.
165
+- `no` disables DNS matching for the patterns (they only match IP addresses).
166
+- `heuristic` will estimate if the patterns should match FQDNs by the presence or absence of `:`s or alpha-characters.
167
168
### Where is the registry database stored?
169
@@ -151,21 +177,30 @@ There can be up to 2 files:
177
178
- `registry.db`, the database
179
154
- every `[registry].registry save db every new entries` entries in `registry-log.db`, Netdata will save its database to `registry.db` and empty `registry-log.db`.
180
+ every `[registry].registry save db every new entries` entries in `registry-log.db`, Netdata will save its database
181
+ to `registry.db` and empty `registry-log.db`.
182
183
Both files are machine readable text files.
184
185
## The future
186
160
-The registry opens a whole world of new possibilities for Netdata. Check here what we think: <https://github.com/netdata/netdata/issues/416>
187
+The registry opens a whole world of new possibilities for Netdata. Check here what we think:
188
+<https://github.com/netdata/netdata/issues/416>
189
190
## Troubleshooting the registry
191
164
-The registry URL should be set to the URL of a Netdata dashboard. This server has to have `[registry].enabled = yes`. So, accessing the registry URL directly with your web browser, should present the dashboard of the Netdata operating the registry.
192
+The registry URL should be set to the URL of a Netdata dashboard. This server has to have `[registry].enabled = yes`.
193
+So, accessing the registry URL directly with your web browser, should present the dashboard of the Netdata operating the
194
+registry.
195
166
-To use the registry, your web browser needs to support **third party cookies**, since the cookies are set by the registry while you are browsing the dashboard of another Netdata server. The registry, the first time it sees a new web browser it tries to figure if the web browser has cookies enabled or not. It does this by setting a cookie and redirecting the browser back to itself hoping that it will receive the cookie. If it does not receive the cookie, the registry will keep redirecting your web browser back to itself, which after a few redirects will fail with an error like this:
196
+To use the registry, your web browser needs to support **third party cookies**, since the cookies are set by the
197
+registry while you are browsing the dashboard of another Netdata server. The registry, the first time it sees a new web
198
+browser it tries to figure if the web browser has cookies enabled or not. It does this by setting a cookie and
199
+redirecting the browser back to itself hoping that it will receive the cookie. If it does not receive the cookie, the
200
+registry will keep redirecting your web browser back to itself, which after a few redirects will fail with an error like
201
+this:
202
168
-```
203
+```conf
204
ERROR 409: Cannot ACCESS netdata registry: https://registry.my-netdata.io responded with: {"status":"redirect","registry":"https://registry.my-netdata.io"}
205
```
206