Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
395 commits
Select commit Hold shift + click to select a range
bf38593
add: custom timeframe testing support
Nov 1, 2018
8699a83
Add slack_title option
watsonlu Nov 13, 2018
cc6fb7f
Add slack title to body
watsonlu Nov 13, 2018
5136fd3
Merge tag 'v0.1.37' into rules_loader
pdscopes Nov 14, 2018
2277407
* Repaired tests
pdscopes Nov 14, 2018
eb4834e
Adds PagerTree Alerter
armiiller Nov 16, 2018
95ab9df
Add the proxy
armiiller Nov 16, 2018
32cd8d7
Fix the PagerTree url
armiiller Nov 16, 2018
530d239
Format for PagerTree webhook format
armiiller Nov 16, 2018
9382886
use the whole uuid for pagertree id
armiiller Nov 16, 2018
410736b
Adds changelog for PagerTree addition
armiiller Nov 16, 2018
c162c22
Test want 2 blank lines
armiiller Nov 16, 2018
adea2dd
Updated the writeback suffix to include customer id
Nov 28, 2018
e5bb26f
writeback suffix is formatted with content from match body
Nov 28, 2018
6d05142
Merge pull request #7 in EIN/elastalert from feature/RL-356-include-m…
pdscopes Nov 28, 2018
80f27e2
Added try-except in case suffix key is not in match_body
pdscopes Nov 29, 2018
508bf6d
Correctly check if template exists and delete
pdscopes Nov 29, 2018
6c540e3
Add a missing comma to fix dependency error
sean-kang Nov 30, 2018
0607a93
Merge pull request #2025 from pdscopes/writeback_alias
Qmando Dec 12, 2018
f64e76c
Merge remote-tracking branch 'github/beta' into beta/loader
pdscopes Dec 13, 2018
a6f92e3
Completed merge remote-tracking branch 'github/beta' into beta/loader
pdscopes Dec 13, 2018
4938e48
Fixed a bug causing buffer_time to sometimes be ignored
Qmando Dec 14, 2018
05c65ad
Added a unit test to prevent regressions
Qmando Dec 14, 2018
0eefb94
Merge pull request #2031 from Yelp/fix_starttime_bug
Qmando Dec 14, 2018
67231d3
Avoid writing slack_webhook_url in elastalert_status index
AxelMonroyX Dec 14, 2018
09cc9fc
Merge pull request #2032 from AxelMonroyX/master
Qmando Dec 15, 2018
061a55a
Read logging configuration from config file
eht16 Aug 16, 2017
96092f4
Merge pull request #1293 from eht16/logging_config
Qmando Dec 17, 2018
a044b7a
Merge pull request #2016 from sean-kang/beta
Qmando Dec 17, 2018
ea9874a
Merge pull request #2030 from pdscopes/beta_loader
Qmando Dec 17, 2018
e823ce8
Merge pull request #2001 from armiiller/master
Qmando Dec 17, 2018
a45e505
Merge pull request #1998 from watsonlu/slack_title
Qmando Dec 17, 2018
d8cba6a
Merge pull request #1985 from abhishekjiitr/patch
Qmando Dec 17, 2018
e974e24
Merge branch 'master' into master
Qmando Dec 17, 2018
1792219
Merge pull request #1625 from idealphase/master
Qmando Dec 17, 2018
a0a89ca
Version 0.1.38
Qmando Dec 17, 2018
69d9b9f
Fixing, Issue Yelp#1574
Dec 18, 2018
1271ec2
Merge pull request #2035 from corp-BlakeRandall/bugfix/1574
Qmando Dec 18, 2018
e888b4d
Fix Docs: Writing Filters, add ES version info
abhishekjiitr Dec 19, 2018
b97b7c4
Merge pull request #2039 from abhishekjiitr/patch-1
Qmando Dec 19, 2018
2b84786
Add match timestamp to pagerduty v2 api
Qmando Dec 19, 2018
5ef4ed0
support for spike alerts based on single metric aggregations
dylanjf Dec 28, 2018
0d2ea75
tidy up example rule, revert unnecessary return
dylanjf Dec 28, 2018
f923202
spike aggregation documentation
dylanjf Dec 28, 2018
ec9c6e2
allow decimal threshholds for spike aggregations
dylanjf Jan 3, 2019
f596c16
Fixed an issue with using nested field_value
Qmando Jan 3, 2019
42e39e3
Merge github.com:Yelp/elastalert
Qmando Jan 3, 2019
67d67fe
added min_doc_count to aggregations to allow for count-based threshho…
dylanjf Jan 4, 2019
2e86af0
support for spike alerts based on single metric aggregations
dylanjf Dec 28, 2018
fc4a8a5
tidy up example rule, revert unnecessary return
dylanjf Dec 28, 2018
ade12c4
spike aggregation documentation
dylanjf Dec 28, 2018
1a07f51
allow decimal threshholds for spike aggregations
dylanjf Jan 3, 2019
382aacd
added min_doc_count to aggregations to allow for count-based threshho…
dylanjf Jan 4, 2019
9a1b294
Merge branch 'master' of github.com:dylanjf/elastalert
dylanjf Jan 7, 2019
59b6975
Changed return codes for test rule
Jan 8, 2019
ff5769a
Merge pull request #2063 from thommor/beta
Qmando Jan 9, 2019
25af7ba
Merge pull request #2052 from dylanjf/master
Qmando Jan 9, 2019
b57d75f
Using SSL with stomp alerts
mnivedithaa Jan 9, 2019
ea47c72
Update alerts.py
mnivedithaa Jan 9, 2019
7238fd7
Merge pull request #2065 from mnivedithaa/patch-1
Qmando Jan 9, 2019
707be1d
Alerts: create_custom_title can respect a configurable max length
Jan 10, 2019
35fb95e
Merge pull request #2069 from SchumacherFM/master
Qmando Jan 10, 2019
f7a1cfa
Fixes create_index.py to make it possible to overwrite the config fil…
Salaander Jan 29, 2019
5fe946b
Merge pull request #2103 from Salaander/fix2097
Qmando Jan 29, 2019
9ec5a78
Changed self.smtp.close() to self.smtp.quit() as per documentation
Feb 4, 2019
a081c9e
Fixed email_tests
Feb 4, 2019
219ee81
Fix theHive alerter documentation
Feb 12, 2019
c16886f
Adding fixes from elastalert_hive_alerter 1.0.0rc2
danielbrownevoss Feb 15, 2019
af9200c
Correctly set `realert`, `aggregation`, `query_delay` from the config
kiwiz Feb 15, 2019
ffa7634
Add exponential_realert to the list of inherited fields
kiwiz Feb 15, 2019
fc1995c
Adding missing imports
danielbrownevoss Feb 18, 2019
4a3f2e9
Merge pull request #2137 from kiwiz/master
Qmando Feb 20, 2019
ff4726f
Check for rule matches as well to avoid a potential KeyError
danielbrownevoss Feb 21, 2019
a854270
Neatening code to pass linting
danielbrownevoss Feb 21, 2019
e2a438f
Merge pull request #2136 from Nclose-ZA/master
Qmando Feb 21, 2019
a8bfdfc
Add support for `min_doc_count` to terms queries
kiwiz Feb 22, 2019
5d7ee22
First version of zabbix alert
alvarolmedo Mar 1, 2019
1fe7047
flake8
alvarolmedo Mar 1, 2019
196a23e
flake8 2
alvarolmedo Mar 1, 2019
7016ce1
Fixing bug where artifact creation would be attempted when requested …
danielbrownevoss Mar 8, 2019
e41ea55
Merge pull request #2164 from Nclose-ZA/master
Qmando Mar 8, 2019
ed03772
Remove all the commented out imports
alvarolmedo Mar 25, 2019
6d28836
Merge pull request #2151 from kiwiz/terms_min_doc_count
Qmando Mar 25, 2019
a8487ad
Add ability to lookup into arrays
Qmando Mar 26, 2019
1e5d866
Added documentation
Qmando Mar 27, 2019
9c27c88
Point travis repo status badge to matsgoran/elastalert
matsgoran Mar 27, 2019
bc4e204
Move json mappings into files
matsgoran Mar 27, 2019
5d6bc7a
Remove mapping types in Elastic 6 index mappings
matsgoran Mar 27, 2019
7f5201b
Merge pull request #2181 from Yelp/add_array_lookups
Qmando Mar 27, 2019
fe02d35
Create index using es_mapping files. Use preferred _doc type name for
matsgoran Mar 28, 2019
940f187
Add elasticsearch test stage to travis ci
matsgoran Mar 28, 2019
f900674
Fix broken TravisCI Elasticsearch build stage
matsgoran Mar 28, 2019
b942cb0
Add support for 6.6 <= Elasticsearch <= 7.x
matsgoran Mar 29, 2019
79ae5ba
Merge pull request #2131 from kalimer0x00/master
Qmando Mar 29, 2019
5f1df57
Merge pull request #2115 from thommor/smtplib
Qmando Mar 29, 2019
527fd7b
Merge pull request #2040 from Yelp/pagerduty_timestamp
Qmando Mar 29, 2019
98c7867
Version 0.1.39
Qmando Mar 29, 2019
c0054e2
Test create_index in elasticsearch with bugfixes
matsgoran Apr 1, 2019
a6ec405
Travis: DRY avoid repating install and script in all elasticsearch
matsgoran Apr 1, 2019
a0e68fe
Extend ElasticSearch and move elasticsearch version checks into extended
matsgoran Apr 4, 2019
fa0804f
Moved ElasticSearchClient into package, added docstrings, skip ordinary
matsgoran Apr 5, 2019
1fbd5dd
Revert travis repo badge back to Yelp/elastalert
matsgoran Apr 5, 2019
5b9592b
Fixup files with no new line at end of file
matsgoran Apr 5, 2019
340930e
Enhance es version check in rule_from_kibana.py
matsgoran Apr 5, 2019
1c0d0eb
Yaml Loader added to avoid deprecation warnings
alvarolmedo Apr 8, 2019
0f33e0c
Bug fixed
alvarolmedo Apr 8, 2019
33e6ab5
Updated to elasticsearch-py==7
matsgoran Apr 12, 2019
2434ef6
Elasticsearch did not allow 'doc_type' starting with _ until
matsgoran Apr 12, 2019
ad4aef3
Fix an issue with nested timestamp in cardinality rules (again)
nmerdan Apr 17, 2019
9d5f6a9
Merge pull request #2213 from nmerdan/fix-cardinality
Qmando Apr 18, 2019
2647c7d
Update config.py
xuing Apr 19, 2019
435acbf
Cast --timeout argument to int in elastalert-create-index.
matsgoran Apr 25, 2019
d81dd93
Bugfix elastalert-create-index console script
matsgoran Apr 25, 2019
e718988
Add `max_scrolling_count` setting to limit scrolling behavior
Apr 29, 2019
da34191
Merge remote-tracking branch 'matsgoran/doc_type_and_support_for_es66…
Qmando May 1, 2019
f2d80c0
Merged matsgoran's Elasticsearch 7 branch
Qmando May 1, 2019
acc29e0
Merged with latest beta branch
Qmando May 1, 2019
2734c2e
Added a note on ES7 to the readme
Qmando May 3, 2019
906d711
Update ruletypes.rst
0xflotus May 4, 2019
78b92ad
Merge pull request #1 from 0xflotus/patch-1
0xflotus May 4, 2019
7dc5e6f
Merge pull request #2233 from 0xflotus/master
Qmando May 6, 2019
483b16f
remove deprecated option from guide
caleb15 May 6, 2019
0f54df5
Merge pull request #2236 from caleb15/patch-2
Qmando May 7, 2019
09a3eb6
Merge pull request #2230 from KarolyBujtor/max_scrolling
Qmando May 10, 2019
0d92b9b
Comments removed
alvarolmedo May 21, 2019
0db4e71
Doc added
alvarolmedo May 21, 2019
4afb958
Merge branch 'master' into master
alvarolmedo May 21, 2019
d8d2e15
E303 too many blank lines
alvarolmedo May 21, 2019
2ac552b
Merge branch 'master' of github.com:alvarolmedo/elastalert
alvarolmedo May 21, 2019
906d98c
Merge pull request #2216 from xuing/patch-1
Qmando May 22, 2019
071f961
Merge pull request #2154 from alvarolmedo/master
Qmando May 31, 2019
ed1ee6f
cleart scroll if not used anymore
Jun 3, 2019
1b5cb2b
Verify _scroll_id exists to pass test
Jun 3, 2019
3b871b4
Merge pull request #2271 from agix/clear_scroll
Qmando Jun 3, 2019
adf0667
Merge changes from master
Qmando Jun 7, 2019
74da1c7
Python3 supprt
Qmando Jun 7, 2019
ef1ed34
Changed travis config to py36
Qmando Jun 10, 2019
d0bd10e
Show disabled rules
alvarolmedo Jul 9, 2019
cab5bc8
E265 block comment should start with '# '
alvarolmedo Jul 9, 2019
34d9501
Config param to control the output of disabled_rules
alvarolmedo Jul 10, 2019
7fb3485
Extract conf param directly in elastalert class and remove print func…
alvarolmedo Jul 10, 2019
3c9fce5
Merge pull request #2329 from alvarolmedo/task/public_disabled_rules
Qmando Jul 10, 2019
7980f9b
Only print disabled rule names
Qmando Jul 10, 2019
76ab593
When user chooses a compound query key, the split is not performed co…
vsabelli Jul 12, 2019
b341220
Added support to use match fields to populate opsgenie_alias in integ…
vsabelli Jul 12, 2019
8abff23
Removed unused variable (to fix error in Travis CI).
vsabelli Jul 12, 2019
386708e
Fix for variable type (to solve Travis CI problem).
vsabelli Jul 12, 2019
8219e09
Fix paste error (for Travis CI problem).
vsabelli Jul 12, 2019
112d10b
Merge pull request #2333 from SabobaS/master
Qmando Jul 12, 2019
929c1cc
Merge pull request #2285 from Yelp/beta_py3
Qmando Jul 15, 2019
df4ef0c
Fixed elasticsearch tests
Qmando Jul 15, 2019
ecf40ad
Fixed tests by setting some default args
Qmando Jul 15, 2019
4fca698
Fix Invalid Example Rule File
abhishekjiitr Jul 17, 2019
fbda034
Merge pull request #2346 from abhishekjiitr/patch-4
Qmando Jul 18, 2019
aaeec1b
Remove dead links.
asherf Jul 23, 2019
b65b971
Adds to the elasticsearch mapping a dynaic_templates configuration. N…
Jul 24, 2019
4b927b9
Enables querying the source index and correlate with ElastAlert.
Jul 25, 2019
bb248f9
Add sample rules
Jul 25, 2019
faad1ff
Merge pull request #2358 from RubieV/master
Qmando Jul 25, 2019
70dab8f
Add "http_post_headers" to documentation
watsonlu Jul 29, 2019
f6ce422
Fixed deprecated search
Qmando Jul 29, 2019
92d7327
Remove doc_type warning
Qmando Jul 29, 2019
6950ea8
Fix deprecated_search return type for all versions
Qmando Jul 29, 2019
123c980
Merge pull request #2371 from watsonlu/patch-1
Qmando Jul 29, 2019
007f4a5
Add retries and caching to ES info
Qmando Jul 29, 2019
e79eb40
Reraise error if retries fail (get_info)
Qmando Jul 30, 2019
3b8f3d5
Merge pull request #2372 from Yelp/beta_fixes
Qmando Jul 30, 2019
3d103ee
Update elastalert/test_rule.py
Qmando Aug 1, 2019
b1a9680
Merge pull request #2339 from Yelp/fix_test_rule
Qmando Aug 1, 2019
3555fae
Fix deprecated_Search
Qmando Aug 2, 2019
b132628
Merge pull request #2354 from asherf/fix-readme
Qmando Aug 7, 2019
14315e0
Merged all beta changes into master
Qmando Aug 7, 2019
3605813
Merge github.com:Yelp/elastalert
Qmando Aug 7, 2019
15ed577
Version 0.2.0
Qmando Aug 7, 2019
f30de39
Remove ES7 note
Qmando Aug 7, 2019
2ba314e
Fix a bug introduced in 2.0 merge
Qmando Aug 8, 2019
4dd50dc
Version 0.2.1
Qmando Aug 8, 2019
a5322f2
Catch Scroll Clear NotFound Error
abhishekjiitr Aug 12, 2019
1df5e8f
update requirements, docs, changelog
Qmando Aug 12, 2019
c15902c
Merge pull request #2394 from abhishekjiitr/fix-clear-scroll
Qmando Aug 13, 2019
3affdd7
Fixed config.yaml default regression
Qmando Aug 13, 2019
1d3c102
Remove hive_port
defensivedepth Aug 21, 2019
d75a07f
Fix Running ElastAlert instructions in README
abhishekjiitr Aug 23, 2019
0022a01
convert str to byte before pipe it to command
baluluyakalulu Sep 3, 2019
e82ab25
Merge pull request #2438 from gza/fix_pipe_to_command
Qmando Sep 3, 2019
0a7e71b
update jira to version that works with 3.7
caleb15 Sep 6, 2019
16a464e
Updating the docker test file to work with python 3.6
JeffAshton Sep 12, 2019
cfa98a1
Switching test_rule to use load_yaml
JeffAshton Sep 13, 2019
fa3b1b2
Merge pull request #2457 from Brightspace/test_rule_load_yaml
Qmando Sep 16, 2019
c3ac34a
Merge pull request #2455 from JeffAshton/JeffAshton/fix-docker-test-file
Qmando Sep 16, 2019
707b2a5
Handling non-compound query keys defined as an array
JeffAshton Sep 18, 2019
070bb1c
Adding support for generating Kibana Discover app link
JeffAshton Sep 19, 2019
89b96ad
Renaming the kibana_discover_link function
JeffAshton Sep 20, 2019
47cad17
Pruning the duplicate requirements
JeffAshton Sep 20, 2019
e5d20ea
Generate kibana discover link (#3)
JeffAshton Sep 20, 2019
8276014
Renaming to generate_kibana_discover_url (#4)
JeffAshton Sep 20, 2019
53ab1ba
Ensuring the version is a string (#5)
JeffAshton Sep 20, 2019
d719203
Upgrading jsonschema library to 3.0.2
JeffAshton Sep 20, 2019
28e3ff1
Updating to use draft 7
JeffAshton Sep 20, 2019
29b380e
Fixing the outstanding documentation warnings
JeffAshton Sep 20, 2019
9178b7d
Removing empty header
JeffAshton Sep 20, 2019
8ddfa70
Treating documentation warnings as errors
JeffAshton Sep 20, 2019
1392521
Making schema more strict (#8)
JeffAshton Sep 20, 2019
db10b2c
Stop job when it gets disabled
Qmando Sep 23, 2019
3c0aa03
Added a test for rule scheduler removal
Qmando Sep 23, 2019
fbb9697
Merge pull request #2484 from Yelp/fix_rule_disable
Qmando Sep 23, 2019
811ba59
Merge pull request #2479 from JeffAshton/fixing-documentation-warnings
Qmando Sep 23, 2019
df3a163
Merge pull request #2478 from JeffAshton/upgrade-json-schema
Qmando Sep 23, 2019
4935ac4
Merge pull request #2476 from JeffAshton/purne-duplicate-requirements
Qmando Sep 23, 2019
365478d
Merge pull request #2474 from JeffAshton/kibana-discover-link
Qmando Sep 23, 2019
2791119
Merge pull request #2467 from JeffAshton/non-compound-query-key-arrays
Qmando Sep 23, 2019
71087e3
Merge branch 'master' into patch-3
Qmando Sep 24, 2019
0172a8a
Merge pull request #2442 from caleb15/patch-3
Qmando Sep 24, 2019
9629a65
Merge pull request #2416 from defensivedepth/patch-1
Qmando Sep 24, 2019
872826c
Merge pull request #2419 from abhishekjiitr/patch-6
Qmando Sep 24, 2019
a02b146
Adding ability to attach the Kibana Discover url as a seperate attach…
JeffAshton Sep 25, 2019
74ef682
Adding ability to map match fields into opsgenie details
JeffAshton Sep 26, 2019
9c2c898
Merge pull request #2488 from JeffAshton/slack-kibana-discover-url-at…
Qmando Sep 27, 2019
325f1df
Merge pull request #2489 from JeffAshton/opsgenie_details_fields
Qmando Sep 27, 2019
511538b
updated rules_mapping to include spike_aggregation
pgardiner Nov 18, 2019
1e7082b
Allow run_every to be unique per rule
Qmando Dec 5, 2019
56b2aaa
Merge github.com:Yelp/elastalert into fix_497
Qmando Dec 5, 2019
bdbe144
Pin elasticsearch to 7.0.0 in setup.py
Qmando Dec 5, 2019
ec5d03b
Pin covereage version
Qmando Jan 2, 2020
1334b61
Merge pull request #2593 from Yelp/fix_497
Qmando Jan 28, 2020
f8f6fc5
Merge pull request #2570 from pgardiner/master
Qmando Apr 7, 2020
5411c8c
Removed thehive alerter
Qmando Apr 14, 2020
836ca65
Merge pull request #2738 from Yelp/remove_thehive
Qmando Apr 14, 2020
b45d767
Updated changelog for 0.2.2
Qmando Apr 14, 2020
6a4ae2d
Re-add TheHive alerter without any libraries
Qmando Apr 15, 2020
d175425
Merge pull request #2741 from Yelp/add_hive_alerter
Qmando Apr 15, 2020
4ebdabf
version 0.2.3
Qmando Apr 15, 2020
6d5edf0
Fix documentation
Qmando Apr 15, 2020
cd6d555
Added back custom fields to the hive alerter
Qmando Apr 16, 2020
074550f
Merge pull request #2743 from Yelp/thehive_customfields
Qmando Apr 16, 2020
7d369e4
Version 0.2.4
Qmando Apr 16, 2020
8205d53
Update elastalert-test-rule to use ascii_letters
ferozsalam May 3, 2020
c6524a3
Merge pull request #2782 from ferozsalam/master
Qmando May 13, 2020
d715163
Fix Flake Lint Ambiguous Variable Error
abhishekjiitr May 26, 2020
f4bad06
Merge pull request #2823 from abhishekjiitr/fix-lint-error
Qmando Jun 2, 2020
11cd9bd
Fix slack kibana properties
varunvora Jul 29, 2020
f41552e
Merge pull request #2898 from varunvora/patch-1
Qmando Aug 26, 2020
3900292
Fix exotelto docs
nsano-rururu Aug 29, 2020
23c9e64
Merge pull request #2948 from nsano-rururu/exotel-docs-update
Qmando Aug 31, 2020
cfad1cc
fix issue 2518, where false positive may be triggered sometimes
singyiu Aug 31, 2020
52a1251
Merge pull request #2950 from singyiu/issue-2518
Qmando Sep 1, 2020
ea62cf4
remove python-magic requirement
Qmando Sep 11, 2020
734caf2
Fix the use of timestamps in the Jira ticket titles
ferozsalam Oct 5, 2020
1dc4f30
Merge pull request #2978 from ferozsalam/fix-jira-alert-titles
Qmando Nov 9, 2020
e0bbcb5
Link to elastalert2
Qmando Nov 12, 2022
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
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

[*.py]
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab

[{*.json,*.yml,*.yaml}]
indent_style = space
indent_size = 2
29 changes: 26 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
language: python
python:
- '2.7'
- '3.6'
env:
- TOXENV=docs
- TOXENV=py27
- TOXENV=py36
install:
- pip install tox
script: make test
- >
if [[ -n "${ES_VERSION}" ]] ; then
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
mkdir elasticsearch-${ES_VERSION} && tar -xzf elasticsearch-${ES_VERSION}.tar.gz -C elasticsearch-${ES_VERSION} --strip-components=1
./elasticsearch-${ES_VERSION}/bin/elasticsearch &
fi
script:
- >
if [[ -n "${ES_VERSION}" ]] ; then
wget -q --waitretry=1 --retry-connrefused --tries=30 -O - http://127.0.0.1:9200
make test-elasticsearch
else
make test
fi
jobs:
include:
- stage: 'Elasticsearch test'
env: TOXENV=py36 ES_VERSION=7.0.0-linux-x86_64
- env: TOXENV=py36 ES_VERSION=6.6.2
- env: TOXENV=py36 ES_VERSION=6.3.2
- env: TOXENV=py36 ES_VERSION=6.2.4
- env: TOXENV=py36 ES_VERSION=6.0.1
- env: TOXENV=py36 ES_VERSION=5.6.16

deploy:
provider: pypi
user: yelplabs
Expand Down
6 changes: 2 additions & 4 deletions Dockerfile-test
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM ubuntu:latest

RUN apt-get update && apt-get upgrade -y
RUN apt-get -y install build-essential python-setuptools python2.7 python2.7-dev libssl-dev git tox

RUN easy_install pip
RUN apt-get -y install build-essential python3.6 python3.6-dev python3-pip libssl-dev git

WORKDIR /home/elastalert

ADD requirements*.txt ./
RUN pip install -r requirements-dev.txt
RUN pip3 install -r requirements-dev.txt
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ install-hooks:
test:
tox

test-elasticsearch:
tox -- --runelasticsearch

test-docker:
docker-compose --project-name elastalert build tox
docker-compose --project-name elastalert run tox
Expand Down
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Stories in Ready](https://badge.waffle.io/Yelp/elastalert.png?label=ready&title=Ready)](https://waffle.io/Yelp/elastalert)
[![Stories in In Progress](https://badge.waffle.io/Yelp/elastalert.png?label=in%20progress&title=In%20Progress)](https://waffle.io/Yelp/elastalert)
**ElastAlert is no longer maintained. Please use [ElastAlert2](https://github.com/jertel/elastalert2) instead.**


[![Build Status](https://travis-ci.org/Yelp/elastalert.svg)](https://travis-ci.org/Yelp/elastalert)
[![Join the chat at https://gitter.im/Yelp/elastalert](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Yelp/elastalert?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand Down Expand Up @@ -47,12 +48,16 @@ Currently, we have built-in support for the following alert types:
- MS Teams
- Slack
- Telegram
- GoogleChat
- AWS SNS
- VictorOps
- PagerDuty
- PagerTree
- Exotel
- Twilio
- Gitter
- Line Notify
- Zabbix

Additional rule types and alerts can be easily imported or written.

Expand All @@ -67,8 +72,23 @@ In addition to this basic usage, there are many other features that make alerts
To get started, check out `Running ElastAlert For The First Time` in the [documentation](http://elastalert.readthedocs.org).

## Running ElastAlert
You can either install the latest released version of ElastAlert using pip:

```pip install elastalert```

or you can clone the ElastAlert repository for the most recent changes:

```git clone https://github.com/Yelp/elastalert.git```

Install the module:

```pip install "setuptools>=11.3"```

```python setup.py install```

The following invocation can be used to run ElastAlert after installing

``$ python elastalert/elastalert.py [--debug] [--verbose] [--start <timestamp>] [--end <timestamp>] [--rule <filename.yaml>] [--config <filename.yaml>]``
``$ elastalert [--debug] [--verbose] [--start <timestamp>] [--end <timestamp>] [--rule <filename.yaml>] [--config <filename.yaml>]``

``--debug`` will print additional information to the screen as well as suppresses alerts and instead prints the alert body. Not compatible with `--verbose`.

Expand All @@ -88,11 +108,11 @@ Eg: ``--rule this_rule.yaml``

## Third Party Tools And Extras
### Kibana plugin
![img](https://raw.githubusercontent.com/bitsensor/elastalert-kibana-plugin/master/kibana-elastalert-plugin-showcase.gif)
![img](https://raw.githubusercontent.com/bitsensor/elastalert-kibana-plugin/master/showcase.gif)
Available at the [ElastAlert Kibana plugin repository](https://github.com/bitsensor/elastalert-kibana-plugin).

### Docker
A [Dockerized version](https://github.com/bitsensor/elastalert) of ElastAlert including a REST api is build from `master` to `bitsensor/elastalert:latest`.
A [Dockerized version](https://github.com/bitsensor/elastalert) of ElastAlert including a REST api is build from `master` to `bitsensor/elastalert:latest`.

```bash
git clone https://github.com/bitsensor/elastalert.git; cd elastalert
Expand Down
115 changes: 115 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,120 @@
# Change Log

# v0.2.4

### Added
- Added back customFields support for The Hive

# v0.2.3

### Added
- Added back TheHive alerter without TheHive4py library

# v0.2.2

### Added
- Integration with Kibana Discover app
- Addied ability to specify opsgenie alert details 

### Fixed
- Fix some encoding issues with command alerter
- Better error messages for missing config file
- Fixed an issue with run_every not applying per-rule
- Fixed an issue with rules not being removed
- Fixed an issue with top count keys and nested query keys
- Various documentation fixes
- Fixed an issue with not being able to use spike aggregation

### Removed
- Remove The Hive alerter

# v0.2.1

### Fixed
- Fixed an AttributeError introduced in 0.2.0

# v0.2.0

- Switched to Python 3

### Added
- Add rule loader class for customized rule loading
- Added thread based rules and limit_execution
- Run_every can now be customized per rule

### Fixed
- Various small fixes

# v0.1.39

### Added
- Added spike alerts for metric aggregations
- Allow SSL connections for Stomp
- Allow limits on alert text length
- Add optional min doc count for terms queries
- Add ability to index into arrays for alert_text_args, etc

### Fixed
- Fixed bug involving --config flag with create-index
- Fixed some settings not being inherited from the config properly
- Some fixes for Hive alerter
- Close SMTP connections properly
- Fix timestamps in Pagerduty v2 payload
- Fixed an bug causing aggregated alerts to mix up

# v0.1.38

### Added
- Added PagerTree alerter
- Added Line alerter
- Added more customizable logging
- Added new logic in test-rule to detemine the default timeframe

### Fixed
- Fixed an issue causing buffer_time to sometimes be ignored

# v0.1.37

### Added
- Added more options for Opsgenie alerter
- Added more pagerduty options
- Added ability to add metadata to elastalert logs

### Fixed
- Fixed some documentation to be more clear
- Stop requiring doc_type for metric aggregations
- No longer puts quotes around regex terms in blacklists or whitelists

# v0.1.36

### Added
- Added a prefix "metric_" to the key used for metric aggregations to avoid possible conflicts
- Added option to skip Alerta certificate validation

### Fixed
- Fixed a typo in the documentation for spike rule

# v0.1.35

### Fixed
- Fixed an issue preventing new term rule from working with terms query

# v0.1.34

### Added
- Added prefix/suffix support for summary table
- Added support for ignoring SSL validation in Slack
- More visible exceptions during query parse failures

### Fixed
- Fixed top_count_keys when using compound query_key
- Fixed num_hits sometimes being reported too low
- Fixed an issue with setting ES_USERNAME via env
- Fixed an issue when using test script with custom timestamps
- Fixed a unicode error when using Telegram
- Fixed an issue with jsonschema version conflict
- Fixed an issue with nested timestamps in cardinality type

# v0.1.33

### Added
Expand Down
51 changes: 51 additions & 0 deletions config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,59 @@ es_port: 9200
# This can be a unmapped index, but it is recommended that you run
# elastalert-create-index to set a mapping
writeback_index: elastalert_status
writeback_alias: elastalert_alerts

# If an alert fails for some reason, ElastAlert will retry
# sending the alert until this time period has elapsed
alert_time_limit:
days: 2

# Custom logging configuration
# If you want to setup your own logging configuration to log into
# files as well or to Logstash and/or modify log levels, use
# the configuration below and adjust to your needs.
# Note: if you run ElastAlert with --verbose/--debug, the log level of
# the "elastalert" logger is changed to INFO, if not already INFO/DEBUG.
#logging:
# version: 1
# incremental: false
# disable_existing_loggers: false
# formatters:
# logline:
# format: '%(asctime)s %(levelname)+8s %(name)+20s %(message)s'
#
# handlers:
# console:
# class: logging.StreamHandler
# formatter: logline
# level: DEBUG
# stream: ext://sys.stderr
#
# file:
# class : logging.FileHandler
# formatter: logline
# level: DEBUG
# filename: elastalert.log
#
# loggers:
# elastalert:
# level: WARN
# handlers: []
# propagate: true
#
# elasticsearch:
# level: WARN
# handlers: []
# propagate: true
#
# elasticsearch.trace:
# level: WARN
# handlers: []
# propagate: true
#
# '': # root logger
# level: WARN
# handlers:
# - console
# - file
# propagate: false
33 changes: 31 additions & 2 deletions docs/source/elastalert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ Currently, we have support built in for these alert types:
- HipChat
- Slack
- Telegram
- GoogleChat
- Debug
- Stomp
- TheHive

Additional rule types and alerts can be easily imported or written. (See :ref:`Writing rule types <writingrules>` and :ref:`Writing alerts <writingalerts>`)

Expand Down Expand Up @@ -131,9 +133,12 @@ The environment variable ``ES_USE_SSL`` will override this field.

``es_conn_timeout``: Optional; sets timeout for connecting to and reading from ``es_host``; defaults to ``20``.

``rules_loader``: Optional; sets the loader class to be used by ElastAlert to retrieve rules and hashes.
Defaults to ``FileRulesLoader`` if not set.

``rules_folder``: The name of the folder which contains rule configuration files. ElastAlert will load all
files in this folder, and all subdirectories, that end in .yaml. If the contents of this folder change, ElastAlert will load, reload
or remove rules based on their respective config files.
or remove rules based on their respective config files. (only required when using ``FileRulesLoader``).

``scan_subdirectories``: Optional; Sets whether or not ElastAlert should recursively descend the rules directory - ``true`` or ``false``. The default is ``true``

Expand All @@ -146,7 +151,11 @@ configuration.

``max_query_size``: The maximum number of documents that will be downloaded from Elasticsearch in a single query. The
default is 10,000, and if you expect to get near this number, consider using ``use_count_query`` for the rule. If this
limit is reached, ElastAlert will `scroll <https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html>`_ through pages the size of ``max_query_size`` until processing all results.
limit is reached, ElastAlert will `scroll <https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html>`_
using the size of ``max_query_size`` through the set amount of pages, when ``max_scrolling_count`` is set or until processing all results.

``max_scrolling_count``: The maximum amount of pages to scroll through. The default is ``0``, which means the scrolling has no limit.
For example if this value is set to ``5`` and the ``max_query_size`` is set to ``10000`` then ``50000`` documents will be downloaded at most.

``scroll_keepalive``: The maximum time (formatted in `Time Units <https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units>`_) the scrolling context should be kept alive. Avoid using high values as it abuses resources in Elasticsearch, but be mindful to allow sufficient time to finish processing all the results.

Expand All @@ -161,6 +170,8 @@ from that time, unless it is older than ``old_query_limit``, in which case it wi
will upload a traceback message to ``elastalert_metadata`` and if ``notify_email`` is set, send an email notification. The
rule will no longer be run until either ElastAlert restarts or the rule file has been modified. This defaults to True.

``show_disabled_rules``: If true, ElastAlert show the disable rules' list when finishes the execution. This defaults to True.

``notify_email``: An email address, or list of email addresses, to which notification emails will be sent. Currently,
only an uncaught exception will send a notification email. The from address, SMTP host, and reply-to header can be set
using ``from_addr``, ``smtp_host``, and ``email_reply_to`` options, respectively. By default, no emails will be sent.
Expand Down Expand Up @@ -188,6 +199,24 @@ The default value is ``False``. Elasticsearch 2.0 - 2.3 does not support dots in
``string_multi_field_name``: If set, the suffix to use for the subfield for string multi-fields in Elasticsearch.
The default value is ``.raw`` for Elasticsearch 2 and ``.keyword`` for Elasticsearch 5.

``add_metadata_alert``: If set, alerts will include metadata described in rules (``category``, ``description``, ``owner`` and ``priority``); set to ``True`` or ``False``. The default is ``False``.

``skip_invalid``: If ``True``, skip invalid files instead of exiting.

Logging
-------

By default, ElastAlert uses a simple basic logging configuration to print log messages to standard error.
You can change the log level to ``INFO`` messages by using the ``--verbose`` or ``--debug`` command line options.

If you need a more sophisticated logging configuration, you can provide a full logging configuration
in the config file. This way you can also configure logging to a file, to Logstash and
adjust the logging format.

For details, see the end of ``config.yaml.example`` where you can find an example logging
configuration.


.. _runningelastalert:

Running ElastAlert
Expand Down
Loading