기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
Fluentd에서 통합 OpenSearch 파이프라인 사용
Fluentd는 다양한 언어와 Fluent Bit와 같은 하위 프로젝트를 제공하는 SDKs 오픈 소스 데이터 수집 에코시스템입니다. 이 샘플 Fluentd 구성 파일은 Fluentd에서 수집 파이프라인으로 로그 데이터를 전송합니다
유의할 사항:
-
endpoint
값은 파이프라인 엔드포인트여야 합니다. 예:
.pipeline-endpoint
.us-east-1.osis.amazonaws.com/apache-log-pipeline/logs -
aws_service
값은osis
여야 합니다. -
aws_role_arn
값은 클라이언트가 서명 버전 ARN 4 인증에 AWS IAM 맡아 사용할 역할의 값입니다.
<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 소스로 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