Skip to content

Commit

Permalink
Merge pull request #35 from gaetanfl/allow_proxy_configuration
Browse files Browse the repository at this point in the history
Feature: a netdata host can be defined as a proxy for streaming
  • Loading branch information
mrlesmithjr authored Jul 24, 2019
2 parents 3e8bc69 + acb35c7 commit 800e3ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,17 @@ netdata_stream_enabled: false
# Defines location of Netdata stream configuration file
netdata_stream_config_file: /etc/netdata/stream.conf

# Defines Netdata API Key (must be generated with command uuidgen)
# Defines Netdata API Keys (must be generated with command uuidgen)
netdata_stream_api_key: 11111111-2222-3333-4444-555555555555
netdata_stream_send_api_key: "{{ netdata_stream_api_key }}"
netdata_stream_receive_api_key: "{{ netdata_stream_api_key }}"

# Defines Netdata master node and port (e.g. 127.0.0.1:19999)
netdata_stream_master_node: ""

# Defines weather the netdata node is acting as a proxy
netdata_stream_proxy: false

# Defines if Netdata should be uninstalled
# Caution: This does not prompt for uninstall as the original script
# was intended.
Expand Down
6 changes: 3 additions & 3 deletions templates/stream.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# netdata stream configuration

{% if netdata_stream_master_node == '' %}
[{{ netdata_stream_api_key }}]
{% if netdata_stream_master_node == '' or netdata_stream_proxy %}
[{{ netdata_stream_receive_api_key }}]
# enable/disable this API key
enabled = yes

Expand All @@ -23,5 +23,5 @@
destination = {{ netdata_stream_master_node }}

# the API key to use
api key = {{ netdata_stream_api_key }}
api key = {{ netdata_stream_send_api_key }}
{% endif %}

0 comments on commit 800e3ff

Please sign in to comment.