Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opsgenie_teams with 'opsgenie_teams_args' overwrites the configured value once it's parsed #1540

Closed
lstyles opened this issue Sep 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@lstyles
Copy link
Contributor

lstyles commented Sep 24, 2024

Similar to a situation described in this discussion: #534 the following line of code: https://github.com/jertel/elastalert2/blob/master/elastalert/alerters/opsgenie.py#L72 parses args, and then overwrites self.teams. Next time the alert triggers, args are no longer parsed and instead, the result of first parsing is used.

For example, the following rule config:

opsgenie_teams: 
-  \"2nd Line Support\"
- \"{owning_team}\"
opsgenie_teams_args:
  owning_team: owning_team

will mean that the first alert will correctly evaluate the owning team from a field in the match (let's say Infrastructure), but each subsequent alert execution will have the self.teams set to:

  • 2nd Line Support
  • Infrastructure

and will no longer be evaluated

I think the following fixes it:
https://github.com/jertel/elastalert2/pull/1539/files

There's potentially a similar issue with recipients.

@nsano-rururu nsano-rururu added the bug Something isn't working label Sep 24, 2024
@lstyles
Copy link
Contributor Author

lstyles commented Sep 27, 2024

fixed in #1539

@lstyles lstyles closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants