Fluentd를 통해 MacOS 시스템 로그를 S3로 보내기
마지막 업데이트
도움이 되었나요?
도움이 되었나요?
/etc/td-agent/td-agent.conf<source>
@type macoslog
style ndjson
tag macos
pos_file last-starttime.log
run_interval 10s
<parse>
@type json
time_type string
time_key timestamp
time_format %Y-%m-%d %H:%M:%S.%L%z
</parse>
</source>
<match **>
@type s3
aws_key_id <Key ID>
aws_sec_key <Key>
s3_bucket <Bucket>
s3_region <Region>
path macoslog/%Y/%m/%d/
store_as gzip
<buffer tag,time>
@type file
path /var/log/fluent/s3
timekey 300 # S3에 게시하기 위한 5분 파티션
timekey_wait 2m
timekey_use_utc true # UTC 사용
chunk_limit_size 256m
</buffer>
<format>
@type json
</format>
</match># fluentd를 구성 파일로 지정
fluentd -c /etc/td-agent/td-agent.conf
# 구성 유효성 검사
/opt/td-agent/usr/sbin/td-agent --dry-run버전: 0
필드:
- 이름: pid
유형: bigint
- 이름: ppid
유형: bigint
- 이름: message
유형: string
- 이름: worker
유형: bigint
- 이름: creatorActivityID
유형: float
- 이름: messageType
유형: string
- 이름: activityIdentifier
유형: bigint
- 이름: backtrace
유형: object
필드:
- 이름: frames
필수: true
유형: array
요소:
유형: object
필드:
- 이름: imageOffset
필수: true
유형: bigint
- 이름: imageUUID
필수: true
유형: string
- 이름: bootUUID
유형: string
- 이름: category
유형: string
- 이름: eventMessage
유형: string
- 이름: eventType
유형: string
- 이름: formatString
유형: string
- 이름: machTimestamp
유형: bigint
- 이름: parentActivityIdentifier
유형: bigint
- 이름: processID
유형: bigint
- 이름: processImagePath
유형: string
- 이름: processImageUUID
유형: string
- 이름: senderImagePath
유형: string
- 이름: senderImageUUID
유형: string
- 이름: senderProgramCounter
유형: bigint
- 이름: subsystem
유형: string
- 이름: threadID
유형: bigint
- 이름: timezoneName
유형: string
- 이름: traceID
유형: float