Skip to content

Commit 1d3c102

Browse files
Remove hive_port
When using TheHive in a configuration that is not top-level (`https://IP/thehive/`), the current code does not work, as it concatenates `hive_host` & `hive_port` which creates `https://IP/thehive/:443` This tweak removes the need to explicitly specify a port and instead specify only `hive_host`. A couple examples: `hive_host: https://192.168.15.23:8080` `hive_host: https://192.168.15.23/thehive/` `hive_host: https://192.168.15.23:8080/thehive/` This tweak should be considered a breaking change, as current users will need to update their `hive_connection` configuration if `hive_url` does not contain the required port.
1 parent 3affdd7 commit 1d3c102

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elastalert/alerts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ def alert(self, matches):
21112111
connection_details = self.rule['hive_connection']
21122112

21132113
api = TheHiveApi(
2114-
'{hive_host}:{hive_port}'.format(**connection_details),
2114+
connection_details.get('hive_host'),
21152115
connection_details.get('hive_apikey', ''),
21162116
proxies=connection_details.get('hive_proxies', {'http': '', 'https': ''}),
21172117
cert=connection_details.get('hive_verify', False))

0 commit comments

Comments
 (0)