elk elasticsearch kibana logstash metricbeat filebeat apm heartbeat elastalert 監控 alerting index elastic stack open distro for elasticsearch elastalert

ELK Lesson 24:安裝ElastAlert

ElastAlert的用途

ELK本身其實有監控告警的功能,但需要付錢買授權才能有比較豐富完整的功能,所以就誕生了ElastAlert,ElastAlert是用來規劃告警規則與發送告警之用的第三方套件,是由Yelp所開發並Open Source讓大家使用,能夠串接超過十多種告警方式,包含API、E-Mail、Telegram、Slack…等,非常方便!

注意:Yelp已經沒有持續積極維護ElastAlert了,Bug的修復速度幾乎停擺,雖然仍可以繼續使用,但若是正式環境,建議另尋其他方案!

ElastAlert環境需求

  • ISO8601 or Unix timestamped data
  • Python 3.6
  • pip
  • python-pip, python-dev, ibffi-dev, libssl-dev

安裝

步驟1:安裝Python3與其他必要的套件。

$ yum install python36 python3-devel gcc -y

步驟2:更新pip。

$ pip3 install --upgrade pip

步驟3:安裝ElastAlert。

$ pip3 install elastalert

步驟4:確認安裝是否正常。

$ ls /usr/local/bin/elastalert*
/usr/local/bin/elastalert
/usr/local/bin/elastalert-create-index
/usr/local/bin/elastalert-rule-from-kibana
/usr/local/bin/elastalert-test-rule

只要看到這四個執行檔案即可!

~ END ~


Related posts

Latest posts