@cryptotaxi247 / netdata-1 / commits / 8a1a437e7

Chart name streaming (#6304)

* Update name when it is changed * Add info about custom chart names on slaves

Vladimir Kobal committed Jun 19, 2019 at 09:32 UTC 8a1a437e756a32166a798595927bc4bf73b7bb92
2 files changed +20 -12
database/rrdset.c
+6
@@ -511,6 +511,12 @@ RRDSET *rrdset_create_custom(
511 if(st) {
512 rrdset_flag_set(st, RRDSET_FLAG_SYNC_CLOCK);
513 rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_EXPOSED);
514 +
515 + if(unlikely(name))
516 + rrdset_set_name(st, name);
517 + else
518 + rrdset_set_name(st, id);
519 +
520 return st;
521 }
522
streaming/README.md
+14 -12
@@ -18,7 +18,7 @@ a netdata performs:
18 Local netdata (`slave`), **without any database or alarms**, collects metrics and sends them to
19 another netdata (`master`).
20
21 -The node menu shows a list of all "databases streamed to" the master. Clicking one of those links allows the user to view the full dashboard of the `slave` netdata. The URL has the form http://master-host:master-port/host/slave-host/.
21 +The node menu shows a list of all "databases streamed to" the master. Clicking one of those links allows the user to view the full dashboard of the `slave` netdata. The URL has the form http://master-host:master-port/host/slave-host/.
22
23 Alarms for the `slave` are served by the `master`.
24
@@ -41,6 +41,8 @@ The `slave` and the `master` may have different data retention policies for the
41 Alarms for the `slave` are triggered by **both** the `slave` and the `master` (and actually
42 each can have different alarms configurations or have alarms disabled).
43
44 +Take a note, that custom chart names, configured on the `slave`, should be in the form `type.name` to work correctly. The `master` will truncate the `type` part and substitute the original chart `type` to store the name in the database.
45 +
46 ### netdata proxies
47
48 Local netdata (`slave`), with or without a database, collects metrics and sends them to another
@@ -81,14 +83,14 @@ monitoring (there cannot be health monitoring without a database).
83
84 ```
85 [web]
84 - mode = none | static-threaded
85 - accept a streaming request every seconds = 0
86 + mode = none | static-threaded
87 + accept a streaming request every seconds = 0
88 ```
89
90 `[web].mode = none` disables the API (netdata will not listen to any ports).
91 This also disables the registry (there cannot be a registry without an API).
92
91 -`accept a streaming request every seconds` can be used to set a limit on how often a master Netdata server will accept streaming requests from the slaves. 0 sets no limit, 1 means maximum once every second. If this is set, you may see error log entries "... too busy to accept new streaming request. Will be allowed in X secs".
93 +`accept a streaming request every seconds` can be used to set a limit on how often a master Netdata server will accept streaming requests from the slaves. 0 sets no limit, 1 means maximum once every second. If this is set, you may see error log entries "... too busy to accept new streaming request. Will be allowed in X secs".
94
95 ```
96 [backend]
@@ -326,13 +328,13 @@ On the master, edit `/etc/netdata/stream.conf` (to edit it on your system run `/
328 [11111111-2222-3333-4444-555555555555]
329 # enable/disable this API key
330 enabled = yes
329 -
331 +
332 # one hour of data for each of the slaves
333 default history = 3600
332 -
334 +
335 # do not save slave metrics on disk
336 default memory = ram
335 -
337 +
338 # alarms checks, only while the slave is connected
339 health enabled by default = auto
340 ```
@@ -342,9 +344,9 @@ If you used many API keys, you can add one such section for each API key.
344
345 When done, restart netdata on the `master` node. It is now ready to receive metrics.
346
345 -Note that `health enabled by default = auto` will still trigger `last_collected` alarms, if a connected slave does not exit gracefully. If the netdata running on the slave is
346 -stopped, it will close the connection to the master, ensuring that no `last_collected` alarms are triggered. For example, a proper container restart would first terminate
347 -the netdata process, but a system power issue would leave the connection open on the master side. In the second case, you will still receive alarms.
347 +Note that `health enabled by default = auto` will still trigger `last_collected` alarms, if a connected slave does not exit gracefully. If the netdata running on the slave is
348 +stopped, it will close the connection to the master, ensuring that no `last_collected` alarms are triggered. For example, a proper container restart would first terminate
349 +the netdata process, but a system power issue would leave the connection open on the master side. In the second case, you will still receive alarms.
350
351 #### Configuring the `slaves`
352
@@ -354,10 +356,10 @@ On each of the slaves, edit `/etc/netdata/stream.conf` (to edit it on your syste
356 [stream]
357 # stream metrics to another netdata
358 enabled = yes
357 -
359 +
360 # the IP and PORT of the master
361 destination = 10.11.12.13:19999
360 -
362 +
363 # the API key to use
364 api key = 11111111-2222-3333-4444-555555555555
365 ```