Skip to content

Commit

Permalink
format to_addr on post request so that it allows dynamic values from …
Browse files Browse the repository at this point in the history
…matched field

Discussion regarding this can be found here. #1561
  • Loading branch information
mohamedelema17 authored Nov 9, 2024
1 parent b045872 commit e9d03ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elastalert/alerters/opsgenie.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def alert(self, matches):
proxies = {'https': self.opsgenie_proxy} if self.opsgenie_proxy else None

try:
r = requests.post(self.to_addr, json=post, headers=headers, proxies=proxies)
r = requests.post(self.to_addr.format(**matches[0]), json=post, headers=headers, proxies=proxies)

elastalert_logger.debug('request response: {0}'.format(r))
if r.status_code != 202:
Expand Down

0 comments on commit e9d03ed

Please sign in to comment.