summaryrefslogtreecommitdiffstats
path: root/conf.d/stream.conf
blob: 0ae5ba673af13a02e2c84693d4dd67df00b59648 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# netdata configuration for aggregating data from remote hosts
#
# API keys authorize a pair of sending-receiving netdata servers.
# Once their communication is authorized, they can exchange metrics for any
# number of hosts.
#
# You can generate API keys, with the linux command: uuidgen


# -----------------------------------------------------------------------------
# 1. ON SLAVE NETDATA - THE ONE THAT WILL BE SENDING METRICS

[stream]
    # Enable this on slaves, to have them send metrics.
    enabled = no

    # Where is the receiving netdata?
    # A space separated list of:
    #
    #      [PROTOCOL:]HOST[%INTERFACE][:PORT]
    #
    # If many are given, the first available will get the metrics.
    #
    # PROTOCOL  = tcp or udp (only tcp is supported by masters)
    # HOST      = an IPv4, IPv6 IP, or a hostname.
    #             IPv6 IPs should be given with brackets [ip:address]
    # INTERFACE = the network interface to use
    # PORT      = the port number or service name (/etc/services)
    #
    # This communication is not HTTP (cannot be proxied by web proxies).
    destination =

    # The API_KEY to use (as the sender)
    api key =

    # The timeout to connect and send metrics
    timeout seconds = 60

    # If the destination line above does not specify a port, use this
    default port = 19999

    # The buffer to use for sending metrics.
    # 1MB is good for 10-20 seconds of data, so increase this
    # if you expect latencies.
    buffer size bytes = 1048576

    # If the connection fails, or it disconnects,
    # retry after that many seconds.
    reconnect delay seconds = 5

    # Attempt to sync the clock the of the master with the clock of the
    # slave for that many iterations, when starting.
    initial clock resync iterations = 60


# -----------------------------------------------------------------------------
# 2. ON MASTER NETDATA - THE ONE THAT WILL BE RECEIVING METRICS

#    You can have one API key per slave, or the same API key for all slaves.
#
#    netdata searches for options in this order:
#
#    a) [MACHINE_GUID] section  (settings for each machine)
#    b) [API_KEY] section       (settings for the API key)
#    c) master netdata settings (netdata.conf)
#
#    You can combine the above (the more specific setting will be used).

# API key authentication
# If the key is not listed here, it will not be able to connect.

[API_KEY]
    # Default settings for the API key

    # You can disable the API key, by setting this to: no
    # The default (for unknown API keys) is: no
    enabled = no

    # The default history in entries, for all hosts using this API key.
    # You can also set it per host below.
    # If you don't set it here, the history size of the central netdata
    # will be used.
    default history = 3600

    # The default memory mode to be used for all hosts using this API key.
    # You can also set it per host below.
    # If you don't set it here, the memory mode of netdata.conf will be used.
    # Valid modes:
    #    save    save on exit, load on start
    #    map     like swap (continuously syncing to disks)
    #    ram     keep it in RAM, don't touch the disk
    #    none    no database at all (use this on headless proxies)
    default memory mode = ram

    # Shall we enable health monitoring for the hosts using this API key?
    # 3 possible values:
    #    yes     enable alarms
    #    no      do not enable alarms
    #    auto    enable alarms, only when the sending netdata is connected
    # You can also set it per host, below.
    # The default is the same as to netdata.conf
    health enabled by default = auto

    # postpone alarms for a short period after the sender is connected
    default postpone alarms on connect seconds = 60

    # need to route metrics differently? set these.
    # the defaults are the ones at the [stream] section
    #default proxy enabled = yes | no
    #default proxy destination = IP:PORT IP:PORT ...
    #default proxy api key = API_KEY


# -----------------------------------------------------------------------------
# 3. PER SENDING HOST SETTINGS, ON MASTER NETDATA
#    THIS IS OPTIONAL - YOU DON'T NEED IT

# This section exists to give you finer control of the master settings for each
# slave host, when the same API key is used by many netdata slaves / proxies.
#
# Each netdata has a unique GUID - generated the first time netdata starts.
# You can find it at /var/lib/netdata/registry/netdata.public.unique.id
# (at the slave).
#
# The host sending data will have one. If the host is not ephemeral,
# you can give settings for each sending host here.

[MACHINE_GUID]
    # enable this host: yes | no
    # When disabled, the master will not receive metrics for this host.
    # THIS IS NOT A SECURITY MECHANISM - AN ATTACKER CAN SET ANY OTHER GUID.
    # Use only the API key for security.
    enabled = no

    # The number of entries in the database
    history = 3600

    # The memory mode of the database: save | map | ram | none
    memory mode = save

    # Health / alarms control: yes | no | auto
    health enabled = yes

    # postpone alarms when the sender connects
    postpone alarms on connect seconds = 60

    # need to route metrics differently?
    #proxy enabled = yes | no
    #proxy destination = IP:PORT IP:PORT ...
    #proxy api key = API_KEY