-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
启动时,提示IndentationError: unexpected indent #1
Comments
@weihc02 你好,这个问题问题已经修复了,主要是本地包含了特殊字符导致的.如果还有其他问题请留言 |
好的,我再试下,可以考虑支持docker 镜像? |
ERROR:root:Error running query: RequestError(400, u'search_phase_execution_exception', u'No mapping found for [@timestamp] in order to sort on') 模式是@timestamp查询自动,elk默认不是这个,要去哪里修改? |
@weihc02 恩恩谢谢你的提议,下周我就发布到docker hub上. 运行 curl -XGET 'http://elasticsearch地址:9200/elastalert_status/_mapping/' 里面应该有@timestamp这个字段的 |
@weihc02 你的"@timestamp 在elastalert_status索引中存在么? elastalert-create-index` 运行了么? |
在config.py 我把默认的改了,重新运行 INFO:elastalert:Queried rule schedule from 2019-02-21 13:08 CST to 2019-02-21 13:11 CST: 1 / 1 hits |
curl -XGET 'http://127.0.0.1:9200/elastalert_status/_mapping/' |
@weihc02 现在正常了么? |
不正常,没有推到微信。INFO:elastalert:send msg and response: {"errcode":0,"errmsg":"ok","invaliduser":"15999552312"} 这个是无效的用户,微信号是手机号码,怎么会是invaliduser? |
@weihc02 这个要用你微信企业通讯录中的账号ID,我刚更新了代码图片你可以看看去 |
是的,确实是这个问题,改了之后可以了。谢谢。期待docker 镜像,更加方便。 |
@weihc02 记得加个星星呦! 镜像下周一上 |
ok |
用了镜像,启动了一会,就自动停止了,请问日志输出再什么地方? |
Traceback (most recent call last): |
[root@iZ94rc264jtZ elastalert]# python2.7 -m elastalert.elastalert --verbose --config config.yaml --rule es_rules/wechart.yaml
/usr/lib/python2.7/site-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn't match a supported version!
RequestsDependencyWarning)
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/elastalert/elastalert/elastalert.py", line 1925, in
sys.exit(main(sys.argv[1:]))
File "/usr/local/elastalert/elastalert/elastalert.py", line 1919, in main
client = ElastAlerter(args)
File "/usr/local/elastalert/elastalert/elastalert.py", line 108, in init
self.conf = load_rules(self.args)
File "elastalert/config.py", line 500, in load_rules
rule = load_configuration(rule_file, conf, args)
File "elastalert/config.py", line 133, in load_configuration
load_modules(rule, args)
File "elastalert/config.py", line 382, in load_modules
rule['alert'] = load_alerts(rule, alert_field=rule['alert'])
File "elastalert/config.py", line 440, in load_alerts
alert_field = [create_alert(a, b) for a, b in alert_field]
File "elastalert/config.py", line 425, in create_alert
alert_class = alerts_mapping.get(alert) or get_module(alert)
File "elastalert/config.py", line 110, in get_module
base_module = import(module_path, globals(), locals(), [module_class])
File "elastalert_modules/wechat_qiye_alert.py", line 24
def init(self, *args):
IndentationError: unexpected indent
py脚本是直接git下载,语法检查也看不什么问题?
The text was updated successfully, but these errors were encountered: