Change streaming terminology to parent-child in the code (#9323)
Andrew Moss committed
Jun 12, 2020 at 17:49 UTC
68f1888227bac1602d8777742995e0276bf05510
38 files changed
+109
-377
build_external/scenarios/aclk-testing/agent-compose.yml
+1
-1
@@ -1,6 +1,6 @@
1
version: '3.3'
2
services:
3
- agent_master:
3
+ agent_parent:
4
build:
5
context: ../../..
6
dockerfile: build_external/make-install.Dockerfile
build_external/scenarios/aclk-testing/agent-valgrind-compose.yml
+1
-1
@@ -1,6 +1,6 @@
1
version: '3.3'
2
services:
3
- agent_master:
3
+ agent_parent:
4
build:
5
context: ../../..
6
dockerfile: build_external/make-install.Dockerfile
build_external/scenarios/gaps_hi/child-compose.yml
renamed
+3
-3
@@ -1,13 +1,13 @@
1
version: '3.3'
2
services:
3
- agent_slave:
3
+ agent_child:
4
image: debian_10_dev
5
command: /usr/sbin/netdata -D
6
#ports:
7
#- 21002+:19999
8
volumes:
9
- - ./slave_stream.conf:/etc/netdata/stream.conf:ro
10
- #- ./slave_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
9
+ - ./child_stream.conf:/etc/netdata/stream.conf:ro
10
+ #- ./child_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
11
- ./min.conf:/etc/netdata/netdata.conf:ro
12
cap_add:
13
- SYS_PTRACE
build_external/scenarios/gaps_hi/child_guid
renamed
build_external/scenarios/gaps_hi/child_stream.conf
renamed
build_external/scenarios/gaps_hi/master-compose.yml
deleted
-13
@@ -1,13 +0,0 @@
1
-version: '3.3'
2
-services:
3
- agent_master:
4
- image: debian_10_dev
5
- command: /usr/sbin/netdata -D
6
- ports:
7
- - 21000:19999
8
- volumes:
9
- - ./master_stream.conf:/etc/netdata/stream.conf:ro
10
- - ./master_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
11
- - ./min.conf:/etc/netdata/netdata.conf:ro
12
- cap_add:
13
- - SYS_PTRACE
build_external/scenarios/gaps_hi/middle-compose.yml
+1
-1
@@ -4,7 +4,7 @@ services:
4
image: debian_10_dev
5
command: /usr/sbin/netdata -D
6
ports:
7
- - 21001:19999
7
+ - 21001:19999
8
volumes:
9
- ./middle_stream.conf:/etc/netdata/stream.conf:ro
10
- ./middle_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
build_external/scenarios/gaps_hi/middle_stream.conf
+1
-1
@@ -1,6 +1,6 @@
1
[stream]
2
enabled = yes
3
- destination = tcp:agent_master
3
+ destination = tcp:agent_parent
4
api key = 00000000-0000-0000-0000-000000000000
5
timeout seconds = 60
6
default port = 19999
build_external/scenarios/gaps_hi/parent-compose.yml
new
+13
@@ -0,0 +1,13 @@
1
+version: '3.3'
2
+services:
3
+ agent_parent:
4
+ image: debian_10_dev
5
+ command: /usr/sbin/netdata -D
6
+ ports:
7
+ - 21000:19999
8
+ volumes:
9
+ - ./parent_stream.conf:/etc/netdata/stream.conf:ro
10
+ - ./parent_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
11
+ - ./min.conf:/etc/netdata/netdata.conf:ro
12
+ cap_add:
13
+ - SYS_PTRACE
build_external/scenarios/gaps_hi/parent_guid
renamed
build_external/scenarios/gaps_hi/parent_stream.conf
renamed
build_external/scenarios/gaps_lo/child-compose.yml
renamed
+4
-4
@@ -1,15 +1,15 @@
1
version: '3.3'
2
services:
3
- agent_slave:
3
+ agent_child:
4
image: arch_extras_dev
5
#command: /usr/sbin/valgrind --leak-check=full /usr/sbin/netdata -D
6
command: /usr/sbin/netdata -D # gdb does not like valgrind !
7
#ports:
8
#- 21002:19999
9
volumes:
10
- - ./slave_stream.conf:/etc/netdata/stream.conf:ro
11
-# - ./slave_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
10
+ - ./child_stream.conf:/etc/netdata/stream.conf:ro
11
+ # - ./child_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
12
- ./mostly_off.conf:/etc/netdata/netdata.conf:ro
13
cap_add:
14
- - SYS_PTRACE
14
+ - SYS_PTRACE
15
build_external/scenarios/gaps_lo/child_guid
renamed
build_external/scenarios/gaps_lo/child_stream.conf
renamed
+1
-1
@@ -1,5 +1,5 @@
1
[stream]
2
- # Enable this on slaves, to have them send metrics.
2
+ # Enable this on child nodes, to have them send metrics.
3
enabled = yes
4
destination = tcp:192.168.1.2
5
api key = 00000000-0000-0000-0000-000000000000
build_external/scenarios/gaps_lo/master-compose.yml
deleted
-13
@@ -1,13 +0,0 @@
1
-version: '3.3'
2
-services:
3
- agent_master:
4
- image: debian_10_dev
5
- command: /usr/sbin/netdata -D
6
- ports:
7
- - 21000:19999
8
- volumes:
9
- - ./master_stream.conf:/etc/netdata/stream.conf:ro
10
- - ./master_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
11
- - ./mostly_off.conf:/etc/netdata/netdata.conf:ro
12
- cap_add:
13
- - SYS_PTRACE
build_external/scenarios/gaps_lo/middle-compose.yml
+2
-2
@@ -5,10 +5,10 @@ services:
5
#command: /usr/sbin/valgrind --leak-check=full /usr/sbin/netdata -D
6
command: /usr/sbin/netdata -D
7
ports:
8
- - 21001:19999
8
+ - 21001:19999
9
volumes:
10
- ./middle_stream.conf:/etc/netdata/stream.conf:ro
11
- ./middle_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
12
- ./mostly_off.conf:/etc/netdata/netdata.conf:ro
13
cap_add:
14
- - SYS_PTRACE
14
+ - SYS_PTRACE
build_external/scenarios/gaps_lo/middle_stream.conf
+1
-1
@@ -1,6 +1,6 @@
1
[stream]
2
enabled = yes
3
- destination = tcp:agent_master
3
+ destination = tcp:agent_parent
4
api key = 00000000-0000-0000-0000-000000000000
5
timeout seconds = 60
6
default port = 19999
build_external/scenarios/gaps_lo/parent-compose.yml
new
+13
@@ -0,0 +1,13 @@
1
+version: '3.3'
2
+services:
3
+ agent_parent:
4
+ image: debian_10_dev
5
+ command: /usr/sbin/netdata -D
6
+ ports:
7
+ - 21000:19999
8
+ volumes:
9
+ - ./parent_stream.conf:/etc/netdata/stream.conf:ro
10
+ - ./parent_guid:/var/lib/netdata/registry/netdata.public.unique.id:ro
11
+ - ./mostly_off.conf:/etc/netdata/netdata.conf:ro
12
+ cap_add:
13
+ - SYS_PTRACE
build_external/scenarios/gaps_lo/parent_guid
renamed
build_external/scenarios/gaps_lo/parent_stream.conf
renamed
build_external/scenarios/master-slaves/master_stream.conf
deleted
-140
@@ -1,140 +0,0 @@
1
-# netdata configuration for aggregating data from remote hosts
2
-#
3
-# API keys authorize a pair of sending-receiving netdata servers.
4
-# Once their communication is authorized, they can exchange metrics for any
5
-# number of hosts.
6
-#
7
-# You can generate API keys, with the linux command: uuidgen
8
-
9
-
10
-
11
-# -----------------------------------------------------------------------------
12
-# 2. ON MASTER NETDATA - THE ONE THAT WILL BE RECEIVING METRICS
13
-
14
-# You can have one API key per slave,
15
-# or the same API key for all slaves.
16
-#
17
-# netdata searches for options in this order:
18
-#
19
-# a) master netdata settings (netdata.conf)
20
-# b) [stream] section (above)
21
-# c) [API_KEY] section (below, settings for the API key)
22
-# d) [MACHINE_GUID] section (below, settings for each machine)
23
-#
24
-# You can combine the above (the more specific setting will be used).
25
-
26
-# API key authentication
27
-# If the key is not listed here, it will not be able to push metrics.
28
-
29
-# [API_KEY] is [YOUR-API-KEY], i.e [11111111-2222-3333-4444-555555555555]
30
-[00000000-0000-0000-0000-000000000000]
31
- # Default settings for this API key
32
-
33
- # You can disable the API key, by setting this to: no
34
- # The default (for unknown API keys) is: no
35
- enabled = yes
36
-
37
- # A list of simple patterns matching the IPs of the servers that
38
- # will be pushing metrics using this API key.
39
- # The metrics are received via the API port, so the same IPs
40
- # should also be matched at netdata.conf [web].allow connections from
41
- allow from = *
42
-
43
- # The default history in entries, for all hosts using this API key.
44
- # You can also set it per host below.
45
- # If you don't set it here, the history size of the central netdata
46
- # will be used.
47
- default history = 3600
48
-
49
- # The default memory mode to be used for all hosts using this API key.
50
- # You can also set it per host below.
51
- # If you don't set it here, the memory mode of netdata.conf will be used.
52
- # Valid modes:
53
- # save save on exit, load on start
54
- # map like swap (continuously syncing to disks - you need SSD)
55
- # ram keep it in RAM, don't touch the disk
56
- # none no database at all (use this on headless proxies)
57
- # dbengine like a traditional database
58
- # default memory mode = ram
59
-
60
- # Shall we enable health monitoring for the hosts using this API key?
61
- # 3 possible values:
62
- # yes enable alarms
63
- # no do not enable alarms
64
- # auto enable alarms, only when the sending netdata is connected. For ephemeral slaves or slave system restarts,
65
- # ensure that the netdata process on the slave is gracefully stopped, to prevent invalid last_collected alarms
66
- # You can also set it per host, below.
67
- # The default is taken from [health].enabled of netdata.conf
68
- health enabled by default = auto
69
-
70
- # postpone alarms for a short period after the sender is connected
71
- default postpone alarms on connect seconds = 60
72
-
73
- # allow or deny multiple connections for the same host?
74
- # If you are sure all your netdata have their own machine GUID,
75
- # set this to 'allow', since it allows faster reconnects.
76
- # When set to 'deny', new connections for a host will not be
77
- # accepted until an existing connection is cleared.
78
- multiple connections = allow
79
-
80
- # need to route metrics differently? set these.
81
- # the defaults are the ones at the [stream] section (above)
82
- #default proxy enabled = yes | no
83
- #default proxy destination = IP:PORT IP:PORT ...
84
- #default proxy api key = API_KEY
85
- #default proxy send charts matching = *
86
-
87
-
88
-# -----------------------------------------------------------------------------
89
-# 3. PER SENDING HOST SETTINGS, ON MASTER NETDATA
90
-# THIS IS OPTIONAL - YOU DON'T HAVE TO CONFIGURE IT
91
-
92
-# This section exists to give you finer control of the master settings for each
93
-# slave host, when the same API key is used by many netdata slaves / proxies.
94
-#
95
-# Each netdata has a unique GUID - generated the first time netdata starts.
96
-# You can find it at /var/lib/netdata/registry/netdata.public.unique.id
97
-# (at the slave).
98
-#
99
-# The host sending data will have one. If the host is not ephemeral,
100
-# you can give settings for each sending host here.
101
-
102
-[MACHINE_GUID]
103
- # enable this host: yes | no
104
- # When disabled, the master will not receive metrics for this host.
105
- # THIS IS NOT A SECURITY MECHANISM - AN ATTACKER CAN SET ANY OTHER GUID.
106
- # Use only the API key for security.
107
- enabled = no
108
-
109
- # A list of simple patterns matching the IPs of the servers that
110
- # will be pushing metrics using this MACHINE GUID.
111
- # The metrics are received via the API port, so the same IPs
112
- # should also be matched at netdata.conf [web].allow connections from
113
- # and at stream.conf [API_KEY].allow from
114
- allow from = *
115
-
116
- # The number of entries in the database
117
- history = 3600
118
-
119
- # The memory mode of the database: save | map | ram | none | dbengine
120
- memory mode = save
121
-
122
- # Health / alarms control: yes | no | auto
123
- health enabled = yes
124
-
125
- # postpone alarms when the sender connects
126
- postpone alarms on connect seconds = 60
127
-
128
- # allow or deny multiple connections for the same host?
129
- # If you are sure all your netdata have their own machine GUID,
130
- # set this to 'allow', since it allows faster reconnects.
131
- # When set to 'deny', new connections for a host will not be
132
- # accepted until an existing connection is cleared.
133
- multiple connections = allow
134
-
135
- # need to route metrics differently?
136
- # the defaults are the ones at the [API KEY] section
137
- #proxy enabled = yes | no
138
- #proxy destination = IP:PORT IP:PORT ...
139
- #proxy api key = API_KEY
140
- #proxy send charts matching = *
build_external/scenarios/master-slaves/slave_stream.conf
deleted
-144
@@ -1,144 +0,0 @@
1
-# netdata configuration for aggregating data from remote hosts
2
-#
3
-# API keys authorize a pair of sending-receiving netdata servers.
4
-# Once their communication is authorized, they can exchange metrics for any
5
-# number of hosts.
6
-#
7
-# You can generate API keys, with the linux command: uuidgen
8
-
9
-
10
-# -----------------------------------------------------------------------------
11
-# 1. ON SLAVE NETDATA - THE ONE THAT WILL BE SENDING METRICS
12
-
13
-[stream]
14
- # Enable this on slaves, to have them send metrics.
15
- enabled = yes
16
-
17
- # Where is the receiving netdata?
18
- # A space separated list of:
19
- #
20
- # [PROTOCOL:]HOST[%INTERFACE][:PORT][:SSL]
21
- #
22
- # If many are given, the first available will get the metrics.
23
- #
24
- # PROTOCOL = tcp, udp, or unix (only tcp and unix are supported by masters)
25
- # HOST = an IPv4, IPv6 IP, or a hostname, or a unix domain socket path.
26
- # IPv6 IPs should be given with brackets [ip:address]
27
- # INTERFACE = the network interface to use (only for IPv6)
28
- # PORT = the port number or service name (/etc/services)
29
- # SSL = when this word appear at the end of the destination string
30
- # the Netdata will do encrypt connection with the master.
31
- #
32
- # This communication is not HTTP (it cannot be proxied by web proxies).
33
- destination = tcp:agent_master
34
-
35
- # Skip Certificate verification?
36
- #
37
- # The netdata slave is configurated to avoid invalid SSL/TLS certificate,
38
- # so certificates that are self-signed or expired will stop the streaming.
39
- # Case the server certificate is not valid, you can enable the use of
40
- # 'bad' certificates setting the next option as 'yes'.
41
- #
42
- #ssl skip certificate verification = yes
43
-
44
- # Certificate Authority Path
45
- #
46
- # OpenSSL has a default directory where the known certificates are stored,
47
- # case it is necessary it is possible to change this rule using the variable
48
- # "CApath"
49
- #
50
- #CApath = /etc/ssl/certs/
51
-
52
- # Certificate Authority file
53
- #
54
- # When the Netdata master has certificate, that is not recognized as valid,
55
- # we can add this certificate in the list of known certificates in CApath
56
- # and give for Netdata as argument.
57
- #
58
- #CAfile = /etc/ssl/certs/cert.pem
59
-
60
- # The API_KEY to use (as the sender)
61
- api key = 00000000-0000-0000-0000-000000000000
62
-
63
- # The timeout to connect and send metrics
64
- timeout seconds = 60
65
-
66
- # If the destination line above does not specify a port, use this
67
- default port = 19999
68
-
69
- # filter the charts to be streamed
70
- # netdata SIMPLE PATTERN:
71
- # - space separated list of patterns (use \ to include spaces in patterns)
72
- # - use * as wildcard, any number of times within each pattern
73
- # - prefix a pattern with ! for a negative match (ie not stream the charts it matches)
74
- # - the order of patterns is important (left to right)
75
- # To send all except a few, use: !this !that * (ie append a wildcard pattern)
76
- send charts matching = *
77
-
78
- # The buffer to use for sending metrics.
79
- # 1MB is good for 10-20 seconds of data, so increase this if you expect latencies.
80
- # The buffer is flushed on reconnects (this will not prevent gaps at the charts).
81
- buffer size bytes = 1048576
82
-
83
- # If the connection fails, or it disconnects,
84
- # retry after that many seconds.
85
- reconnect delay seconds = 5
86
-
87
- # Sync the clock of the charts for that many iterations, when starting.
88
- initial clock resync iterations = 60
89
-
90
-
91
-
92
-# -----------------------------------------------------------------------------
93
-# 3. PER SENDING HOST SETTINGS, ON MASTER NETDATA
94
-# THIS IS OPTIONAL - YOU DON'T HAVE TO CONFIGURE IT
95
-
96
-# This section exists to give you finer control of the master settings for each
97
-# slave host, when the same API key is used by many netdata slaves / proxies.
98
-#
99
-# Each netdata has a unique GUID - generated the first time netdata starts.
100
-# You can find it at /var/lib/netdata/registry/netdata.public.unique.id
101
-# (at the slave).
102
-#
103
-# The host sending data will have one. If the host is not ephemeral,
104
-# you can give settings for each sending host here.
105
-
106
-[MACHINE_GUID]
107
- # enable this host: yes | no
108
- # When disabled, the master will not receive metrics for this host.
109
- # THIS IS NOT A SECURITY MECHANISM - AN ATTACKER CAN SET ANY OTHER GUID.
110
- # Use only the API key for security.
111
- enabled = no
112
-
113
- # A list of simple patterns matching the IPs of the servers that
114
- # will be pushing metrics using this MACHINE GUID.
115
- # The metrics are received via the API port, so the same IPs
116
- # should also be matched at netdata.conf [web].allow connections from
117
- # and at stream.conf [API_KEY].allow from
118
- allow from = *
119
-
120
- # The number of entries in the database
121
- history = 3600
122
-
123
- # The memory mode of the database: save | map | ram | none | dbengine
124
- memory mode = save
125
-
126
- # Health / alarms control: yes | no | auto
127
- health enabled = yes
128
-
129
- # postpone alarms when the sender connects
130
- postpone alarms on connect seconds = 60
131
-
132
- # allow or deny multiple connections for the same host?
133
- # If you are sure all your netdata have their own machine GUID,
134
- # set this to 'allow', since it allows faster reconnects.
135
- # When set to 'deny', new connections for a host will not be
136
- # accepted until an existing connection is cleared.
137
- multiple connections = allow
138
-
139
- # need to route metrics differently?
140
- # the defaults are the ones at the [API KEY] section
141
- #proxy enabled = yes | no
142
- #proxy destination = IP:PORT IP:PORT ...
143
- #proxy api key = API_KEY
144
- #proxy send charts matching = *
build_external/scenarios/parent-child/child_stream.conf
new
+10
@@ -0,0 +1,10 @@
1
+[stream]
2
+ enabled = yes
3
+ destination = tcp:agent_parent
4
+ api key = 00000000-0000-0000-0000-000000000000
5
+ timeout seconds = 60
6
+ default port = 19999
7
+ send charts matching = *
8
+ buffer size bytes = 1048576
9
+ reconnect delay seconds = 5
10
+ initial clock resync iterations = 60
build_external/scenarios/parent-child/docker-compose.yml
renamed
+7
-7
@@ -1,23 +1,23 @@
1
version: '3.3'
2
services:
3
- agent_master:
3
+ agent_parent:
4
image: debian_10_dev
5
command: /usr/sbin/netdata -D
6
ports:
7
- - 20000:19999
7
+ - 20000:19999
8
volumes:
9
- - ./master_stream.conf:/etc/netdata/stream.conf:ro
10
- agent_slave1:
9
+ - ./parent_stream.conf:/etc/netdata/stream.conf:ro
10
+ agent_child1:
11
image: debian_9_dev
12
command: /usr/sbin/netdata -D
13
#ports: Removed to allow scaling
14
#- 20001:19999
15
volumes:
16
- - ./slave_stream.conf:/etc/netdata/stream.conf:ro
17
- agent_slave2:
16
+ - ./child_stream.conf:/etc/netdata/stream.conf:ro
17
+ agent_child2:
18
image: fedora_30_dev
19
command: /usr/sbin/netdata -D
20
#ports: Removed to allow scaling
21
#- 20002:19999
22
volumes:
23
- - ./slave_stream.conf:/etc/netdata/stream.conf:ro
23
+ - ./child_stream.conf:/etc/netdata/stream.conf:ro
build_external/scenarios/parent-child/parent_stream.conf
new
+7
@@ -0,0 +1,7 @@
1
+[00000000-0000-0000-0000-000000000000]
2
+ enabled = yes
3
+ allow from = *
4
+ default history = 3600
5
+ health enabled by default = auto
6
+ default postpone alarms on connect seconds = 60
7
+ multiple connections = allow
collectors/plugins.d/pluginsd_parser.c
+1
-2
@@ -306,7 +306,7 @@ PARSER_RC pluginsd_chart(char **words, void *user, PLUGINSD_ACTION *plugins_act
306
307
// parse the name, and make sure it does not include 'type.'
308
if (unlikely(name && *name)) {
309
- // when data are coming from slaves
309
+ // when data are streamed from child nodes
310
// name will be type.name
311
// so we have to remove 'type.' from name too
312
size_t len = strlen(type);
@@ -693,4 +693,3 @@ inline size_t pluginsd_process(RRDHOST *host, struct plugind *cd, FILE *fp, int
693
694
return count;
695
}
696
-
daemon/main.c
+3
-3
@@ -36,7 +36,7 @@ void netdata_cleanup_and_exit(int ret) {
36
// exit cleanly
37
38
// stop everything
39
- info("EXIT: stopping master threads...");
39
+ info("EXIT: stopping static threads...");
40
cancel_main_threads();
41
42
// free the database
@@ -232,7 +232,7 @@ void cancel_main_threads() {
232
usec_t max = 5 * USEC_PER_SEC, step = 100000;
233
for (i = 0; static_threads[i].name != NULL ; i++) {
234
if(static_threads[i].enabled == NETDATA_MAIN_THREAD_RUNNING) {
235
- info("EXIT: Stopping master thread: %s", static_threads[i].name);
235
+ info("EXIT: Stopping main thread: %s", static_threads[i].name);
236
netdata_thread_cancel(*static_threads[i].thread);
237
found++;
238
}
@@ -254,7 +254,7 @@ void cancel_main_threads() {
254
if(found) {
255
for (i = 0; static_threads[i].name != NULL ; i++) {
256
if (static_threads[i].enabled != NETDATA_MAIN_THREAD_EXITED)
257
- error("Master thread %s takes too long to exit. Giving up...", static_threads[i].name);
257
+ error("Main thread %s takes too long to exit. Giving up...", static_threads[i].name);
258
}
259
}
260
else
database/rrd.h
+1
-1
@@ -396,7 +396,7 @@ typedef enum rrdset_flags {
396
RRDSET_FLAG_BACKEND_IGNORE = 1 << 5, // if set, this chart should not be sent to backends
397
RRDSET_FLAG_UPSTREAM_SEND = 1 << 6, // if set, this chart should be sent upstream (streaming)
398
RRDSET_FLAG_UPSTREAM_IGNORE = 1 << 7, // if set, this chart should not be sent upstream (streaming)
399
- RRDSET_FLAG_UPSTREAM_EXPOSED = 1 << 8, // if set, we have sent this chart definition to netdata master (streaming)
399
+ RRDSET_FLAG_UPSTREAM_EXPOSED = 1 << 8, // if set, we have sent this chart definition to netdata parent (streaming)
400
RRDSET_FLAG_STORE_FIRST = 1 << 9, // if set, do not eliminate the first collection during interpolation
401
RRDSET_FLAG_HETEROGENEOUS = 1 << 10, // if set, the chart is not homogeneous (dimensions in it have multiple algorithms, multipliers or dividers)
402
RRDSET_FLAG_HOMOGENEOUS_CHECK = 1 << 11, // if set, the chart should be checked to determine if the dimensions are homogeneous
database/rrdhost.c
+1
-1
@@ -907,7 +907,7 @@ struct label *load_auto_labels()
907
add_label_to_list(label_list, "_virt_detection", localhost->system_info->virt_detection, LABEL_SOURCE_AUTO);
908
909
label_list = add_label_to_list(
910
- label_list, "_is_master", (localhost->next || configured_as_master()) ? "true" : "false", LABEL_SOURCE_AUTO);
910
+ label_list, "_is_parent", (localhost->next || configured_as_parent()) ? "true" : "false", LABEL_SOURCE_AUTO);
911
912
if (localhost->rrdpush_send_destination)
913
label_list =
health/notifications/alarm-notify.sh.in
+1
-1
@@ -410,7 +410,7 @@ if [ -z ${EMAIL_CHARSET} ]; then
410
fi
411
412
# If we've been asked to use FQDN's for the URL's in the alarm, do so,
413
-# unless we're sending an alarm for a slave system which we can't get the
413
+# unless we're sending an alarm for a child system which we can't get the
414
# FQDN of easily.
415
if [ "${use_fqdn}" = "YES" ] && [ "${host}" = "$(hostname -s 2>/dev/null)" ]; then
416
host="$(hostname -f 2>/dev/null)"
health/notifications/health_alarm_notify.conf
+2
-2
@@ -76,8 +76,8 @@ date_format=''
76
# the line below to have Netdata instead use the host's fully qualified
77
# domain name.
78
#
79
-# This does not report correct FQDN's for slave systems for which this
80
-# sytem is a master.
79
+# This does not report correct FQDN's for child systems for which this
80
+# system is a parent.
81
#
82
# Additionally, if the system host name is overridden in /etc/netdata.conf
83
# with the `hostname` option, that name will be used unconditionally
libnetdata/socket/security.c
+5
-5
@@ -316,7 +316,7 @@ int security_process_accept(SSL *ssl,int msg) {
316
/**
317
* Test Certificate
318
*
319
- * Check the certificate of Netdata master
319
+ * Check the certificate of Netdata parent
320
*
321
* @param ssl is the connection structure
322
*
@@ -348,10 +348,10 @@ int security_test_certificate(SSL *ssl) {
348
* Location for context
349
*
350
* Case the user give us a directory with the certificates available and
351
- * the Netdata master certificate, we use this function to validate the certificate.
351
+ * the Netdata parent certificate, we use this function to validate the certificate.
352
*
353
* @param ctx the context where the path will be set.
354
- * @param file the file with Netdata master certificate.
354
+ * @param file the file with Netdata parent certificate.
355
* @param path the directory where the certificates are stored.
356
*
357
* @return It returns 0 on success and -1 otherwise.
@@ -359,7 +359,7 @@ int security_test_certificate(SSL *ssl) {
359
int security_location_for_context(SSL_CTX *ctx, char *file, char *path) {
360
struct stat statbuf;
361
if (stat(file, &statbuf)) {
362
- info("Netdata does not have a SSL master certificate, so it will use the default OpenSSL configuration to validate certificates!");
362
+ info("Netdata does not have the parent's SSL certificate, so it will use the default OpenSSL configuration to validate certificates!");
363
return 0;
364
}
365
@@ -379,7 +379,7 @@ int security_location_for_context(SSL_CTX *ctx, char *file, char *path) {
379
slfc:
380
while ((err = ERR_get_error()) != 0) {
381
ERR_error_string_n(err, buf, sizeof(buf));
382
- error("Cannot set the directory for the certificates and the master SSL certificate: %s",buf);
382
+ error("Cannot set the directory for the certificates and the parent SSL certificate: %s",buf);
383
}
384
return -1;
385
}
streaming/receiver.c
+3
-3
@@ -51,7 +51,7 @@ PARSER_RC streaming_timestamp(char **words, void *user, PLUGINSD_ACTION *plugins
51
RRDHOST *host = ((PARSER_USER_OBJECT *)user)->host;
52
struct plugind *cd = ((PARSER_USER_OBJECT *)user)->cd;
53
if (cd->version < VERSION_GAP_FILLING ) {
54
- error("STREAM %s from %s: Slave negotiated version %u but sent TIMESTAMP!", host->hostname, cd->cmd,
54
+ error("STREAM %s from %s: Child negotiated version %u but sent TIMESTAMP!", host->hostname, cd->cmd,
55
cd->version);
56
return PARSER_RC_OK; // Ignore error and continue stream
57
}
@@ -232,8 +232,8 @@ static int rrdpush_receive(struct receiver_state *rpt)
232
if(rpt->tags && !*rpt->tags) rpt->tags = NULL;
233
234
if (strcmp(rpt->machine_guid, localhost->machine_guid) == 0) {
235
- log_stream_connection(rpt->client_ip, rpt->client_port, rpt->key, rpt->machine_guid, rpt->hostname, "DENIED - ATTEMPT TO RECEIVE METRICS FROM MACHINE_GUID IDENTICAL TO MASTER");
236
- error("STREAM %s [receive from %s:%s]: denied to receive metrics, machine GUID [%s] is my own. Did you copy the master/proxy machine guid to a slave?", rpt->hostname, rpt->client_ip, rpt->client_port, rpt->machine_guid);
235
+ log_stream_connection(rpt->client_ip, rpt->client_port, rpt->key, rpt->machine_guid, rpt->hostname, "DENIED - ATTEMPT TO RECEIVE METRICS FROM MACHINE_GUID IDENTICAL TO PARENT");
236
+ error("STREAM %s [receive from %s:%s]: denied to receive metrics, machine GUID [%s] is my own. Did you copy the parent/proxy machine GUID to a child?", rpt->hostname, rpt->client_ip, rpt->client_port, rpt->machine_guid);
237
close(rpt->fd);
238
return 1;
239
}
streaming/rrdpush.c
+5
-5
@@ -144,9 +144,9 @@ static inline int should_send_chart_matching(RRDSET *st) {
144
return(rrdset_flag_check(st, RRDSET_FLAG_UPSTREAM_SEND));
145
}
146
147
-int configured_as_master() {
147
+int configured_as_parent() {
148
struct section *section = NULL;
149
- int is_master = 0;
149
+ int is_parent = 0;
150
151
appconfig_wrlock(&stream_config);
152
for (section = stream_config.first_section; section; section = section->next) {
@@ -154,13 +154,13 @@ int configured_as_master() {
154
155
if (uuid_parse(section->name, uuid) != -1 &&
156
appconfig_get_boolean_by_section(section, "enabled", 0)) {
157
- is_master = 1;
157
+ is_parent = 1;
158
break;
159
}
160
}
161
appconfig_unlock(&stream_config);
162
163
- return is_master;
163
+ return is_parent;
164
}
165
166
// checks if the current chart definition has been sent
@@ -476,7 +476,7 @@ int rrdpush_receiver_thread_spawn(struct web_client *w, char *url) {
476
else if(!strcmp(name, "ver"))
477
stream_version = MIN((uint32_t) strtoul(value, NULL, 0), STREAMING_PROTOCOL_CURRENT_VERSION);
478
else {
479
- // An old Netdata slave does not have a compatible streaming protocol, map to something sane.
479
+ // An old Netdata child does not have a compatible streaming protocol, map to something sane.
480
if (!strcmp(name, "NETDATA_SYSTEM_OS_NAME"))
481
name = "NETDATA_HOST_OS_NAME";
482
else if (!strcmp(name, "NETDATA_SYSTEM_OS_ID"))
streaming/rrdpush.h
+1
-1
@@ -99,7 +99,7 @@ extern void sender_init(struct sender_state *s, RRDHOST *parent);
99
void sender_start(struct sender_state *s);
100
void sender_commit(struct sender_state *s);
101
extern int rrdpush_init();
102
-extern int configured_as_master();
102
+extern int configured_as_parent();
103
extern void rrdset_done_push(RRDSET *st);
104
extern void rrdset_push_chart_definition_now(RRDSET *st);
105
extern void *rrdpush_sender_thread(void *ptr);
streaming/sender.c
+3
-3
@@ -145,7 +145,7 @@ void rrdpush_clean_encoded(stream_encoded_t *se)
145
freez(se->kernel_version);
146
}
147
148
-static int rrdpush_sender_thread_connect_to_master(RRDHOST *host, int default_port, int timeout,
148
+static int rrdpush_sender_thread_connect_to_parent(RRDHOST *host, int default_port, int timeout,
149
struct sender_state *s) {
150
151
struct timeval tv = {
@@ -365,7 +365,7 @@ static int rrdpush_sender_thread_connect_to_master(RRDHOST *host, int default_po
365
}
366
s->version = version;
367
368
- info("STREAM %s [send to %s]: established communication with a master using protocol version %d - ready to send metrics..."
368
+ info("STREAM %s [send to %s]: established communication with a parent using protocol version %d - ready to send metrics..."
369
, host->hostname
370
, s->connected_to
371
, version);
@@ -385,7 +385,7 @@ static void attempt_to_connect(struct sender_state *state)
385
{
386
state->send_attempts = 0;
387
388
- if(rrdpush_sender_thread_connect_to_master(state->host, state->default_port, state->timeout, state)) {
388
+ if(rrdpush_sender_thread_connect_to_parent(state->host, state->default_port, state->timeout, state)) {
389
state->last_sent_t = now_monotonic_sec();
390
391
// reset the buffer, to properly send charts and metrics
streaming/stream.conf
+17
-17
@@ -8,10 +8,10 @@
8
9
10
# -----------------------------------------------------------------------------
11
-# 1. ON SLAVE NETDATA - THE ONE THAT WILL BE SENDING METRICS
11
+# 1. ON CHILD NETDATA - THE ONE THAT WILL BE SENDING METRICS
12
13
[stream]
14
- # Enable this on slaves, to have them send metrics.
14
+ # Enable this on child nodes, to have them send metrics.
15
enabled = no
16
17
# Where is the receiving netdata?
@@ -21,20 +21,20 @@
21
#
22
# If many are given, the first available will get the metrics.
23
#
24
- # PROTOCOL = tcp, udp, or unix (only tcp and unix are supported by masters)
24
+ # PROTOCOL = tcp, udp, or unix (only tcp and unix are supported by parent nodes)
25
# HOST = an IPv4, IPv6 IP, or a hostname, or a unix domain socket path.
26
# IPv6 IPs should be given with brackets [ip:address]
27
# INTERFACE = the network interface to use (only for IPv6)
28
# PORT = the port number or service name (/etc/services)
29
# SSL = when this word appear at the end of the destination string
30
- # the Netdata will do encrypt connection with the master.
30
+ # the Netdata will encrypt the connection with the parent.
31
#
32
# This communication is not HTTP (it cannot be proxied by web proxies).
33
destination =
34
35
# Skip Certificate verification?
36
#
37
- # The netdata slave is configurated to avoid invalid SSL/TLS certificate,
37
+ # The netdata child is configurated to avoid invalid SSL/TLS certificate,
38
# so certificates that are self-signed or expired will stop the streaming.
39
# Case the server certificate is not valid, you can enable the use of
40
# 'bad' certificates setting the next option as 'yes'.
@@ -51,7 +51,7 @@
51
52
# Certificate Authority file
53
#
54
- # When the Netdata master has certificate, that is not recognized as valid,
54
+ # When the Netdata parent has certificate, that is not recognized as valid,
55
# we can add this certificate in the list of known certificates in CApath
56
# and give for Netdata as argument.
57
#
@@ -88,14 +88,14 @@
88
initial clock resync iterations = 60
89
90
# -----------------------------------------------------------------------------
91
-# 2. ON MASTER NETDATA - THE ONE THAT WILL BE RECEIVING METRICS
91
+# 2. ON PARENT NETDATA - THE ONE THAT WILL BE RECEIVING METRICS
92
93
-# You can have one API key per slave,
94
-# or the same API key for all slaves.
93
+# You can have one API key per child,
94
+# or the same API key for all child nodes.
95
#
96
# netdata searches for options in this order:
97
#
98
-# a) master netdata settings (netdata.conf)
98
+# a) parent netdata settings (netdata.conf)
99
# b) [stream] section (above)
100
# c) [API_KEY] section (below, settings for the API key)
101
# d) [MACHINE_GUID] section (below, settings for each machine)
@@ -140,8 +140,8 @@
140
# 3 possible values:
141
# yes enable alarms
142
# no do not enable alarms
143
- # auto enable alarms, only when the sending netdata is connected. For ephemeral slaves or slave system restarts,
144
- # ensure that the netdata process on the slave is gracefully stopped, to prevent invalid last_collected alarms
143
+ # auto enable alarms, only when the sending netdata is connected. For ephemeral child nodes or child system restarts,
144
+ # ensure that the netdata process on the child is gracefully stopped, to prevent invalid last_collected alarms
145
# You can also set it per host, below.
146
# The default is taken from [health].enabled of netdata.conf
147
health enabled by default = auto
@@ -158,22 +158,22 @@
158
159
160
# -----------------------------------------------------------------------------
161
-# 3. PER SENDING HOST SETTINGS, ON MASTER NETDATA
161
+# 3. PER SENDING HOST SETTINGS, ON PARENT NETDATA
162
# THIS IS OPTIONAL - YOU DON'T HAVE TO CONFIGURE IT
163
164
-# This section exists to give you finer control of the master settings for each
165
-# slave host, when the same API key is used by many netdata slaves / proxies.
164
+# This section exists to give you finer control of the parent settings for each
165
+# child host, when the same API key is used by many netdata child nodes / proxies.
166
#
167
# Each netdata has a unique GUID - generated the first time netdata starts.
168
# You can find it at /var/lib/netdata/registry/netdata.public.unique.id
169
-# (at the slave).
169
+# (at the child).
170
#
171
# The host sending data will have one. If the host is not ephemeral,
172
# you can give settings for each sending host here.
173
174
[MACHINE_GUID]
175
# enable this host: yes | no
176
- # When disabled, the master will not receive metrics for this host.
176
+ # When disabled, the parent will not receive metrics for this host.
177
# THIS IS NOT A SECURITY MECHANISM - AN ATTACKER CAN SET ANY OTHER GUID.
178
# Use only the API key for security.
179
enabled = no
web/server/web_client.c
+1
-1
@@ -863,7 +863,7 @@ static inline char *web_client_valid_method(struct web_client *w, char *s) {
863
memcpy(hostname,"not available",13);
864
hostname[13] = 0x00;
865
}
866
- error("The server is configured to always use encrypt connection, please enable the SSL on slave with hostname '%s'.",hostname);
866
+ error("The server is configured to always use encrypted connections, please enable the SSL on child with hostname '%s'.",hostname);
867
s = NULL;
868
}
869
#endif