linux shell alert,ElastAlert Bash启动脚本Centos 7

我正在尝试编写一个启动脚本,将elastalert作为服务启动。elastalert使用python并按如下方式启动:python -m elastalert --verbose --rule rules_folder/frequency.yaml --config config.yaml

我一直在努力让它与以下方面一起工作:

^{pr2}$

尝试运行脚本时,出现以下错误:virtualenvelastalert) [root@mplinux scripts]# elastalert

Traceback (most recent call last):

File "/virtualenvelastalert/bin/elastalert", line 11, in

load_entry_point('elastalert==0.0.95', 'console_scripts', 'elastalert')()

File "/virtualenvelastalert/lib/python2.7/site-packages/elastalert-0.0.95-py2.7.egg/elastalert/elastalert.py", line 1426, in main

client = ElastAlerter(args)

File "/virtualenvelastalert/lib/python2.7/site-packages/elastalert-0.0.95-py2.7.egg/elastalert/elastalert.py", line 94, in init

self.conf = load_rules(self.args)

File "/virtualenvelastalert/lib/python2.7/site-packages/elastalert-0.0.95-py2.7.egg/elastalert/config.py", line 373, in load_rules

conf = yaml_loader(filename)

File "/virtualenvelastalert/lib/python2.7/site-packages/staticconf/loader.py", line 161, in yaml_loader

with open(filename) as fh:

IOError: [Errno 2] No such file or directory: 'config.yaml'

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值