2017-02-23 7 views
0

월요일 01:00 - 02:00에 이벤트 수가 동일한 기간보다 10 % 더 크거나 작 으면 경고 할 ElastAlert에서 경고를 설정하려고합니다. 그 주 월요일부터.ElastAlert에서 지난 한 시간의 데이터를 비교하십시오.

우리의 데이터는 일요일과 월요일에 비해 일요일과 시간이 많이 다릅니다.

이러한 종류의 검사에는 스파이크 유형이나 다른 필터를 사용할 수 있습니까?

+0

안녕하십니까? – kumar

+0

아직 두렵다. 뭔가 찾을 수 있으면 다시 신고 해주세요. –

답변

0

나는 같은 종류의 문제가있었습니다. 나는 elastAlert를 포크하고 새로운 규칙 유형을 추가하는 것으로 끝났다.

후드에서 다른 ES 호출을 만들어 데이터를 비교합니다. 그것은 약간 더러운이며 원래의 elastAlert 아키텍처에 적합하지 않습니다. 그러나 그것은 그 일을합니다. '스파이크'및 'metric_aggregation'규칙이 혼합되어 있습니다. 여기

https://github.com/spodgurskiy/elastalert

내 규칙 구성의 예입니다.

# Alert when there is a sudden spike comparing to the historical data 
name: Spike detection 

type: metric_history_aggregation 
index: metrics-* 

# Reference window diff in minutes 
date_diff_ref: 10080 

# Spike detection 
threshold_total: 50 
threshold_cur: 0 
threshold_ref: 0 

spike_height: 1.05 
spike_type: both # <both/up/down> 

# Aggregation 
metric_agg_key: "<field_name>" 
metric_agg_type: sum 
max_threshold: 

# Alert section 
alert: 
- "slack" 
alert_display_timezone: US/Pacific 
alert_text_type: exclude_fields 
alert_subject: "" 
slack_webhook_url: "https://hooks.slack.com/services/..."