elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Version conflict

Open kernelpanicfbsd opened this issue 9 years ago • 5 comments

Hello, I'm using FreeBSD 11 and have used these instructions (https://blog.gufi.org/2016/03/16/elk-stack-elasticsearch-logstash-and-kibana-on-freebsd-part-3/) to create a virtual environment which Elastalert has been installed into. However, when I run ./bin/elastalert-create-index I get the following error:

Traceback (most recent call last): File "./bin/elastalert-create-index", line 6, in from pkg_resources import load_entry_point File "/usr/local/elastalert/lib/python2.7/site-packages/pkg_resources/init.py", line 3036, in @_call_aside File "/usr/local/elastalert/lib/python2.7/site-packages/pkg_resources/init.py", line 3020, in _call_aside f(*args, **kwargs) File "/usr/local/elastalert/lib/python2.7/site-packages/pkg_resources/init.py", line 3049, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/local/elastalert/lib/python2.7/site-packages/pkg_resources/init.py", line 656, in _build_master return cls._build_from_requirements(requires) File "/usr/local/elastalert/lib/python2.7/site-packages/pkg_resources/init.py", line 669, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/local/elastalert/lib/python2.7/site-packages/pkg_resources/init.py", line 859, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (requests 2.5.1 (/usr/local/elastalert/lib/python2.7/site-packages), Requirement.parse('requests==2.2.1'), set(['exotel']))

Any help is greatly appreciated.

kernelpanicfbsd avatar Apr 19 '17 14:04 kernelpanicfbsd

Run python -m elastalert.create_index instead. Instead of elastalert, run python -m elastalert.elastalert

Qmando avatar Apr 19 '17 17:04 Qmando

Alternatively, create a new virtualenv and do pip install elastalert instead of anything with setup.py.

Qmando avatar Apr 19 '17 17:04 Qmando

Thanks for getting back to me; I ran the following commands:

virtualenv /usr/local/venv
source /usr/local/venv/bin/activate.csh
pip install elastalert

This did seem to successfully install elastalert and although I can see some elastalert files in the ./bin directory I can't see an ./etc directory or find the config.yaml.example file - do I need to create it myself? Sorry for asking these simple questions, whilst I have dabbled with simple python scripts before, I've never used virtual environments or pip.

Thanks.

kernelpanicfbsd avatar Apr 19 '17 17:04 kernelpanicfbsd

You'll need to create your own config.yaml. Directory doesn't matter. It can either be in your current directory or you can pass --config path/to/config.yaml.

Qmando avatar Apr 19 '17 17:04 Qmando

Thankyou very much for your help, its much appreciated.

kernelpanicfbsd avatar Apr 19 '17 18:04 kernelpanicfbsd