diff options
-rw-r--r-- | cli/README.md | 2 | ||||
-rw-r--r-- | daemon/README.md | 14 | ||||
-rw-r--r-- | database/README.md | 2 | ||||
-rw-r--r-- | database/engine/README.md | 8 | ||||
-rw-r--r-- | docs/a-github-star-is-important.md | 10 | ||||
-rw-r--r-- | docs/configuration-guide.md | 173 | ||||
-rw-r--r-- | docs/high-performance-netdata.md | 44 | ||||
-rw-r--r-- | docs/netdata-for-IoT.md | 39 | ||||
-rw-r--r-- | registry/README.md | 133 |
9 files changed, 272 insertions, 153 deletions
diff --git a/cli/README.md b/cli/README.md index d39198f26d..a81c357f5b 100644 --- a/cli/README.md +++ b/cli/README.md @@ -23,6 +23,6 @@ reload-claiming-state Reload agent claiming state from disk. ``` -Those commands are the same that can be sent to netdata via [signals](../daemon#command-line-options). +Those commands are the same that can be sent to netdata via [signals](../daemon/README.md#command-line-options). [![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcli%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>) diff --git a/daemon/README.md b/daemon/README.md index 246586addd..482265548a 100644 --- a/daemon/README.md +++ b/daemon/README.md @@ -307,14 +307,14 @@ You can set Netdata scheduling policy in `netdata.conf`, like this: You can use the following: -| policy | description | -|:----:|:----------| -| `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. | -| `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. | +| policy | description | +| :-----------------------: | :---------- | +| `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. | +| `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. | | `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. | -| `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. | -| `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. | -| `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). | +| `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. | +| `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. | +| `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). | For more information see `man sched`. diff --git a/database/README.md b/database/README.md index 143615a0e8..4d249f6fd9 100644 --- a/database/README.md +++ b/database/README.md @@ -226,4 +226,4 @@ Netdata will create charts for kernel memory de-duplication performance, like th ![image](https://cloud.githubusercontent.com/assets/2662304/11998786/eb23ae54-aab6-11e5-94d4-e848e8a5c56a.png) -[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fdatabase%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)
\ No newline at end of file +[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fdatabase%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>) diff --git a/database/engine/README.md b/database/engine/README.md index 78f3b15ec8..0ac0be35e9 100644 --- a/database/engine/README.md +++ b/database/engine/README.md @@ -170,10 +170,10 @@ so as to avoid all disk bottlenecks. The reported numbers are the following: | device | page cache | dataset | reads/sec | writes/sec | -| :---: | :---: | ---: | ---: | ---: | -| HDD | 64 MiB | 4.1 GiB | 813K | 18.0M | -| SSD | 64 MiB | 9.8 GiB | 1.7M | 43.0M | -| N/A | 16 GiB | 6.8 GiB |118.2M | 30.2M | +| :----: | :--------: | ------: | --------: | ---------: | +| HDD | 64 MiB | 4.1 GiB | 813K | 18.0M | +| SSD | 64 MiB | 9.8 GiB | 1.7M | 43.0M | +| N/A | 16 GiB | 6.8 GiB | 118.2M | 30.2M | where "reads/sec" is the number of metric data points being read from the database via its API per second and "writes/sec" is the number of metric data points being written to the database per second. diff --git a/docs/a-github-star-is-important.md b/docs/a-github-star-is-important.md index 6bac3acef3..a69257a231 100644 --- a/docs/a-github-star-is-important.md +++ b/docs/a-github-star-is-important.md @@ -1,10 +1,14 @@ # A GitHub star is important -**GitHub stars** allow Netdata to expand its reach, its community, especially attract people with skills willing to contribute to it. +**GitHub stars** allow Netdata to expand its reach, its community, especially attract people with skills willing to +contribute to it. -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**. +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**. -**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**. +**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**. So, give Netdata a **GitHub star**, at the top right of this page. diff --git a/docs/configuration-guide.md b/docs/configuration-guide.md index ec280ce919..51361b6b76 100644 --- a/docs/configuration-guide.md +++ b/docs/configuration-guide.md @@ -1,26 +1,40 @@ # Configuration guide -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. +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. <details markdown="1"><summary>Configuration files are placed in `/etc/netdata`.</summary> 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> Under that directory you will see the following: -- `netdata.conf` is [the main configuration file](../daemon/config/#daemon-configuration) -- `edit-config` is an sh script that you can use to easily and safely edit the configuration. Just run it to see its usage. -- 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`. -- `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`: - - `health_alarm_notify.conf` is where you configure how and to who Netdata will send [alarm notifications](../health/notifications/#netdata-alarm-notifications). - - `health.d` is the directory that contains the alarm triggers for [health monitoring](../health/#health-monitoring). It contains one .conf file per collector. - - The [modular plugin orchestrators](../collectors/plugins.d/#external-plugins-overview) have: - - 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. +- `netdata.conf` is [the main configuration file](../daemon/config/README.md#daemon-configuration) +- `edit-config` is an sh script that you can use to easily and safely edit the configuration. Just run it to see its + usage. +- 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`. +- `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`: + - `health_alarm_notify.conf` is where you configure how and to who Netdata will send [alarm + notifications](../health/notifications/README.md#netdata-alarm-notifications). + - `health.d` is the directory that contains the alarm triggers for [health + monitoring](../health/README.md#health-monitoring). It contains one .conf file per collector. + - The [modular plugin orchestrators](../collectors/plugins.d/README.md#external-plugins-overview) have: + - One config file each, mainly to turn their modules on and off: `python.d.conf` for + [python](../collectors/python.d.plugin/README.md#pythondplugin), `node.d.conf` for + [nodejs](../collectors/node.d.plugin/README.md#nodedplugin) and `charts.d.conf` for + [bash](../collectors/charts.d.plugin/README.md#chartsdplugin) modules. - One directory each, where the module-specific configuration files can be found. - - `stream.conf` is where you configure [streaming and replication](../streaming/#streaming-and-replication) - - `stats.d` is a directory under which you can add .conf files to add [synthetic charts](../collectors/statsd.plugin/#synthetic-statsd-charts). - - 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/) + - `stream.conf` is where you configure [streaming and + replication](../streaming/README.md#streaming-and-replication) + - `stats.d` is a directory under which you can add .conf files to add [synthetic + charts](../collectors/statsd.plugin/README.md#synthetic-statsd-charts). + - 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/) -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. +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. ## How to @@ -33,100 +47,135 @@ In <http://localhost:19999/netdata.conf>, you will see the following two paramet # stock config directory = /usr/lib/netdata/conf.d ``` -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. +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. ### Change what I see -##### Increase the metrics retention period +#### Increase the metrics retention period -Increase `history` in [netdata.conf \[global\]](../daemon/config/#global-section-options). Just ensure you understand [how much memory will be required](../database/) +Increase `history` in [netdata.conf \[global\]](../daemon/config/README.md#global-section-options). Just ensure you +understand [how much memory will be required](../database/). -##### Reduce the data collection frequency +#### Reduce the data collection frequency -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. +Increase `update every` in [netdata.conf \[global\]](../daemon/config/README.md#global-section-options). This is another +way to increase your metrics retention period, but at a lower resolution than the default 1s. -##### Modify how a chart is displayed +#### Modify how a chart is displayed -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. +In `netdata.conf` under `# Per chart configuration` you will find several [\[CHART_NAME\] +sections](../daemon/config/README.md#per-chart-configuration), where you can control all aspects of a specific chart. -##### Disable a collector +#### Disable a collector -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: +Entire plugins can be turned off from the [netdata.conf \[plugins\]](../daemon/config/README.md#plugins-section-options) +section. To disable specific modules of a plugin orchestrator, you need to edit one of the following: -- `python.d.conf` for [python](../collectors/python.d.plugin/#pythondplugin) -- `node.d.conf` for [nodejs](../collectors/node.d.plugin/#nodedplugin) -- `charts.d.conf` for [bash](../collectors/charts.d.plugin/#chartsdplugin) +- `python.d.conf` for [python](../collectors/python.d.plugin/README.md) +- `node.d.conf` for [nodejs](../collectors/node.d.plugin/README.md) +- `charts.d.conf` for [bash](../collectors/charts.d.plugin/README.md) -##### Show charts with zero metrics +#### Show charts with zero metrics -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. +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. ### Modify alarms and notifications -##### Add a new alarm +#### Add a new alarm -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. +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/README.md). It is +suggested to look at some of the stock alarm definitions, so you can ensure you understand how the various options work. -##### Turn off all alarms and notifications +#### Turn off all alarms and notifications -Just set `enabled = no` in the [netdata.conf \[health\]](../daemon/config/#health-section-options) section +Just set `enabled = no` in the [netdata.conf \[health\]](../daemon/config/README.md#health-section-options) section -##### Modify or disable a specific alarm +#### Modify or disable a specific alarm -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. +The `health.d` directory that contains the alarm triggers for [health monitoring](../health/README.md). 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. -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. +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. As stated at the top of the .conf file, **you can disable an alarm notification by setting the 'to' line to: silent**. -To modify how the alarm gets triggered, we suggest that you go through the guide on [health monitoring](../health/#health-monitoring). +To modify how the alarm gets triggered, we suggest that you go through the guide on [health +monitoring](../health/README.md#health-monitoring). -##### Receive notifications using my preferred method +#### Receive notifications using my preferred method -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. +You only need to configure `health_alarm_notify.conf`. To learn how to do it, read first [alarm +notifications](../health/notifications/README.md#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. ### Make security-related customizations -##### Change the Netdata web server access lists +#### Change the Netdata web server access lists -You have several options under the [netdata.conf \[web\]](../web/server/#access-lists) section. +You have several options under the [netdata.conf \[web\]](../web/server/README.md#access-lists) section. -##### Stop sending info to registry.my-netdata.io +#### Stop sending info to registry.my-netdata.io -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). +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/README.md#run-your-own-registry). -##### Change the IP address/port Netdata listens to +#### Change the IP address/port Netdata listens to -The settings are under `netdata.conf` [web]. Look at the [web server documentation](../web/server/#binding-netdata-to-multiple-ports) for more info. +The settings are under the `[web]` section. Look at the [web server +documentation](../web/server/README.md#binding-netdata-to-multiple-ports) for more info. ### System resource usage -##### Reduce the resources Netdata uses +#### Reduce the resources Netdata uses -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). +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). -##### Change when Netdata saves metrics to disk +#### Change when Netdata saves metrics to disk -[netdata.conf \[global\]](../daemon/config/#global-section-options) : `memory mode` +[netdata.conf \[global\]](../daemon/config/README.md#global-section-options): `memory mode` -##### Prevent Netdata from getting immediately killed when my server runs out of memory +#### Prevent Netdata from getting immediately killed when my server runs out of memory -You can change the Netdata [OOM score](../daemon/#oom-score) in `netdata.conf` [global]. +You can change the Netdata [OOM score](../daemon/README.md#oom-score) in `[global]`. ### Other -##### Move Netdata directories +#### Move Netdata directories -The various directory paths are in [netdata.conf \[global\]](../daemon/config/#global-section-options). +The various directory paths are in [netdata.conf \[global\]](../daemon/config/README.md#global-section-options). ## How Netdata configuration works -The configuration files are `name = value` dictionaries with `[sections]`. Write whatever you like there as long as it follows this simple format. +The configuration files are `name = value` dictionaries with `[sections]`. Write whatever you like there as long as it +follows this simple format. -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. +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. -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. +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. -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. +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. ## Netdata simple patterns @@ -136,15 +185,15 @@ So, Netdata supports [simple patterns](../libnetdata/simple_pattern/). ## Netdata labels -Since version 1.20, Netdata accepts user defined labels for host. The labels are defined in the section `[host labels]`. -To define a label inside this section, some rules needs to be followed, or Netdata will reject the label. The following +Since version 1.20, Netdata accepts user defined labels for host. The labels are defined in the section `[host labels]`. +To define a label inside this section, some rules needs to be followed, or Netdata will reject the label. The following restrictions are applied for label names: -- Names cannot start with `_`, but it can be present in other parts of the name. -- Names only accept alphabet letters, numbers, dots, and dashes. +- Names cannot start with `_`, but it can be present in other parts of the name. +- Names only accept alphabet letters, numbers, dots, and dashes. -The policy for values is more flexible, but you can not use exclamation marks (`!`), whitespaces (` `), single quotes (`'`), -double quotes (`"`), or asterisks (`*`), -because they are used to compare label values in health alarms and templates. +The policy for values is more flexible, but you can not use exclamation marks (`!`), whitespaces (` `), single quotes +(`'`), double quotes (`"`), or asterisks (`*`), because they are used to compare label values in health alarms and +templates. [![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fdocs%2Fconfiguration-guide&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>) diff --git a/docs/high-performance-netdata.md b/docs/high-performance-netdata.md index 3b33c03f13..fd6fd9e006 100644 --- a/docs/high-performance-netdata.md +++ b/docs/high-performance-netdata.md @@ -1,19 +1,23 @@ # High performance Netdata -If you plan to run a Netdata public on the internet, you will get the most performance out of it by following these rules: +If you plan to run a Netdata public on the internet, you will get the most performance out of it by following these +rules: ## 1. run behind nginx -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). +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). -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. +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. In the following nginx configuration we do the following: -- allow nginx to maintain up to 1024 idle connections to Netdata (so Netdata will have up to 1024 threads waiting for requests) - +- allow nginx to maintain up to 1024 idle connections to Netdata (so Netdata will have up to 1024 threads waiting for + requests) - allow nginx to compress the responses of Netdata (later we will disable gzip compression at Netdata) - - we disable wordpress pingback attacks and allow only GET, HEAD and OPTIONS requests. ```conf @@ -55,7 +59,7 @@ server { Then edit `/etc/netdata/netdata.conf` and set these config options: -``` +```conf [global] bind socket to IP = 127.0.0.1 access log = none @@ -66,24 +70,28 @@ Then edit `/etc/netdata/netdata.conf` and set these config options: These options: - `[global].bind socket to IP = 127.0.0.1` makes Netdata listen only for requests from localhost (nginx). -- `[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. -- `[global].disconnect idle web clients after seconds = 3600` will kill inactive web threads after an hour of inactivity. -- `[global].enable web responses gzip compression = no` disables gzip compression at Netdata (nginx will compress the responses). +- `[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. +- `[global].disconnect idle web clients after seconds = 3600` will kill inactive web threads after an hour of + inactivity. +- `[global].enable web responses gzip compression = no` disables gzip compression at Netdata (nginx will compress the + responses). ## 2. increase open files limit (non-systemd) -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: +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: 1. `/etc/security/limits.d/nginx.conf`, with these contents: -``` +```conf nginx soft nofile 10000 nginx hard nofile 30000 ``` 2. `/etc/security/limits.d/netdata.conf`, with these contents: -``` +```conf netdata soft nofile 10000 netdata hard nofile 30000 ``` @@ -96,20 +104,22 @@ sysctl -p ## 2b. increase open files limit (systemd) -Thanks to [@leleobhz](https://github.com/netdata/netdata/issues/655#issue-163932584), this is what you need to raise the limits using systemd: +Thanks to [@leleobhz](https://github.com/netdata/netdata/issues/655#issue-163932584), this is what you need to raise the +limits using systemd: -This is based on <https://ma.ttias.be/increase-open-files-limit-in-mariadb-on-centos-7-with-systemd/> and here worked as following: +This is based on <https://ma.ttias.be/increase-open-files-limit-in-mariadb-on-centos-7-with-systemd/> and here worked as +following: 1. Create the folders in /etc: -``` +```bash mkdir -p /etc/systemd/system/netdata.service.d mkdir -p /etc/systemd/system/nginx.service.d ``` 2. Create limits.conf in each folder as following: -``` +```conf [Service] LimitNOFILE=30000 ``` diff --git a/docs/netdata-for-IoT.md b/docs/netdata-for-IoT.md index 7a991c26d5..716822bf0a 100644 --- a/docs/netdata-for-IoT.md +++ b/docs/netdata-for-IoT.md @@ -4,29 +4,50 @@ > New to Netdata? Check its demo: **<https://my-netdata.io/>** > -> [![User Base](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=persons&label=user%20base&units=null&value_color=blue&precision=0&v41)](https://registry.my-netdata.io/#netdata_registry) [![Monitored Servers](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=machines&label=servers%20monitored&units=null&value_color=orange&precision=0&v41)](https://registry.my-netdata.io/#netdata_registry) [![Sessions Served](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_sessions&label=sessions%20served&units=null&value_color=yellowgreen&precision=0&v41)](https://registry.my-netdata.io/#netdata_registry) +>[![User +>Base](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=persons&label=user%20base&units=null&value_color=blue&precision=0&v41)](https://registry.my-netdata.io/#netdata_registry) +>[![Monitored +>Servers](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=machines&label=servers%20monitored&units=null&value_color=orange&precision=0&v41)](https://registry.my-netdata.io/#netdata_registry) +>[![Sessions +>Served](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_sessions&label=sessions%20served&units=null&value_color=yellowgreen&precision=0&v41)](https://registry.my-netdata.io/#netdata_registry) > -> [![New Users Today](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=persons&after=-86400&options=unaligned&group=incremental-sum&label=new%20users%20today&units=null&value_color=blue&precision=0&v40)](https://registry.my-netdata.io/#netdata_registry) [![New Machines Today](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=machines&group=incremental-sum&after=-86400&options=unaligned&label=servers%20added%20today&units=null&value_color=orange&precision=0&v40)](https://registry.my-netdata.io/#netdata_registry) [![Sessions Today](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_sessions&after=-86400&group=incremental-sum&options=unaligned&label=sessions%20served%20today&units=null&value_color=yellowgreen&precision=0&v40)](https://registry.my-netdata.io/#netdata_registry) +>[![New Users +>Today](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=persons&after=-86400&options=unaligned&group=incremental-sum&label=new%20users%20today&units=null&value_color=blue&precision=0&v40)](https://registry.my-netdata.io/#netdata_registry) +>[![New Machines +>Today](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_entries&dimensions=machines&group=incremental-sum&after=-86400&options=unaligned&label=servers%20added%20today&units=null&value_color=orange&precision=0&v40)](https://registry.my-netdata.io/#netdata_registry) +>[![Sessions +>Today](https://registry.my-netdata.io/api/v1/badge.svg?chart=netdata.registry_sessions&after=-86400&group=incremental-sum&options=unaligned&label=sessions%20served%20today&units=null&value_color=yellowgreen&precision=0&v40)](https://registry.my-netdata.io/#netdata_registry) --- -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! +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! -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). +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). -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. +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. -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. +The Netdata web API already provides **reduce** functions al |