elastalert v0.2.0b2

Created on 5 May 2019  路  4Comments  路  Source: Yelp/elastalert

Hi,

Starting now to learn about elastalert (and not exactly a Python expert) but when trying to use v0.2.0b2 I get this error:

root@ebs-cybersecurity-alerts:/opt/elastalert# python elastalert/elastalert.py
/usr/local/lib/python2.7/dist-packages/requests-2.21.0-py2.7.egg/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.2) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
Traceback (most recent call last):
File "elastalert/elastalert.py", line 21, in
import kibana
File "/opt/elastalert/elastalert/kibana.py", line 5, in
from util import EAException
File "/opt/elastalert/elastalert/util.py", line 13, in
from . import ElasticSearchClient
ValueError: Attempted relative import in non-package

I did a pip install of elasticsearch library 7.0.0

the setup.py install didn't return any errors. This is Ubuntu 19.04.

Thanks,
Alex

Most helpful comment

Try python -m elastalert.elastalert instead of python elastalert/elastalert.py

All 4 comments

Try python -m elastalert.elastalert instead of python elastalert/elastalert.py

Hi,
I am having this issue when i want to run elastalert

python3.4 -m elastalert.elastalert --verbose --rule ../example_rules/login_success.yaml
Traceback (most recent call last):
File "/usr/lib64/python3.4/runpy.py", line 151, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/usr/lib64/python3.4/runpy.py", line 104, in _get_module_details
spec = importlib.util.find_spec(mod_name)
File "/usr/lib64/python3.4/importlib/util.py", line 86, in find_spec
parent = __import__(parent_name, fromlist=['__path__'])
File "/root/elastalert/elastalert/elastalert.py", line 29, in
from . import kibana
SystemError: Parent module '' not loaded, cannot perform relative import

Can you assist?

This might be a Python3.4 issue, could you try 3.5 and see if you get the same error?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shaohk picture shaohk  路  4Comments

vaibhavtupe picture vaibhavtupe  路  4Comments

tkumark picture tkumark  路  3Comments

Eyad87 picture Eyad87  路  4Comments

MaximilianKaltner picture MaximilianKaltner  路  3Comments