Skip to content

Commit

Permalink
ansible: Update default td-agent version to 4.3.2 (open-telemetry#1734)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk authored Jun 30, 2022
1 parent 42148e1 commit 7f97b0e
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions deployments/ansible/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

## ansible-v0.10.0

### 💡 Enhancements 💡

- Update default `td-agent` version to 4.3.2 to support log collection with fluentd on Ubuntu 22.04

## ansible-v0.9.0

### 💡 Enhancements 💡
Expand Down
2 changes: 1 addition & 1 deletion deployments/ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Currently, the following Linux distributions and versions are supported:
- CentOS / Red Hat / Oracle: 7, 8
- Debian: 9, 10, 11
- SUSE: 12, 15 (**Note:** Only for collector versions v0.34.0 or higher. Log collection with Fluentd not currently supported.)
- Ubuntu: 16.04, 18.04, 20.04, 22.04 (**Note:** Log collection with Fluentd [not currently supported on Ubuntu 22.04](https://www.fluentd.org/blog/td-agent-v4.3.1-has-been-released).)
- Ubuntu: 16.04, 18.04, 20.04, 22.04

## Windows
Currently, the following Windows versions are supported:
Expand Down
2 changes: 1 addition & 1 deletion deployments/ansible/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace: signalfx
name: splunk_otel_collector
description: Ansible collection for Splunk OpenTelemetry Collector
version: 0.9.0
version: 0.10.0
readme: README.md
authors:
- Splunk Inc.
Expand Down
8 changes: 4 additions & 4 deletions deployments/ansible/molecule/custom_vars/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,23 @@
- name: Assert custom_fluentd.conf is created
assert:
that: custom_fluentd_config.stat.exists
when: ansible_os_family != "Suse" and ansible_distribution_release != "jammy"
when: ansible_os_family != "Suse"

- name: Assert custom_fluentd.conf is used
ansible.builtin.lineinfile:
line: Environment=FLUENT_CONF=/etc/otel/collector/fluentd/custom_fluentd.conf
dest: /etc/systemd/system/td-agent.service.d/splunk-otel-collector.conf
state: present
check_mode: yes
when: ansible_os_family != "Suse" and ansible_distribution_release != "jammy"
when: ansible_os_family != "Suse"

- name: Send a test log message
ansible.builtin.uri:
body: json={"log":"test logs pipeline"}
method: POST
url: http://localhost:9880/app.log
changed_when: false
when: ansible_os_family != "Suse" and ansible_distribution_release != "jammy"
when: ansible_os_family != "Suse"

- name: Look for the test log message in collector service output
ansible.builtin.shell:
Expand All @@ -120,4 +120,4 @@
until: result.stdout
retries: 20
delay: 1
when: ansible_os_family != "Suse" and ansible_distribution_release != "jammy"
when: ansible_os_family != "Suse"
2 changes: 1 addition & 1 deletion deployments/ansible/molecule/shared/verify_tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
- name: Assert td-agent service is running
assert:
that: ansible_facts.services['td-agent.service'].state == 'running'
when: ansible_os_family != "Suse" and ansible_distribution_release != "jammy"
when: ansible_os_family != "Suse"
2 changes: 1 addition & 1 deletion deployments/ansible/roles/collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ how to use the role in a playbook with minimal required configuration:
(**default:** `true`)

- `td_agent_version`: Version of td-agent (fluentd package) that will be
installed (**default:** `3.7.1` for Debian stretch and `4.3.0` for other
installed (**default:** `3.7.1` for Debian stretch and `4.3.2` for other
distros)

- `splunk_fluentd_config`: Path to the fluentd config file on the remote host.
Expand Down
2 changes: 1 addition & 1 deletion deployments/ansible/roles/collector/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ splunk_ballast_size_mib: ""
install_fluentd: true

# Explicitly set version of td-agent,
# By default: 3.7.1 for Debian stretch and 4.3.0 for other distros.
# By default: 3.7.1 for Debian stretch and 4.3.2 for other distros.
td_agent_version: ""

# Default path on Linux: "/etc/otel/collector/fluentd/fluent.conf".
Expand Down
2 changes: 1 addition & 1 deletion deployments/ansible/roles/collector/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ansible.builtin.service:
name: td-agent
state: restarted
when: install_fluentd and ansible_distribution_release != "jammy"
when: install_fluentd
listen: "restart td-agent"

- name: Restart Splunk OpenTelemetry Collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

- name: Install FluentD
ansible.builtin.import_tasks: linux_install_fluentd.yml
when: install_fluentd and ansible_os_family != "Suse" and ansible_distribution_release != "jammy"
when: install_fluentd and ansible_os_family != "Suse"

- name: Install Splunk OpenTelemetry Auto Instrumentation with apt package manager
ansible.builtin.import_tasks: apt_install_auto_instrumentation.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
{%- elif ansible_distribution_release == "stretch" -%}
3.7.1-0
{%- elif ansible_os_family == "Debian" -%}
4.3.0-1
4.3.2-1
{%- else -%}
4.3.0
4.3.2
{%- endif -%}
- name: Set required td-agent major version
Expand Down
2 changes: 1 addition & 1 deletion deployments/ansible/roles/collector/tasks/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{%- if td_agent_version -%}
{{ td_agent_version }}
{%- else -%}
4.1.1
4.3.2
{%- endif -%}
registry_key: HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
package_stage: release
Expand Down

0 comments on commit 7f97b0e

Please sign in to comment.