trekdemo.td-agent

Ansibleロール: td-agent

ビルドステータス Ansible Galaxy Ansible Galaxy MIT

RedHat/CentOSやDebian/UbuntuのLinuxサーバにtd-agentをインストールします。

このロールは、TreasureDataのyumリポジトリ(RedHat系システムの場合)またはapt(Debian系システムの場合)から、最新または指定したバージョンのtd-agentをインストールし、設定します。

必要条件

特にありません。

ロール変数

使用可能な変数の全リストはdefaults/main.ymlを参照してください。

td_agent_version:

インストールするパッケージのカスタムバージョンを定義します。 利用可能なパッケージバージョンのリストは、http://packages.treasure-data.comをご覧ください。

td_agent_plugins:

Fluentプラグインの依存関係を説明するオブジェクトのリストです。プラグインはfluentd.org/pluginsで見つけることができます。

例:

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

td_agent_configuration:

名前と内容を持つオブジェクトのリストで、内容はソースとマッチブロックを含むマルチライン文字列です。 詳細を学ぶ...

td_agent_configuration:
  - name: "アクセスログにホスト名を追加"
    content: |
      <filter myapp.access>
        @type record_transformer
        <record>
          host_param "#{Socket.gethostname}"
        </record>
      </filter>

  - name: "私のアプリのアクセスログ"
    content: |
      <match myapp.access>
        @type file
        path /var/log/fluent/access
      </match>

  - name: "より長い設定を含めるためにルックアップを使用することもできます"
    content: {{ lookup('files', 'my-td-agent.conf') }}

依存関係

特にありません。

例プレイブック

- hosts: server
  roles:
    - role: trekdemo.td-agent
  vars:
    td_agent_version: 2.2.1 # (デフォルトは2.3.0)
    td_agent_plugins: # (デフォルト: [])
      - name: fluent-plugin-gcloud-storage
        version: 0.1.2
    td_agent_configuration: # (デフォルト: [])
      - name: GCSにログをアーカイブ
        content: |
          <match example.publish>
            @type gcloud_storage
            # ...
          </match>

ライセンス

MIT

作者情報

このロールは2016年にGergo Sulymosiによって作成されました。

プロジェクトについて

td-agent for RHEL/CentOS and Debian/Ubuntu

インストール
ansible-galaxy install trekdemo.td-agent
ライセンス
mit
ダウンロード
132
所有者
gem cutter, object juggler, lambda magician