Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
7.97k stars 1.74k forks source link

Opensearch - RequestError(400, 'no handler found for uri [/status44/elastalert_error] and method [POST]' #3261

Open AryaDavidson opened 2 years ago

AryaDavidson commented 2 years ago

Hello,

I got an error while running the command in the opensearch server( elastalert --config /home/ubuntu/elastalert2/examples/config.yaml --verbose --rule /home/ubuntu/elastalert2/examples/rules/example_frequency.yaml ). Anything to solve it?

root@ubuntu:/home/ubuntu/elastalert2# elastalert --config /home/ubuntu/elastalert2/examples/config.yaml --verbose --rule /home/ubuntu/elastalert2/examples/rules/example_frequency.yaml 1 rules loaded /usr/local/lib/python3.8/dist-packages/elasticsearch/connection/http_requests.py:134: UserWarning: Connecting to https://localhost:9200 using SSL with verify_certs=False is insecure. warnings.warn( /usr/lib/python3/dist-packages/urllib3/connectionpool.py:999: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings warnings.warn( 2022-07-05 03:19:48,697 INFO elastalert Starting up 2022-07-05 03:19:48,699 INFO elastalert Disabled rules are: [] 2022-07-05 03:19:48,699 INFO elastalert Sleeping for 59.999778 seconds /usr/lib/python3/dist-packages/urllib3/connectionpool.py:999: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings warnings.warn( 2022-07-05 03:19:52,707 ERROR root Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 1269, in handle_rule_execution num_matches = self.run_rule(rule, endtime, rule.get('initial_starttime')) File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 868, in run_rule self.set_starttime(rule, endtime) File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 711, in set_starttime last_run_end = self.get_starttime(rule) File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 692, in get_starttime res = self.writeback_es.deprecated_search(index=index, doc_type=doc_type, File "/usr/local/lib/python3.8/dist-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'

2022-07-05 03:19:52,708 ERROR root Uncaught exception running rule Action_test_alert: deprecated_search() got an unexpected keyword argument 'headers' /usr/lib/python3/dist-packages/urllib3/connectionpool.py:999: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings warnings.warn( 2022-07-05 03:19:52,710 WARNING elasticsearch POST https://localhost:9200/status44/elastalert_error [status:400 request:0.002s] 2022-07-05 03:19:52,710 ERROR root Error writing alert info to Elasticsearch: RequestError(400, 'no handler found for uri [/status44/elastalert_error] and method [POST]', 'no handler found for uri [/status44/elastalert_error] and method [POST]') Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 1269, in handle_rule_execution num_matches = self.run_rule(rule, endtime, rule.get('initial_starttime')) File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 868, in run_rule self.set_starttime(rule, endtime) File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 711, in set_starttime last_run_end = self.get_starttime(rule) File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 692, in get_starttime res = self.writeback_es.deprecated_search(index=index, doc_type=doc_type, File "/usr/local/lib/python3.8/dist-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'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/elastalert/elastalert.py", line 1616, in writeback res = self.writeback_es.index(index=index, doc_type=doc_type, body=body) File "/usr/local/lib/python3.8/dist-packages/elasticsearch/client/utils.py", line 152, in _wrapped return func(*args, params=params, headers=headers, **kwargs) File "/usr/local/lib/python3.8/dist-packages/elasticsearch/client/init.py", line 398, in index return self.transport.perform_request( File "/usr/local/lib/python3.8/dist-packages/elasticsearch/transport.py", line 392, in perform_request raise e File "/usr/local/lib/python3.8/dist-packages/elasticsearch/transport.py", line 358, in perform_request status, headers_response, data = connection.perform_request( File "/usr/local/lib/python3.8/dist-packages/elasticsearch/connection/http_requests.py", line 199, in perform_request self._raise_error(response.status_code, raw_data) File "/usr/local/lib/python3.8/dist-packages/elasticsearch/connection/base.py", line 315, in _raise_error raise HTTP_EXCEPTIONS.get(status_code, TransportError)( elasticsearch.exceptions.RequestError: RequestError(400, 'no handler found for uri [/status44/elastalert_error] and method [POST]', 'no handler found for uri [/status44/elastalert_error] and method [POST]') 2022-07-05 03:19:52,713 INFO elastalert Rule Action_test_alert disabled

nsano-rururu commented 2 years ago

elastalert is no longer maintained

nsano-rururu commented 2 years ago

yelp/elastalert does not support OpenSearch

nsano-rururu commented 2 years ago

@AryaDavidson

Did you understand?

AryaDavidson commented 2 years ago

Yes understood

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Naoyuki Sano @.> Sent: Tuesday, July 5, 2022 9:50:04 PM To: Yelp/elastalert @.> Cc: Aarya Davidson @.>; Mention @.> Subject: Re: [Yelp/elastalert] Opensearch - RequestError(400, 'no handler found for uri [/status44/elastalert_error] and method [POST]' (Issue #3261)

@AryaDavidsonhttps://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAryaDavidson&data=05%7C01%7Caarya.d%40activbytes.com%7C6e14de9ef07a48aaeb1508da5ea239b5%7Cfc327485809d4c88881ea523ca673342%7C0%7C0%7C637926348098114314%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=E6RQ6SmZ7MoYtv3b7G%2BD8XcxVDy5s72N8E0VOHHeBVo%3D&reserved=0

Did you understand?

— Reply to this email directly, view it on GitHubhttps://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FYelp%2Felastalert%2Fissues%2F3261%23issuecomment-1175245165&data=05%7C01%7Caarya.d%40activbytes.com%7C6e14de9ef07a48aaeb1508da5ea239b5%7Cfc327485809d4c88881ea523ca673342%7C0%7C0%7C637926348098114314%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dt2hSLeSq%2BLISkW6Dc78PFLuQTzrVDtLdiW04R8Dkj4%3D&reserved=0, or unsubscribehttps://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAU2F6WZJ434JZKDHQYSNCGLVSRODJANCNFSM52UXY45Q&data=05%7C01%7Caarya.d%40activbytes.com%7C6e14de9ef07a48aaeb1508da5ea239b5%7Cfc327485809d4c88881ea523ca673342%7C0%7C0%7C637926348098114314%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=AIhdecSV6zb30O6%2BVxVbv978Xi0joO9uGiFGLsLvRHY%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>