| 1 | # Netdata ini config files |
| 2 | |
| 3 | Configuration files `netdata.conf` and `stream.conf` are Netdata ini files. |
| 4 | |
| 5 | ## Motivation |
| 6 | |
| 7 | The whole idea came up when we were evaluating the documentation involved |
| 8 | in maintaining a complex configuration system. Our intention was to give |
| 9 | configuration options for everything imaginable. But then, documenting all |
| 10 | these options would require a tremendous amount of time, users would have |
| 11 | to search through endless pages for the option they need, etc. |
| 12 | |
| 13 | We concluded then that **configuring software like that is a waste of time |
| 14 | and effort**. Of course there must be plenty of configuration options, but |
| 15 | the implementation itself should require a lot less effort for both the |
| 16 | developers and the users. |
| 17 | |
| 18 | So, we did this: |
| 19 | |
| 20 | 1. No configuration is required to run Netdata |
| 21 | 2. There are plenty of options to tweak |
| 22 | 3. There is minimal documentation (or no at all) |
| 23 | |
| 24 | ## Why this works? |
| 25 | |
| 26 | The configuration file is a `name = value` dictionary with `[sections]`. |
| 27 | Write whatever you like there as long as it follows this simple format. |
| 28 | |
| 29 | Netdata loads this dictionary and then when the code needs a value from |
| 30 | it, it just looks up the `name` in the dictionary at the proper `section`. |
| 31 | In all places, in the code, there are both the `names` and their |
| 32 | `default values`, so if something is not found in the configuration |
| 33 | file, the default is used. The lookup is made using B-Trees and hashes |
| 34 | (no string comparisons), so they are super fast. Also the `names` of the |
| 35 | settings can be `my super duper setting that once set to yes, will turn the world upside down = no` |
| 36 | |
| 37 | - so goodbye to most of the documentation involved. |
| 38 | |
| 39 | Next, Netdata can generate a valid configuration for the user to edit. |
| 40 | No need to remember anything or copy and paste settings. Just get the |
| 41 | configuration from the server (`/netdata.conf` on your Netdata server), |
| 42 | edit it and save it. |
| 43 | |
| 44 | Last, what about options you believe you have set, but you misspelled? |
| 45 | When you get the configuration file from the server, there will be a |
| 46 | comment above all `name = value` pairs the server does not use. |
| 47 | So you know that whatever you wrote there, is not used. |
| 48 | |
| 49 |