-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
jira integration #3590
jira integration #3590
Conversation
3df6162
to
78f7970
Compare
47846a8
to
39315c1
Compare
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Can this integration cover another of jiralert issue - is custom field for alert hash? Current code search hash in hardcoded place - in jql.WriteString(fmt.Sprintf(`project = "%s" and
labels=%q order by status ASC,
resolutiondate DESC`, n.conf.Project, key.Hash())) Thanks |
Sure. After merge. Everyone is invited to improve. I would not like to add more feature here. Even I understand you request. The current PR covery already a lot of cases to test. Adding more new features results into more testing. I would prefer to add new features in separate PRs. |
Is this implementation only for Jira Cloud or can I still use the on-premise API with a PAT Authentication? |
I'm not able to test on-premise. But you can enter an Server API Path to an on premise instance and the authentication is still auth basic which should work on on-premise, too. The integration does not use any cloud specific features. If https://github.com/prometheus-community/jiralert works on-premise, this integration should work, too. I remember that Issue handling, the Jira Software Server API v2 and Cloud API v2 is the same.
But please keep in mind that this integration will always have best-effort since most users are not able to setup a on premise instance. |
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.
Thanks for starting this! I haven't looked yet in details into the notifier but I suppose that it's almost a 1:1 copy from the original project?
Not a blocker but I think that it's the first notifier which needs to query the external system before actually sending the notification. It should be highlighted in the documentation IMHO.
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
No. while jiralert uses a unofficial outdated REST SDK for JIRA, I used the standard http client to setup the few http calls. |
Signed-off-by: Jan-Otto Kröpke <[email protected]>
# Conflicts: # asset/assets_vfsdata.go
Signed-off-by: Jan-Otto Kröpke <[email protected]>
I‘m open to extend the feature set after this PR got merged. Background: it seems like AM has some review capacity issues and increase the scope involves an additional review each time. The current scope is well tested (including manual test against prod systems). |
Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]> # Conflicts: # config/config.go
Yes, I would like to see this merged so we can iterate on additional featres. |
@@ -37,6 +37,7 @@ require ( | |||
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 | |||
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 | |||
github.com/stretchr/testify v1.9.0 | |||
github.com/trivago/tgo v1.0.7 |
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.
json-iterator is already an indirect dependency via prometheus/client_golang so I'd say that it's ok to use it.
Co-authored-by: Simon Pasquier <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
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.
Some minor doc consistency nits.
Co-authored-by: Ben Kochie <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Thanks for all the reviews.
|
Hi all, after 2 approvals. how we should proceed? |
Ping @gotjosh @simonpasquier |
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.
I'll review by the end of the week, sorry for the delay.
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.
I'd have minor comments on making the code a bit more compact but nothing that should prevent merging this PR. Thanks again for your patience!
I'll also look into building a new RC for Alertmanager.
* Initial jira integration Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]> Signed-off-by: Jan-Otto Kröpke <[email protected]> Co-authored-by: Simon Pasquier <[email protected]> Co-authored-by: Ben Kochie <[email protected]>
This PR track the Atlassian JIRA integration into Alertmanger.
See: #3577
Replaces: https://github.com/prometheus-community/jiralert
What I test:
resolve_transition
reopen_transition
api_token_file