I 사용자 정의 형식의 로그 파일을위한 SS를, 날짜 필드는 다음과 같습니다 : 내 logstash의 설정에 변환 날짜 MMM은 HH DD 형식 logstash
Dec 4 23:59:21
Nov 21 23:59:21
내가 필터이 있습니다
date {
type => "custom"
# tell it the format
custom_timestamp => ["MMM d HH:mm:ss", "MMM dd HH:mm:ss"]
# locale didn't help
locale => "en"
}
mutate{
type => "custom"
# replace the timestamp
replace => ["@timestamp", "%{custom_timestamp}"]
}
아마도 logstash 타임 스탬프를 로그의 맞춤 설정으로 바꿉니다 (테스트 할 때 이전 로그에서 다시 채울 예정입니다).
내가 표준 출력으로 디버그 플래그와 출력을 설정하면, 그것은 @timestamp
가 custom_timestamp
로 대체 된 것을 나에게 보여줍니다하지만 난 그것을 가져올 수 없음을 말해 오류 메시지가 :
:exception=>java.lang.IllegalArgumentException: Invalid format: "Dec 4 23:59:21"
I를하는 일 날짜 형식을 변환해야합니까?
"유형은"지금 내 대답에서 또는 문제의 – tjrobinson