bitsensor / elastalert

ElastAlert that exposes REST API's for manipulating rules and alerts
https://bitsensor.io/
Other
367 stars 216 forks source link

Elastalert-server is throwing syntax error while creating alert rules in praeco server #160

Open suresh447 opened 4 years ago

suresh447 commented 4 years ago

Hi,

I am running elastalert-server by using this commands cd ~/elastalert-server vi config/config.json npm install npm run start

it is running fine but after creating rules in praeco server it is throwing error like below

07:40:43.779Z ERROR elastalert-server: TestController: Failed to test rule with error: Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/ctpadmin/elastalert/elastalert/test_rule.py", line 13, in import mock File "/home/ctpadmin/.local/lib/python3.5/site-packages/mock/init.py", line 7, in import mock.mock as _mock File "/home/ctpadmin/.local/lib/python3.5/site-packages/mock/mock.py", line 765 mock_name = f'{self._extract_mock_name()}.{name}' ^ SyntaxError: invalid syntax

Can any one please help me on this

divyameharwade commented 4 years ago

pip install mock==3.0.5 resolved the issue for me.