-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add Jira integration #280
Merged
Merged
Add Jira integration #280
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c08dc5a
to
84133f6
Compare
84133f6
to
3f7d451
Compare
This commit introduces a JIRA notifier for handling alert notifications. It implements creating, updating, and resolving JIRA issues via the JIRA API, supports custom templates for summary and description, handles authentication, and includes configurations for transitions and custom fields.
c41d549
to
ce2e229
Compare
Introduced improved handling for Jira config fields, processing string values into JSON if valid. Added full test coverage, including validation for field errors, secret overrides, and complex field structures in configurations.
f33188a
to
b20e66c
Compare
Some changes are great. I hope |
# Conflicts: # notify/factory_test.go
5ae509b
to
02d42a3
Compare
santihernandezc
commented
Feb 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I left a few comments. Also, please consider capitalizing log lines.
f2cef9c
to
17726be
Compare
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
yuri-tceretian
approved these changes
Feb 20, 2025
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces support for JIRA integration in Grafana Managed Alertmanager.
It's almost carbon copy of the prometheus/alertmanager#3590 (credits to @jkroepke) with couple changes:
b52aeaa
(#280) Configuration extended with optiondedup_key_field
that allows to specify a custom field to store deduplication key. The field must be a text field. If it is not specified, the deduplication key is added to labels.1578f74
(#280) changes how description is handled in v3 API:d9b37ab
(#280) changes how empty transition settings are treated. In contrast to the upstream implementation that looks for empty-string transition and fails notification, this integration skips resolving\reopening of integration.Fields
.map[any]any
tomap[string]any
here because yaml unmarshaller produced result that is not supported by json marshaller. In the case of Grafana the integration configuration is stored in JSON and therefore, it is not affected by this problem.How integration works
Diagram

Notes for reviewer
Due to some security reason, the Grafana's webhook sender does not support GET requests. I initiated extraction of it in #281 to alerting module to be able to change it and have more control over its behavior. In the meantime, I worked around GET requests
449c192
(#280). I will remove once the migrated sender will be able to process GET requests.