[root@afadsfasfsad /opt/elastalert]# /usr/local/python27/bin/elastalert
/usr/local/python27/lib/python2.7/site-packages/elastalert/config.py:31: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
rule_schema = jsonschema.Draft4Validator(yaml.load(open(os.path.join(os.path.dirname(__file__), 'schema.yaml'))))
Traceback (most recent call last):
File "/usr/local/python27/bin/elastalert", line 11, in <module>
load_entry_point('elastalert==0.1.39', 'console_scripts', 'elastalert')()
File "/usr/local/python27/lib/python2.7/site-packages/elastalert/elastalert.py", line 1925, in main
client.start()
File "/usr/local/python27/lib/python2.7/site-packages/elastalert/elastalert.py", line 1106, in start
self.run_all_rules()
File "/usr/local/python27/lib/python2.7/site-packages/elastalert/elastalert.py", line 1158, in run_all_rules
self.send_pending_alerts()
File "/usr/local/python27/lib/python2.7/site-packages/elastalert/elastalert.py", line 1534, in send_pending_alerts
pending_alerts = self.find_recent_pending_alerts(self.alert_time_limit)
File "/usr/local/python27/lib/python2.7/site-packages/elastalert/elastalert.py", line 1526, in find_recent_pending_alerts
size=1000)
File "/usr/local/python27/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 84, in _wrapped
return func(*args, params=params, **kwargs)
TypeError: search() got an unexpected keyword argument 'doc_type'
try
pip uninstall elasticsearchand thenpip install elasticsearch==5.5.3hey, I’m still getting this issue… elk 7.0.1 on dockers, lastest bitsensor/elastalert as well. any updates?
And one more to help with debugging. I’ve updated my image to
bitsensor/elastalert:3.0.0-beta.1and it seems to start now, but getting a new error:Deleting the indexes fixed this. It appears that the latest official Docker HUB image (2.0.1) needs an update as it is not running
>2.getting this issue also on 7.3.1
@MaximilianKaltner Did you uninstall elastalert 0.1.39 using pip uninstall? To me it seems like you are executing a dangling 0.1.39 console script.
You could always try to execute the elastalert-test rule in a similar fashion as you did with elastalert thus circumventing the script entirely:
python -m elastalert.test-rule --config /etc/elastalert/config.yaml /etc/elastalert/rules/test.yamlFYI: The test-rule in 0.2.0b2 contains some bugs that seems fixed in the master branch. Especially an assertion error caused by buggy argument parsing.
@Qmando I’m having the same issue on elastisearch 7.3.2. I am using these images in docker:
That bitsensor is also the
latesttag.@matsgoran I fixed the problem with ms-teams. I missed the proxy configuration in my rule!
ms_teams_proxy: By default ElastAlert will not use a network proxy to send notifications to MS Teams. Set this option using hostname:port if you need to use a proxy.
Now everything works - thanks again!
I am using the 6.7.0 elastic stack. Cannot migrate to 7.0.0 since elastalert kibana plugin is not available. I am seeing elastalert | File “/opt/elastalert/elastalert/elastalert.py”, line 1528, in send_pending_alerts elastalert | pending_alerts = self.find_recent_pending_alerts(self.alert_time_limit) elastalert | File “/opt/elastalert/elastalert/elastalert.py”, line 1520, in find_recent_pending_alerts elastalert | elastalert | 15:20:39.834Z ERROR elastalert-server: elastalert | ProcessController: size=1000) elastalert | File “/usr/lib/python2.7/site-packages/elasticsearch-7.0.0-py2.7.egg/elasticsearch/client/utils.py”, line 84, in _wrapped elastalert | return func(*args, params=params, **kwargs) elastalert | TypeError: search() got an unexpected keyword argument ‘doc_type’
Cannot go to the 5.5.3.
What are my options?