trekdemo.td-agent

Ansible Role: td-agent

Build Status Ansible Galaxy Ansible Galaxy MIT

Installs td-agent on RedHat/CentOS or Debian/Ubuntu Linux servers.

This role installs and sets up the latest or chosen version of td-agent from the TreasureData yum repository (for RedHat systems) or using apt (for Debian systems).

Requirements

None.

Role Variables

Check available variables in defaults/main.yml.

td_agent_version:

Specify the version of the package you want to install. To see available versions, visit: http://packages.treasure-data.com

td_agent_plugins:

A list of required fluent plugins and their versions. Find plugins at fluentd.org/plugins

Example:

td_agent_plugins:
  - { name: fluent-plugin-google-cloud, version: 0.4.14 }
  - name: fluent-plugin-secure-forward
    version: 0.3.2

td_agent_configuration:

A list of configuration objects with a name and content as a multiline string. Learn more...

td_agent_configuration:
  - name: "Add host name to my access log"
    content: |
      <filter myapp.access>
        @type record_transformer
        <record>
          host_param "#{Socket.gethostname}"
        </record>
      </filter>

  - name: "Access log of my app"
    content: |
      <match myapp.access>
        @type file
        path /var/log/fluent/access
      </match>

  - name: "Include longer configurations with lookups"
    content: {{ lookup('files', 'my-td-agent.conf') }}

Dependencies

None.

Example Playbook

- hosts: server
  roles:
    - role: trekdemo.td-agent
  vars:
    td_agent_version: 2.2.1 # (default is 2.3.0)
    td_agent_plugins: # (default: [])
      - name: fluent-plugin-gcloud-storage
        version: 0.1.2
    td_agent_configuration: # (default: [])
      - name: Archive logs to GCS
        content: |
          <match example.publish>
            @type gcloud_storage
            # ...
          </match>

License

MIT

Author Information

This role was created in 2016 by Gergo Sulymosi.

Informazioni sul progetto

td-agent for RHEL/CentOS and Debian/Ubuntu

Installa
ansible-galaxy install trekdemo.td-agent
Licenza
mit
Download
132
Proprietario
gem cutter, object juggler, lambda magician