Skip to content

Commit 72c528d

Browse files
committed
update installers to not use default SPLUNK_LISTEN_INTERFACE
1 parent 5cebeed commit 72c528d

File tree

22 files changed

+61
-26
lines changed

22 files changed

+61
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ listen to configure the `SPLUNK_DEBUG_CONFIG_SERVER_PORT` environment variable.
171171

172172
You can use the environment variable `SPLUNK_LISTEN_INTERFACE` and associated installer option to configure the network
173173
interface on which the collector's receivers and telemetry endpoints will listen.
174-
The default value of `SPLUNK_LISTEN_INTERFACE` is set to `0.0.0.0`.
174+
The default value of `SPLUNK_LISTEN_INTERFACE` is set to `127.0.0.1` for the default agent configuration and `0.0.0.0` otherwise.
175175

176176
## Upgrade guidelines
177177

deployments/ansible/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## unreleased
4+
5+
### 💡 Enhancements 💡
6+
7+
- Only propagate `splunk_listen_interface` to target SPLUNK_LISTEN_INTERFACE service environment variable if set.
8+
39
## ansible-v0.22.0
410

511
### 💡 Enhancements 💡

deployments/ansible/molecule/custom_vars/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
splunk_service_group: custom-group
1414
splunk_memory_total_mib: 256
1515
splunk_ballast_size_mib: 100
16-
splunk_listen_interface: 127.0.0.1
16+
splunk_listen_interface: 1.2.3.4
1717
splunk_fluentd_config: /etc/otel/collector/fluentd/custom_fluentd.conf
1818
splunk_fluentd_config_source: ./custom_fluentd_config.conf
1919
install_fluentd: yes

deployments/ansible/molecule/custom_vars/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595

9696
- name: Assert SPLUNK_LISTEN_INTERFACE env var is set
9797
ansible.builtin.lineinfile:
98-
line: SPLUNK_LISTEN_INTERFACE=127.0.0.1
98+
line: SPLUNK_LISTEN_INTERFACE=1.2.3.4
9999
dest: /etc/otel/collector/splunk-otel-collector.conf
100100
state: present
101101
check_mode: yes

deployments/ansible/molecule/custom_vars/windows-converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
splunk_memory_total_mib: 256
1515
splunk_ballast_size_mib: 100
1616
install_fluentd: yes
17-
splunk_listen_interface: 127.0.0.1
17+
splunk_listen_interface: 1.2.3.4
1818
splunk_fluentd_config: '{{ansible_env.ProgramFiles}}\Splunk\OpenTelemetry Collector\fluentd\custom_config.conf'
1919
splunk_fluentd_config_source: ./custom_fluentd_config.conf
2020
splunk_otel_collector_additional_env_vars:

deployments/ansible/roles/collector/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ splunk_memory_total_mib: 512
3131
# 1/3 of memory_mib by default
3232
splunk_ballast_size_mib: ""
3333

34-
splunk_listen_interface: "0.0.0.0"
34+
splunk_listen_interface: ""
3535
install_fluentd: false
3636
# Whether to start the services installed by the role (splunk-otel-collector and td-agent).
3737
start_service: true

deployments/ansible/roles/collector/tasks/otel_win_reg.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
name: SPLUNK_LISTEN_INTERFACE
7777
data: "{{splunk_listen_interface}}"
7878
type: string
79+
when: splunk_listen_interface is defined and not (splunk_listen_interface | trim) == ""
7980

8081
- name: Set registry values
8182
ansible.windows.win_regedit:

deployments/ansible/roles/collector/templates/splunk-otel-collector.conf.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ SPLUNK_HEC_URL={{ "https://ingest." + splunk_realm + ".signalfx.com/v1/log" }}
2020
SPLUNK_HEC_TOKEN={{ splunk_hec_token }}
2121
SPLUNK_MEMORY_TOTAL_MIB={{ splunk_memory_total_mib }}
2222
SPLUNK_BALLAST_SIZE_MIB={{ splunk_ballast_size_mib }}
23+
{% if splunk_listen_interface is defined and splunk_listen_interface %}
2324
SPLUNK_LISTEN_INTERFACE={{ splunk_listen_interface }}
25+
{% endif %}
2426
SPLUNK_BUNDLE_DIR={{ splunk_bundle_dir }}
2527
SPLUNK_COLLECTD_DIR={{ splunk_collectd_dir }}
2628
{% if splunk_otel_collector_additional_env_vars is not none %}

deployments/chef/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## unreleased
4+
5+
- Update `splunk_listen_interface` default to only set target SPLUNK_LISTEN_INTERFACE environment variable if
6+
configure.
7+
38
## chef-v0.7.0
49

510
- Add support for the `splunk_listen_interface` option to configure the network interface the collector receivers

deployments/chef/attributes/default.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
default['splunk_otel_collector']['splunk_hec_token'] = "#{node['splunk_otel_collector']['splunk_access_token']}"
2222
default['splunk_otel_collector']['splunk_memory_total_mib'] = '512'
2323
default['splunk_otel_collector']['splunk_ballast_size_mib'] = ''
24-
default['splunk_otel_collector']['splunk_listen_interface'] = '0.0.0.0'
24+
default['splunk_otel_collector']['splunk_listen_interface'] = ''
2525

2626
default['splunk_otel_collector']['collector_config'] = {}
2727

0 commit comments

Comments
 (0)