翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
Fluentd OpenSearch での取り込みパイプラインの使用
Fluentd は、Fluent Bit などのさまざまな言語やサブプロジェクトSDKsを提供するオープンソースのデータ収集エコシステムです。このサンプル Fluentd 設定ファイルは
次の点に注意してください。
-
endpoint
の値はパイプラインエンドポイントにする必要があります。例えば、
と指定します。pipeline-endpoint
.us-east-1.osis.amazonaws.com/apache-log-pipeline/logs -
aws_service
の値はosis
にする必要があります。 -
aws_role_arn
値は、クライアントが AWS IAM引き受け、署名バージョン 4 認証に使用するロールARNの です。
<source> @type tail path logs/sample.log path_key log tag apache <parse> @type none </parse> </source> <filter apache> @type record_transformer <record> log ${record["message"]} </record> </filter> <filter apache> @type record_transformer remove_keys message </filter> <match apache> @type http endpoint
pipeline-endpoint
.us-east-1
.osis.amazonaws.com/apache-log-pipeline/logs json_array true <auth> method aws_sigv4 aws_service osis aws_regionus-east-1
aws_role_arn arn:aws:iam::{account-id}
:role/ingestion-role
</auth> <format> @type json </format> <buffer> flush_interval 1s </buffer> </match>
その後、 をソースHTTPとする Ingestion OpenSearch パイプラインを次のように設定できます。
version: "2" apache-log-pipeline: source: http: path: "/${pipelineName}/logs" processor: - grok: match: log: - "%{TIMESTAMP_ISO8601:timestamp} %{NOTSPACE:network_node} %{NOTSPACE:network_host} %{IPORHOST:source_ip}:%{NUMBER:source_port:int} -> %{IPORHOST:destination_ip}:%{NUMBER:destination_port:int} %{GREEDYDATA:details}" sink: - opensearch: hosts: ["https://search-
domain-endpoint
.us-east-1
.es.amazonaws.com"] index: "index_name
" aws_sts_role_arn: "arn:aws:iam::{account-id}
:role/pipeline-role
" aws_region: "us-east-1
" aws_sigv4: true