Skip to content

Commit

Permalink
Merge pull request #72 from nsano-rururu/kibana-discover712
Browse files Browse the repository at this point in the history
Kibana Discover support kibana 7.12
  • Loading branch information
jertel authored Apr 4, 2021
2 parents c8949c1 + 457501e commit ca26362
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/source/ruletypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,9 @@ The currently supported versions of Kibana Discover are:

- `5.6`
- `6.0`, `6.1`, `6.2`, `6.3`, `6.4`, `6.5`, `6.6`, `6.7`, `6.8`
- `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `7.5`, `7.6`, `7.7`, `7.8`, `7.9`, `7.10`, `7.11`
- `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `7.5`, `7.6`, `7.7`, `7.8`, `7.9`, `7.10`, `7.11`, `7.12`

``kibana_discover_version: '7.11'``
``kibana_discover_version: '7.12'``

kibana_discover_index_pattern_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion elastalert/kibana_discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
kibana_default_timedelta = datetime.timedelta(minutes=10)

kibana5_kibana6_versions = frozenset(['5.6', '6.0', '6.1', '6.2', '6.3', '6.4', '6.5', '6.6', '6.7', '6.8'])
kibana7_versions = frozenset(['7.0', '7.1', '7.2', '7.3', '7.4', '7.5', '7.6', '7.7', '7.8', '7.9', '7.10', '7.11'])
kibana7_versions = frozenset(['7.0', '7.1', '7.2', '7.3', '7.4', '7.5', '7.6', '7.7', '7.8', '7.9', '7.10', '7.11', '7.12'])

def generate_kibana_discover_url(rule, match):
''' Creates a link for a kibana discover app. '''
Expand Down
2 changes: 1 addition & 1 deletion elastalert/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ properties:
### Kibana Discover App Link
generate_kibana_discover_url: {type: boolean}
kibana_discover_app_url: {type: string, format: uri}
kibana_discover_version: {type: string, enum: ['7.11', '7.10', '7.9', '7.8', '7.7', '7.6', '7.5', '7.4', '7.3', '7.2', '7.1', '7.0', '6.8', '6.7', '6.6', '6.5', '6.4', '6.3', '6.2', '6.1', '6.0', '5.6']}
kibana_discover_version: {type: string, enum: ['7.12', '7.11', '7.10', '7.9', '7.8', '7.7', '7.6', '7.5', '7.4', '7.3', '7.2', '7.1', '7.0', '6.8', '6.7', '6.6', '6.5', '6.4', '6.3', '6.2', '6.1', '6.0', '5.6']}
kibana_discover_index_pattern_id: {type: string, minLength: 1}
kibana_discover_columns: {type: array, items: {type: string, minLength: 1}, minItems: 1}
kibana_discover_from_timedelta: *timedelta
Expand Down
12 changes: 6 additions & 6 deletions tests/kibana_discover_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_generate_kibana_discover_url_with_kibana_5x_and_6x(kibana_version):
assert url == expectedUrl


@pytest.mark.parametrize("kibana_version", ['7.0', '7.1', '7.2', '7.3', '7.4', '7.5', '7.6', '7.7', '7.8', '7.9', '7.10', '7.11'])
@pytest.mark.parametrize("kibana_version", ['7.0', '7.1', '7.2', '7.3', '7.4', '7.5', '7.6', '7.7', '7.8', '7.9', '7.10', '7.11', '7.12'])
def test_generate_kibana_discover_url_with_kibana_7x(kibana_version):
url = generate_kibana_discover_url(
rule={
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_generate_kibana_discover_url_with_from_timedelta():
url = generate_kibana_discover_url(
rule={
'kibana_discover_app_url': 'http://kibana:5601/#/discover',
'kibana_discover_version': '7.11',
'kibana_discover_version': '7.12',
'kibana_discover_index_pattern_id': 'd6cabfb6-aaef-44ea-89c5-600e9a76991a',
'kibana_discover_from_timedelta': timedelta(hours=1),
'timestamp_field': 'timestamp'
Expand Down Expand Up @@ -204,7 +204,7 @@ def test_generate_kibana_discover_url_with_from_timedelta_and_timeframe():
url = generate_kibana_discover_url(
rule={
'kibana_discover_app_url': 'http://kibana:5601/#/discover',
'kibana_discover_version': '7.11',
'kibana_discover_version': '7.12',
'kibana_discover_index_pattern_id': 'd6cabfb6-aaef-44ea-89c5-600e9a76991a',
'kibana_discover_from_timedelta': timedelta(hours=1),
'timeframe': timedelta(minutes=20),
Expand Down Expand Up @@ -238,7 +238,7 @@ def test_generate_kibana_discover_url_with_to_timedelta():
url = generate_kibana_discover_url(
rule={
'kibana_discover_app_url': 'http://kibana:5601/#/discover',
'kibana_discover_version': '7.11',
'kibana_discover_version': '7.12',
'kibana_discover_index_pattern_id': 'd6cabfb6-aaef-44ea-89c5-600e9a76991a',
'kibana_discover_to_timedelta': timedelta(hours=1),
'timestamp_field': 'timestamp'
Expand Down Expand Up @@ -271,7 +271,7 @@ def test_generate_kibana_discover_url_with_to_timedelta_and_timeframe():
url = generate_kibana_discover_url(
rule={
'kibana_discover_app_url': 'http://kibana:5601/#/discover',
'kibana_discover_version': '7.11',
'kibana_discover_version': '7.12',
'kibana_discover_index_pattern_id': 'd6cabfb6-aaef-44ea-89c5-600e9a76991a',
'kibana_discover_to_timedelta': timedelta(hours=1),
'timeframe': timedelta(minutes=20),
Expand Down Expand Up @@ -305,7 +305,7 @@ def test_generate_kibana_discover_url_with_timeframe():
url = generate_kibana_discover_url(
rule={
'kibana_discover_app_url': 'http://kibana:5601/#/discover',
'kibana_discover_version': '7.11',
'kibana_discover_version': '7.12',
'kibana_discover_index_pattern_id': 'd6cabfb6-aaef-44ea-89c5-600e9a76991a',
'timeframe': timedelta(minutes=20),
'timestamp_field': 'timestamp'
Expand Down

0 comments on commit ca26362

Please sign in to comment.