0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-23 13:00:23 +00:00

fixed README.md links ()

This commit is contained in:
Costa Tsaousis 2018-10-18 19:01:27 +03:00 committed by GitHub
parent e76aac74e6
commit 37dc871a22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 120 additions and 68 deletions
backends
collectors
charts.d.plugin/ap
node.d.plugin
named
sma_webbox
snmp
stiebeleltron
plugins.d
python.d.plugin
sensors
springboot
w1sensor

View file

@ -1,76 +1,100 @@
netdata supports backends for archiving the metrics, or providing long term dashboards, using grafana or other tools, like this:
# Metrics Long Term Archiving
netdata supports backends for archiving the metrics, or providing long term dashboards,
using Grafana or other tools, like this:
![image](https://cloud.githubusercontent.com/assets/2662304/20649711/29f182ba-b4ce-11e6-97c8-ab2c0ab59833.png)
Since netdata collects thousands of metrics per server per second, which would easily congest any backend server when several netdata servers are sending data to it, netdata allows sending metrics at a lower frequency. So, although netdata collects metrics every second, it can send to the backend servers averages or sums every X seconds (though, it can send them per second if you need it to).
Since netdata collects thousands of metrics per server per second, which would easily congest any backend
server when several netdata servers are sending data to it, netdata allows sending metrics at a lower
frequency, by resampling them.
So, although netdata collects metrics every second, it can send to the backend servers averages or sums every
X seconds (though, it can send them per second if you need it to).
## features
1. Supported backends
1. **graphite** (`plaintext interface`, used by **Graphite**, **InfluxDB**, **KairosDB**, **Blueflood**, **ElasticSearch** via logstash tcp input and the graphite codec, etc)
- **graphite** (`plaintext interface`, used by **Graphite**, **InfluxDB**, **KairosDB**,
**Blueflood**, **ElasticSearch** via logstash tcp input and the graphite codec, etc)
metrics are sent to the backend server as `prefix.hostname.chart.dimension`. `prefix` is configured below, `hostname` is the hostname of the machine (can also be configured).
metrics are sent to the backend server as `prefix.hostname.chart.dimension`. `prefix` is
configured below, `hostname` is the hostname of the machine (can also be configured).
2. **opentsdb** (`telnet interface`, used by **OpenTSDB**, **InfluxDB**, **KairosDB**, etc)
- **opentsdb** (`telnet interface`, used by **OpenTSDB**, **InfluxDB**, **KairosDB**, etc)
metrics are sent to opentsdb as `prefix.chart.dimension` with tag `host=hostname`.
metrics are sent to opentsdb as `prefix.chart.dimension` with tag `host=hostname`.
3. **json** document DBs
- **json** document DBs
metrics are sent to a document db, `JSON` formatted.
metrics are sent to a document db, `JSON` formatted.
4. **prometheus** is described at [prometheus page](prometheus/) since it pulls data from netdata.
- **prometheus** is described at [prometheus page](prometheus/) since it pulls data from netdata.
2. Only one backend may be active at a time.
3. All metrics are transferred to the backend - netdata does not implement any metric filtering.
3. Netdata can filter metrics (at the chart level), to send only a subset of the collected metrics.
4. Three modes of operation (for all backends):
1. `as collected`: the latest collected value is sent to the backend. This means that if netdata is configured to send data to the backend every 10 seconds, only 1 out of 10 values will appear at the backend server. The values are sent exactly as collected, before any multipliers or dividers applied and before any interpolation. This mode emulates other data collectors, such as `collectd`.
- `as collected`: the latest collected value is sent to the backend. This means that if netdata
is configured to send data to the backend every 10 seconds, only 1 out of 10 values will appear
at the backend server. The values are sent exactly as collected, before any multipliers or
dividers applied and before any interpolation. This mode emulates other data collectors,
such as `collectd` or `telegraf`.
2. `average`: the average of the interpolated values shown on the netdata graphs is sent to the backend. So, if netdata is configured to send data to the backend server every 10 seconds, the average of the 10 values shown on the netdata charts will be used. **If you can't decide which mode to use, use `average`.**
- `average`: the average of the interpolated values shown on the netdata graphs is sent to the
backend. So, if netdata is configured to send data to the backend server every 10 seconds,
the average of the 10 values shown on the netdata charts will be used. **If you can't decide
which mode to use, use `average`.**
3. `sum` or `volume`: the sum of the interpolated values shown on the netdata graphs is sent to the backend. So, if netdata is configured to send data to the backend every 10 seconds, the sum of the 10 values shown on the netdata charts will be used.
- `sum` or `volume`: the sum of the interpolated values shown on the netdata graphs is sent to
the backend. So, if netdata is configured to send data to the backend every 10 seconds, the
sum of the 10 values shown on the netdata charts will be used.
5. This code is smart enough, not to slow down netdata, independently of the speed of the backend server.
## configuration
In `/etc/netdata/netdata.conf` you should have something like this (if not download the latest version of `netdata.conf` from your netdata):
In `/etc/netdata/netdata.conf` you should have something like this (if not download the latest version
of `netdata.conf` from your netdata):
```
[backend]
enabled = yes | no
type = graphite | opentsdb | json
host tags = list of TAG=VALUE
destination = space separated list of [PROTOCOL:]HOST[:PORT] - the first working will be used
data source = average | sum | as collected
prefix = netdata
hostname = my-name
update every = 10
buffer on failures = 10
timeout ms = 20000
send charts matching = *
send hosts matching = localhost *
send names instead of ids = yes
enabled = yes | no
type = graphite | opentsdb | json
host tags = list of TAG=VALUE
destination = space separated list of [PROTOCOL:]HOST[:PORT] - the first working will be used
data source = average | sum | as collected
prefix = netdata
hostname = my-name
update every = 10
buffer on failures = 10
timeout ms = 20000
send charts matching = *
send hosts matching = localhost *
send names instead of ids = yes
```
- `enabled = yes | no`, enables or disables sending data to a backend
- `type = graphite | opentsdb | json`, selects the backend type
- `destination = host1 host2 host3 ...`, accepts **a space separated list** of hostnames, IPs (IPv4 and IPv6) and ports to connect to. Netdata will use the **first available** to send the metrics.
- `destination = host1 host2 host3 ...`, accepts **a space separated list** of hostnames,
IPs (IPv4 and IPv6) and ports to connect to.
Netdata will use the **first available** to send the metrics.
The format of each item in this list, is: `[PROTOCOL:]IP[:PORT]`.
`PROTOCOL` can be `udp` or `tcp`. `tcp` is the default and only supported by the current backends.
`IP` can be `XX.XX.XX.XX` (IPv4), or `[XX:XX...XX:XX]` (IPv6). For IPv6 you can to enclose the IP in `[]` to separate it from the port.
`IP` can be `XX.XX.XX.XX` (IPv4), or `[XX:XX...XX:XX]` (IPv6).
For IPv6 you can to enclose the IP in `[]` to separate it from the port.
`PORT` can be a number of a service name. If omitted, the default port for the backend will be used (graphite = 2003, opentsdb = 4242).
`PORT` can be a number of a service name. If omitted, the default port for the backend will be used
(graphite = 2003, opentsdb = 4242).
Example IPv4:
@ -84,45 +108,85 @@ In `/etc/netdata/netdata.conf` you should have something like this (if not downl
destination = [ffff:...:0001]:2003 10.11.12.1:2003
```
When multiple servers are defined, netdata will try the next one when the first one fails. This allows you to load-balance different servers: give your backend servers in different order on each netdata.
When multiple servers are defined, netdata will try the next one when the first one fails. This allows
you to load-balance different servers: give your backend servers in different order on each netdata.
netdata also ships [`nc-backend.sh`](https://github.com/netdata/netdata/blob/master/contrib/nc-backend.sh), a script that can be used as a fallback backend to save the metrics to disk and push them to the time-series database when it becomes available again. It can also be used to monitor / trace / debug the metrics netdata generates.
netdata also ships [`nc-backend.sh`](nc-backend.sh),
a script that can be used as a fallback backend to save the metrics to disk and push them to the
time-series database when it becomes available again. It can also be used to monitor / trace / debug
the metrics netdata generates.
- `data source = as collected`, or `data source = average`, or `data source = sum`, selects the kind of data that will be sent to the backend.
- `data source = as collected`, or `data source = average`, or `data source = sum`, selects the kind of
data that will be sent to the backend.
- `hostname = my-name`, is the hostname to be used for sending data to the backend server. By default this is `[global].hostname`.
- `hostname = my-name`, is the hostname to be used for sending data to the backend server. By default
this is `[global].hostname`.
- `prefix = netdata`, is the prefix to add to all metrics.
- `update every = 10`, is the number of seconds between sending data to the backend. netdata will add some randomness to this number, to prevent stressing the backend server when many netdata servers send data to the same backend. This randomness does not affect the quality of the data, only the time they are sent.
- `update every = 10`, is the number of seconds between sending data to the backend. netdata will add
some randomness to this number, to prevent stressing the backend server when many netdata servers send
data to the same backend. This randomness does not affect the quality of the data, only the time they
are sent.
- `buffer on failures = 10`, is the number of iterations (each iteration is `[backend].update every` seconds) to buffer data, when the backend is not available. If the backend fails to receive the data after that many failures, data loss on the backend is expected (netdata will also log it).
- `buffer on failures = 10`, is the number of iterations (each iteration is `[backend].update every` seconds)
to buffer data, when the backend is not available. If the backend fails to receive the data after that
many failures, data loss on the backend is expected (netdata will also log it).
- `timeout ms = 20000`, is the timeout in milliseconds to wait for the backend server to process the data. By default this is `2 * update_every * 1000`.
- `timeout ms = 20000`, is the timeout in milliseconds to wait for the backend server to process the data.
By default this is `2 * update_every * 1000`.
- `send hosts matching = localhost *` includes one or more space separated patterns, using ` * ` as wildcard (any number of times within each pattern). The patterns are checked against the hostname (the localhost is always checked as `localhost`), allowing us to filter which hosts will be sent to the backend when this netdata is a central netdata aggregating multiple hosts. A pattern starting with ` ! ` gives a negative match. So to match all hosts named `*db*` except hosts containing `*slave*`, use `!*slave* *db*` (so, the order is important: the first pattern matching the hostname will be used - positive or negative).
- `send hosts matching = localhost *` includes one or more space separated patterns, using ` * ` as wildcard
(any number of times within each pattern). The patterns are checked against the hostname (the localhost
is always checked as `localhost`), allowing us to filter which hosts will be sent to the backend when
this netdata is a central netdata aggregating multiple hosts. A pattern starting with ` ! ` gives a
negative match. So to match all hosts named `*db*` except hosts containing `*slave*`, use
`!*slave* *db*` (so, the order is important: the first pattern matching the hostname will be used - positive
or negative).
- `send charts matching = *` includes one or more space separated patterns, using ` * ` as wildcard (any number of times within each pattern). The patterns are checked against both chart id and chart name. A pattern starting with ` ! ` gives a negative match. So to match all charts named `apps.*` except charts ending in `*reads`, use `!*reads apps.*` (so, the order is important: the first pattern matching the chart id or the chart name will be used - positive or negative).
- `send charts matching = *` includes one or more space separated patterns, using ` * ` as wildcard (any
number of times within each pattern). The patterns are checked against both chart id and chart name.
A pattern starting with ` ! ` gives a negative match. So to match all charts named `apps.*`
except charts ending in `*reads`, use `!*reads apps.*` (so, the order is important: the first pattern
matching the chart id or the chart name will be used - positive or negative).
- `send names instead of ids = yes | no` controls the metric names netdata should send to backend. netdata supports names and IDs for charts and dimensions. Usually IDs are unique identifiers as read by the system and names are human friendly labels (also unique). Most charts and metrics have the same ID and name, but in several cases they are different: disks with device-mapper, interrupts, QoS classes, statsd synthetic charts, etc.
- `send names instead of ids = yes | no` controls the metric names netdata should send to backend.
netdata supports names and IDs for charts and dimensions. Usually IDs are unique identifiers as read
by the system and names are human friendly labels (also unique). Most charts and metrics have the same
ID and name, but in several cases they are different: disks with device-mapper, interrupts, QoS classes,
statsd synthetic charts, etc.
- `host tags = list of TAG=VALUE` defines tags that should be appended on all metrics for the given host. These are currently only sent to opentsdb and prometheus. Please use the appropriate format for each time-series db. For example opentsdb likes them like `TAG1=VALUE1 TAG2=VALUE2`, but prometheus like `tag1="value1",tag2="value2"`. Host tags are mirrored with database replication (streaming of metrics between netdata servers).
- `host tags = list of TAG=VALUE` defines tags that should be appended on all metrics for the given host.
These are currently only sent to opentsdb and prometheus. Please use the appropriate format for each
time-series db. For example opentsdb likes them like `TAG1=VALUE1 TAG2=VALUE2`, but prometheus like
`tag1="value1",tag2="value2"`. Host tags are mirrored with database replication (streaming of metrics
between netdata servers).
## monitoring operation
netdata provides 5 charts:
1. **Buffered metrics**, the number of metrics netdata added to the buffer for dispatching them to the backend server.
1. **Buffered metrics**, the number of metrics netdata added to the buffer for dispatching them to the
backend server.
2. **Buffered data size**, the amount of data (in KB) netdata added the buffer.
3. ~~**Backend latency**, the time the backend server needed to process the data netdata sent. If there was a re-connection involved, this includes the connection time.~~ (this chart has been removed, because it only measures the time netdata needs to give the data to the O/S - since the backend servers do not ack the reception, netdata does not have any means to measure this properly)
3. ~~**Backend latency**, the time the backend server needed to process the data netdata sent.
If there was a re-connection involved, this includes the connection time.~~
(this chart has been removed, because it only measures the time netdata needs to give the data
to the O/S - since the backend servers do not ack the reception, netdata does not have any means
to measure this properly).
4. **Backend operations**, the number of operations performed by netdata.
5. **Backend thread CPU usage**, the CPU resources consumed by the netdata thread, that is responsible for sending the metrics to the backend server.
5. **Backend thread CPU usage**, the CPU resources consumed by the netdata thread, that is responsible
for sending the metrics to the backend server.
![image](https://cloud.githubusercontent.com/assets/2662304/20463536/eb196084-af3d-11e6-8ee5-ddbd3b4d8449.png)
## alarms
The latest version of the alarms configuration for monitoring the backend is here: https://github.com/netdata/netdata/blob/master/conf.d/health.d/backend.conf
The latest version of the alarms configuration for monitoring the backend is [here](../health/health.d/backend.conf)
netdata adds 4 alarms:
@ -133,5 +197,3 @@ netdata adds 4 alarms:
![image](https://cloud.githubusercontent.com/assets/2662304/20463779/a46ed1c2-af43-11e6-91a5-07ca4533cac3.png)
## InfluxDB setup as netdata backend (example)
You can find blog post with example: how to use InfluxDB with netdata [here](https://blog.hda.me/2017/01/09/using-netdata-with-influxdb-backend.html)

View file

@ -2,8 +2,6 @@
The `ap` collector visualizes data related to access points.
The source code is [here](https://github.com/netdata/netdata/blob/master/charts.d/ap.chart.sh).
## Example netdata charts
![image](https://cloud.githubusercontent.com/assets/2662304/12377654/9f566e88-bd2d-11e5-855a-e0ba96b8fd98.png)

View file

@ -2,8 +2,6 @@
Using this netdata collector, you can monitor one or more ISC Bind servers.
The source code for this plugin in [here](https://github.com/netdata/netdata/blob/master/node.d/named.node.js).
## Example netdata charts
Depending on the number of views your bind has, you may get a large number of charts.

View file

@ -1,5 +1,5 @@
[SMA Sunny Webbox](http://www.solar-is-future.com/sma-technology-for-our-future/products/sunny-webbox/index.html)
[SMA Sunny Webbox](http://files.sma.de/dl/4253/WEBBOX-DUS131916W.pdf)
Example netdata configuration for node.d/sma_webbox.conf

View file

@ -10,8 +10,6 @@ This collector supports:
- each SNMP device may have a different update frequency
- each SNMP device will accept one or more batches to report values (you can set `max_request_size` per SNMP server, to control the size of batches).
The source code of the plugin is [here](https://github.com/netdata/netdata/blob/master/node.d/snmp.node.js).
## Configuration
You will need to create the file `/etc/netdata/node.d/snmp.conf` with data like the following.
@ -23,7 +21,7 @@ In this example:
- we will update the values every 10 seconds (`update_every: 10` under the server `10.11.12.8`).
- we define 2 charts `snmp_switch.bandwidth_port1` and `snmp_switch.bandwidth_port2`, each having 2 dimensions: `in` and `out`.
```js
```json
{
"enable_autodetect": false,
"update_every": 5,
@ -105,7 +103,7 @@ Each of the 24 new charts will have its id (1-24) appended at:
3. its `oid` (for all dimensions), i.e. dimension `in` will be `1.3.6.1.2.1.2.2.1.10.1` to `1.3.6.1.2.1.2.2.1.10.24`
3. its priority (which will be incremented for each chart so that the charts will appear on the dashboard in this order)
```js
```json
{
"enable_autodetect": false,
"update_every": 10,
@ -210,7 +208,7 @@ This switch also reports various other metrics, like snmp, packets per port, etc
This switch has a very slow SNMP processors. To respond, it needs about 8 seconds, so I have set the refresh frequency (`update_every`) to 15 seconds.
```js
```json
{
"enable_autodetect": false,
"update_every": 5,

View file

@ -46,8 +46,6 @@ The charts are configurable, however, the provided default configuration collect
### configuration
The default configuration is provided in [netdata/conf.d/node.d/stiebeleltron.conf.md](https://github.com/netdata/netdata/blob/master/conf.d/node.d/stiebeleltron.conf.md). Just change the `update_every` (if necessary) and hostnames. **You may have to adapt the configuration to suit your needs and setup** (which might be different).
If no configuration is given, the module will be disabled. Each `update_every` is optional, the default is `10`.
---
@ -78,7 +76,7 @@ In my case, the ISG is relatively slow with responding (at least 1s, but also up
* The dimensions support variable digits, the default is `1`. Most of the values printed by ISG are using 1 digit, some use 2.
* The dimensions also support the `multiplier` and `divisor` attributes, however the divisor gets overridden by `digits`, if specified. Default is `1`.
* The test string for the regex is always the whole HTML output from the url. For each parameter you need to have a regular expression that extracts the value from the HTML source in the first capture group.
Recommended: [regexr.com](regexr.com) for testing and matching, [freeformatter.com](https://www.freeformatter.com/json-escape.html) for escaping the newly created regex for the JSON config.
Recommended: [regexr.com](https://regexr.com/) for testing and matching, [freeformatter.com](https://www.freeformatter.com/json-escape.html) for escaping the newly created regex for the JSON config.
The charts are being generated using the configuration below. So if your installation is in another language or has other metrics, just adapt the structure or regexes.
### Configuration template

View file

@ -374,15 +374,15 @@ or do not output the line at all.
## Modular Plugins
1. **python**, use `python.d.plugin`, there are many examples in the [python.d directory](https://github.com/netdata/netdata/tree/master/python.d)
1. **python**, use `python.d.plugin`, there are many examples in the [python.d directory](../python.d.plugin)
python is ideal for netdata plugins. It is a simple, yet powerful way to collect data, it has a very small memory footprint, although it is not the most CPU efficient way to do it.
2. **node.js**, use `node.d.plugin`, there are a few examples in the [node.d directory](https://github.com/netdata/netdata/tree/master/node.d)
2. **node.js**, use `node.d.plugin`, there are a few examples in the [node.d directory](../node.d.plugin)
node.js is the fastest scripting language for collecting data. If your plugin needs to do a lot of work, compute values, etc, node.js is probably the best choice before moving to compiled code. Keep in mind though that node.js is not memory efficient; it will probably need more RAM compared to python.
3. **BASH**, use `charts.d.plugin`, there are many examples in the [charts.d directory](https://github.com/netdata/netdata/tree/master/charts.d)
3. **BASH**, use `charts.d.plugin`, there are many examples in the [charts.d directory](../charts.d.plugin)
BASH is the simplest scripting language for collecting values. It is the less efficient though in terms of CPU resources. You can use it to collect data quickly, but extensive use of it might use a lot of system resources.
@ -390,8 +390,6 @@ or do not output the line at all.
Of course, C is the most efficient way of collecting data. This is why netdata itself is written in C.
5. **Nim**, there is an unofficial [nim plugin helper](https://github.com/FedericoCeratto/nim-netdata-plugin)
---
## Writing Plugins Properly

View file

@ -6,7 +6,7 @@ Charts are created dynamically.
### configuration
For detailed configuration information please read [`sensors.conf`](https://github.com/netdata/netdata/blob/master/conf.d/python.d/sensors.conf) file.
For detailed configuration information please read [`sensors.conf`](sensors.conf) file.
### possible issues

View file

@ -126,4 +126,4 @@ You can disable the default charts by set `defaults.<chart-id>: false`.
The dimension name of extras charts should replace `.` to `_`.
Please check [springboot.conf](https://github.com/netdata/netdata/blob/master/conf.d/python.d/springboot.conf) for more examples.
Please check [springboot.conf](springboot.conf) for more examples.

View file

@ -8,6 +8,6 @@ Charts are created dynamically based on the number of detected sensors.
### configuration
For detailed configuration information please read [`w1sensor.conf`](https://github.com/netdata/netdata/blob/master/conf.d/python.d/w1sensor.conf) file.
For detailed configuration information please read [`w1sensor.conf`](w1sensor.conf) file.
---