[Python] 纯文本查看 复制代码
elastalert.sh
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/util.py", line 28, in get_module
base_module = __import__(module_path, globals(), locals(), [module_class])
ModuleNotFoundError: No module named 'elastalert_modules'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 516, in load_alerts
alert_field = [create_alert(a, b) for a, b in alert_field]
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 516, in <listcomp>
alert_field = [create_alert(a, b) for a, b in alert_field]
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 500, in create_alert
alert_class = self.alerts_mapping.get(alert) or get_module(alert)
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/util.py", line 31, in get_module
raise EAException("Could not import module %s: %s" % (module_name, e)).with_traceback(sys.exc_info()[2])
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/util.py", line 28, in get_module
base_module = __import__(module_path, globals(), locals(), [module_class])
elastalert.util.EAException: Could not import module elastalert_modules.wechat_qiye_alert.WeChatAlerter: No module named 'elastalert_modules'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 156, in load
rule = self.load_configuration(rule_file, conf, args)
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 219, in load_configuration
self.load_modules(rule, args)
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 483, in load_modules
rule['alert'] = self.load_alerts(rule, alert_field=rule['alert'])
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 519, in load_alerts
raise EAException('Error initiating alert %s: %s' % (rule['alert'], e)).with_traceback(sys.exc_info()[2])
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 516, in load_alerts
alert_field = [create_alert(a, b) for a, b in alert_field]
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 516, in <listcomp>
alert_field = [create_alert(a, b) for a, b in alert_field]
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 500, in create_alert
alert_class = self.alerts_mapping.get(alert) or get_module(alert)
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/util.py", line 31, in get_module
raise EAException("Could not import module %s: %s" % (module_name, e)).with_traceback(sys.exc_info()[2])
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/util.py", line 28, in get_module
base_module = __import__(module_path, globals(), locals(), [module_class])
elastalert.util.EAException: Error initiating alert ['elastalert_modules.wechat_qiye_alert.WeChatAlerter']: Could not import module elastalert_modules.wechat_qiye_alert.WeChatAlerter: No module named 'elastalert_modules'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/elastalert", line 11, in <module>
load_entry_point('elastalert2==2.2.1', 'console_scripts', 'elastalert')()
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/elastalert.py", line 2151, in main
client = ElastAlerter(args)
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/elastalert.py", line 132, in __init__
self.rules = self.rules_loader.load(self.conf, self.args)
File "/usr/local/lib/python3.8/dist-packages/elastalert2-2.2.1-py3.8.egg/elastalert/loaders.py", line 164, in load
raise EAException('Error loading file %s: %s' % (rule_file, e))
elastalert.util.EAException: Error loading file /home/wajika/elastalert2/es_rules/bpm.yaml: Error initiating alert ['elastalert_modules.wechat_qiye_alert.WeChatAlerter']: Could not import module elastalert_modules.wechat_qiye_alert.WeChatAlerter: No module named 'elastalert_modules'