Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Praeco rule #447

Closed
SamuelBizon opened this issue Apr 26, 2022 · 2 comments
Closed

Praeco rule #447

SamuelBizon opened this issue Apr 26, 2022 · 2 comments
Labels
question Further information is requested

Comments

@SamuelBizon
Copy link
Contributor

Hi,
I am new to working with elastalert.
Whenever there is an uncaught exception the rule is disabled in elastalert server but in praeco it stays enabled. Is there any solution for the praeco to see the rule being disabled automatically and doing the same ?
Elastalert server logs : WARNING:elastalert:Disabled rules are: ['restartPodsDev', 'restartPodsProdNetcoolAlert', 'NetCoolAlertTest', 'restartPodsPreprod'] (but in praeco the rule is still enabled)

The rule restartPodsPreprod has raised an uncaught exception.

It has been disabled and will be re-enabled when ElastAlert restarts or if the rule config file has been modified.

Traceback (most recent call last):
File "/home/node/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/home/node/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1322, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 303, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 264, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/node/.local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/node/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/home/node/.local/lib/python3.8/site-packages/urllib3/util/retry.py", line 531, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/node/.local/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/home/node/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/home/node/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/home/node/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='elk-es', port=443): Read timed out. (read timeout=120)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/connection/http_requests.py", line 77, in perform_request
response = self.session.send(prepared_request, **send_kwargs)
File "/home/node/.local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/home/node/.local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='elk-es', port=443): Read timed out. (read timeout=120)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/elastalert/elastalert/elastalert.py", line 1307, in handle_rule_execution
num_matches = self.run_rule(rule, endtime, rule.get('initial_starttime'))
File "/opt/elastalert/elastalert/elastalert.py", line 907, in run_rule
if not self.run_query(rule, rule['starttime'], endtime):
File "/opt/elastalert/elastalert/elastalert.py", line 665, in run_query
self.thread_data.current_es.clear_scroll(scroll_id=scroll_id)
File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 84, in _wrapped
return func(*args, params=params, **kwargs)
File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/client/init.py", line 1289, in clear_scroll
return self.transport.perform_request(
File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/transport.py", line 318, in perform_request
status, headers_response, data = connection.perform_request(method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/connection/http_requests.py", line 85, in perform_request
raise ConnectionTimeout('TIMEOUT', str(e), e)
elasticsearch.exceptions.ConnectionTimeout: ConnectionTimeout caused by - ReadTimeout(HTTPSConnectionPool(host='elk-es', port=443): Read timed out. (read timeout=120))

@SamuelBizon SamuelBizon added the question Further information is requested label Apr 26, 2022
@SamuelBizon
Copy link
Contributor Author

This happened, when a service was not available.

Repository owner locked and limited conversation to collaborators Apr 26, 2022
Repository owner unlocked this conversation Apr 27, 2022
@nsano-rururu nsano-rururu reopened this Dec 6, 2023
@nsano-rururu
Copy link
Collaborator

Repository owner locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants