Closed ashishkaransingh closed 3 years ago
The answer is written in 2725. Do not you understand? Why not do your best?
Sorry for disappointing you! I was trying to make sense of the information provided. In my case it affected operation and disabled the rule.
ERROR:root:Uncaught exception running rule test_perc: deprecated_search() got an unexpected keyword argument 'headers'
INFO:elastalert:Rule test_perc disabled
It was a problem if I put in a new version of python's elasticsearch library. The order of the arguments has changed from a certain version, but the correspondence is missing and it is a problem. However, in elastalert 0.2.4, the elasticsearch library of python is fixed at 7.0.0, so if you install it normally, this problem does not occur. all right?
Yes 👍 I was able to cross check file test_rules.py based on a comment made by you in #2725
It was a problem if I put in a new version of python's elasticsearch library. The order of the arguments has changed from a certain version, but the correspondence is missing and it is a problem. However, in elastalert 0.2.4, the elasticsearch library of python is fixed at 7.0.0, so if you install it normally, this problem does not occur. all right?
Sure, I will try after install it. Thank a ton!
Ref: https://github.com/Yelp/elastalert/issues/2725
Getting the following error only when using rule type: Percentage Match
ERROR:root:Uncaught exception running rule test_perc: deprecated_search() got an unexpected keyword argument 'headers'
/cpt/elastalert $ python3 -m elastalert.elastalert --verbose --rule test_perc.yaml --config config.yaml 1 rules loaded INFO:elastalert:Starting up INFO:elastalert:Disabled rules are: [] INFO:elastalert:Sleeping for 59.999888 seconds /home/node/.local/lib/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: Camel case format name dateOptionalTime is deprecated and will be removed in a future version. Use snake case name date_cptional_time instead. warnings.warn(message, category=ElasticsearchWarning) ERROR:root:Traceback (most recent call last): File "/cpt/elastalert/elastalert/elastalert.py", line 1283, in handle_rule_execution num_matches = self.run_rule(rule, endtime, rule.get('initial_starttime')) File "/cpt/elastalert/elastalert/elastalert.py", line 902, in run_rule if not self.run_query(rule, tmp_endtime, endtime): File "/cpt/elastalert/elastalert/elastalert.py", line 636, in run_query data = self.get_hits_aggregation(rule, start, end, index, rule.get('query_key', None)) File "/cpt/elastalert/elastalert/elastalert.py", line 569, in get_hits_aggregation res = self.thread_data.current_es.deprecated_search(index=index, doc_type=rule.get('doc_type'), File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 152, in _wrapped return func(*args, params=params, headers=headers, **kwargs) TypeError: deprecated_search() got an unexpected keyword argument 'headers'