flatline
ElastAlert フレームワークを使用してアラート タイプを作成します。
Kibana UI でまったく同じ構文を使用してクエリを使用すると、結果が返されますが、ElastAlert は結果を返しません。
ここに私のelastalert-rule-file.xmlがあります
name: Test Flatline
type: flatline
run_every:
seconds: 15
relalert:
minutes: 0
es_host: localhost
es_port: 9200
threshold: 1
timeframe:
minutes: 5
index: my-index-*
filter:
- query:
query_string:
query: "_type:metric" # this returns results in both kibana and elastalert
#query: "_type:metric AND _exists_:My\ Field\ With\ Spaces.value" # this returns results in kibana but not in elastalert
timestamp_type: unix_ms
alert:
- command
command: ["my-bash-script.sh"]
そこで、クエリをいじってみましたが、指定するだけ_type:metric
で、Kibana の検索結果は ElastAlert の検索結果と一致するようです。
ただし_exists_
、2 番目のクエリで lucene 構文を使用してクエリを使用しようとすると、ElastAlert は何も返しませんが、Kibana は構文で問題ないようです。
何か案は?