Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@

## Other changes
- Fix percentile metric_aggregation rule error for rules with compound query keys - [#1701](https://github.com/jertel/elastalert2/pull/1701) - @jhatcher1
- Support Python 3.14 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: boto3 to 1.40.59 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: cffi to 2.0.0 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: jinja2 to 3.1.6 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: jira to 3.10.5 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: jsonschema to 4.25.1 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: prettytable to 3.16.0 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: prometheus-client to 0.23.1 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: pyyaml to 6.0.3 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: requests to 2.32.5 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: tencentcloud-sdk-python to 3.0.1479 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update library: twilio to 9.8.4 - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu
- Update build libraries: pylint, pytest, pytest-cov, pytest-xdist, sphinx, tox - [#1706](https://github.com/jertel/elastalert2/pull/1706) - @nsano-rururu

# 2.26.0

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.13-slim as builder
FROM python:3.14-slim as builder

LABEL description="ElastAlert 2 Official Image"
LABEL maintainer="Jason Ertel"
Expand All @@ -10,7 +10,7 @@ RUN mkdir -p /opt/elastalert && \
pip install setuptools wheel && \
python setup.py sdist bdist_wheel

FROM python:3.13-slim
FROM python:3.14-slim

ARG GID=1000
ARG UID=1000
Expand Down
6 changes: 3 additions & 3 deletions docs/source/running_elastalert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ Requirements

- Elasticsearch 7, 8, or 9 or OpenSearch 1, 2, or 3
- ISO8601 or Unix timestamped data
- Python 3.13. Require OpenSSL 3.0.8 or newer. Note that Python 3.12 is still supported but will be removed in a future release.
- Python 3.14 or 3.13. Require OpenSSL 3.0.8 or newer. Note that Python 3.12 is still supported but will be removed in a future release.
- pip
- Packages on Ubuntu 24.04: build-essential python3-pip python3.13 python3.13-dev libffi-dev libssl-dev
- Packages on Ubuntu 24.04: build-essential python3-pip python3.14 python3.14-dev libffi-dev libssl-dev

If you want to install python 3.13 on CentOS, please install python 3.13 from the source code after installing 'Development Tools'.
If you want to install python 3.14 on CentOS, please install python 3.14 from the source code after installing 'Development Tools'.

Downloading and Configuring
---------------------------
Expand Down
8 changes: 6 additions & 2 deletions elastalert/prometheus_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ def start(self):

def metrics_run_rule(self, rule, endtime, starttime=None):
""" Increment counter every time rule is run """
result = None
try:
self.prom_scrapes.labels(rule['name']).inc()
result = self.run_rule(rule, endtime, starttime)
finally:
return self.run_rule(rule, endtime, starttime)
pass
return result

def metrics_writeback(self, doc_type, body, rule=None, match_body=None):
""" Update various prometheus metrics accoording to the doc_type """
Expand All @@ -53,4 +56,5 @@ def metrics_writeback(self, doc_type, body, rule=None, match_body=None):
elif doc_type == 'silence':
self.prom_alerts_silenced.labels(body['rule_name']).inc()
finally:
return res
pass
return res
12 changes: 6 additions & 6 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
flake8
flake8-absolute-import
pre-commit
pylint==3.3.3
pytest==8.3.4
pytest-cov==6.0.0
pytest-xdist==3.6.1
pylint==4.0.2
pytest==8.4.2
pytest-cov==7.0.0
pytest-xdist==3.8.0
setuptools
sphinx==8.1.3
sphinx==8.2.3
sphinx_rtd_theme==3.0.2
tox==4.23.2
tox==4.32.0
22 changes: 11 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
apscheduler>=3.11.0,<4.0
aws-requests-auth>=0.4.3
boto3>=1.35.92
cffi>=1.17.1
boto3>=1.40.59
cffi>=2.0.0
croniter>=6.0.0
elasticsearch==7.10.1
envparse>=0.2.0
exotel==0.1.5
Jinja2>=3.1.5
jira>=3.8.0
Jinja2>=3.1.6
jira>=3.10.5
jsonpointer>=3.0.0
jsonschema>=4.23.0
prettytable>=3.12.0
jsonschema>=4.25.1
prettytable>=3.16.0
prison>=0.2.1
prometheus-client>=0.21.1
prometheus-client>=0.23.1
python-dateutil>=2.9.0.post0
PyYAML>=6.0.2
PyYAML>=6.0.3
py-zabbix>=1.1.7
requests>=2.32.3
requests>=2.32.5
sortedcontainers>=2.4.0
statsd-tags==3.2.1.post1
stomp.py>=8.2.0
tencentcloud-sdk-python>=3.0.1295
tencentcloud-sdk-python>=3.0.1479
texttable>=1.7.0
twilio>=9.4.1
twilio>=9.8.4
30 changes: 16 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"Discussion Forum": "https://github.com/jertel/elastalert2/discussions",
},
classifiers=[
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
Expand All @@ -33,30 +35,30 @@
package_data={'elastalert': ['schema.yaml', 'es_mappings/**/*.json']},
python_requires='>=3.12',
install_requires=[
'apscheduler>=3.10.4,<4.0',
'apscheduler>=3.11.0,<4.0',
'aws-requests-auth>=0.4.3',
'boto3>=1.34.54',
'cffi>=1.16.0',
'croniter>=2.0.2',
'boto3>=1.40.59',
'cffi>=2.0.0',
'croniter>=6.0.0',
'elasticsearch==7.10.1',
'envparse>=0.2.0',
'exotel==0.1.5',
'Jinja2>=3.1.3',
'jira>=3.6.0',
'jsonpointer>=2.4',
'jsonschema>=4.21.1',
'prettytable>=3.10.0',
'Jinja2>=3.1.6',
'jira>=3.10.5',
'jsonpointer>=3.0.0',
'jsonschema>=4.25.1',
'prettytable>=3.16.0',
'prison>=0.2.1',
'prometheus_client>=0.20.0',
'prometheus_client>=0.23.1',
'python-dateutil>=2.9.0.post0',
'PyYAML>=6.0.1',
'PyYAML>=6.0.3',
'py-zabbix>=1.1.7',
'requests>=2.31.0',
'sortedcontainers>=2.4.0',
'statsd-tags==3.2.1.post1',
'stomp.py>=8.1.0',
'tencentcloud-sdk-python>=3.0.1098',
'stomp.py>=8.2.0',
'tencentcloud-sdk-python>=3.0.1479',
'texttable>=1.7.0',
'twilio>=8.13.0',
'twilio>=9.8.4',
]
)
2 changes: 1 addition & 1 deletion tests/Dockerfile-test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.13-slim
FROM python:3.14-slim

RUN apt update && apt upgrade -y
RUN apt install -y gcc libffi-dev
Expand Down
2 changes: 2 additions & 0 deletions tests/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ markers =
elasticsearch: mark a test as using elasticsearch.
filterwarnings =
ignore::pytest.PytestUnhandledThreadExceptionWarning
ignore:cannot collect 'test.*' because it is not a function
ignore:cannot collect 'test_.*' because it is not a function
2 changes: 1 addition & 1 deletion tests/tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
project = elastalert
envlist = py313,docs
envlist = py314,docs
setupdir = ..

[testenv]
Expand Down