搭建在原有的ELK+nginx上
上传软件包,在三台虚拟机上完成。
Python-3.6.2.tgz
v0.2.1_elasticalert.tar.gz
安装python3 环境
// yum -y install openssl openssl-devel gcc gcc-c++
// tar zxvf Python-3.6.2.tgz
// cd Python-3.6.2
// ./configure --prefix=/usr/local/python3 --with-openssl
// make && make install
设置软链接
// rm -rf /usr/bin/python
// ln -s /usr/local/python3/bin/python3.6 /usr/bin/python
// ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip
修复yum命令
// vim /usr/bin/yum 将python 修改为python2
// vim /usr/libexec/urlgrabber-ext-down 将python 修改为python2
安装alert 插件
// tar zxvf v0.2.1_elasticalert.tar.gz
// mv elastalert-0.2.1/ /usr/local/elastalert
安装依赖包:
// cd /usr/local/elastalert
// pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
// python setup.py inst