2019-02-19

Elastalert 插件安装

参考:https://elastalert.readthedocs.io/en/latest/running_elastalert.html

安装 pip


$ wget https://bootstrap.pypa.io/get-pip.py

$ python get-pip.py

下载模块


$ pip install "setuptools>=11.3"

$ python setup.py install

通过 git 安装或者 pip 安装


$ cd /usr/local/

$ git clone https://github.com/Yelp/elastalert.git

Elasticsearch 6.3:


$ pip install "elasticsearch>=6.3.1"

创建索引:


$ /usr/local/elastalert master elastalert-create-index

Elastic Version:6

Mapping used for string:{'type': 'keyword'}

Index elastalert_status already exists. Skipping index creation.

在这可以发现索引已经有了,查看一下索引:


curl 'localhost:9200/_cat/indices?v'

health status index          uuid    pri rep docs.count docs.deleted store.size pri.store.size

yellow open elastalert_status  fR_R5bOGSqCFS6ezK2RMNA  5  1  0  0    1.2kb  1.2kb

出现了一个错误:


yaml.parser.ParserError: while parsing a block mapping

  in "example_rules/example_frequency.yaml", line 20, column 1

did not find expected key

  in "example_rules/example_frequency.yaml", line 46, column 2

是因为example_frequency.yaml 里添加的 SMTP 配置前面有空格,yaml 一定要注意空格的问题!

image
image
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 2019-02-18 姓名 :李宏清(单位)扬州市方圆建筑工程有限公司 哈尔滨363期反省二组 【日精进打卡第 ...
    李宏清阅读 238评论 0 0
  • R语言学习笔记-R包安装 R语言是一个开放性的统计学语言,r包的丰富程度涵盖了几乎生产和生活的各个方面,r包与r包...
    liaochengcheng阅读 534评论 0 0
  • 1. 这是什么词? 词:deepen 英英释义:to make deep or deeper 例句:Traveli...
    静美的秋阅读 255评论 0 0
  • 窗外 下起了,雨 在我的眼里 在你的心中 琐碎而又绵长 点滴复点滴 这雨 不知所起 亦不知所终 茫茫然 洗去一身尘...
    六里桥南阅读 170评论 0 0
  • 网上关于Git-Flow的教程一大堆,哎呀,命令行太多记不住啊。还好有SourceTree,但是好像功能还挺多,不...
    Thresh0ld阅读 15,177评论 2 37