기술 노트/elastalert

elastalert 웹 관리 방식 사용 시

미래의억만장자 2023. 3. 17. 11:51

elastalert 웹 방식으로 설치 하신 후에는 반드시 아래 명령어를 실행 해 주셔야 합니다.

RAW 데이터의 에러로그를 수집 못했는데, 에러 로그는 아래와 같이 출력됩니다.

No mapping found for [alert_time] in order to sort on

 

그래서 아래와 같은 방식으로 alert_time은 type이 date 로 선언을 해주어야 elasticsearch에서 수집되는 @timestamp를 인식하게 됩니다.

put elastalert_status/_mapping
{
  "properties": {
    "alert_time": {
      "type": "date"
    }
  }
}