Hello, I'm trying to set up Jenkins integration on a server of ours, but I'm seeing odd behavior in the logs and not seeing any alerts or notifications out of OpsGenie.
As far as I can tell, the Jenkins integration is telling OpsGenie to close an alert without ever actually creating it. All alert policies have been suspended, so nothing should be auto deleting or closing them.
Reading through the docs on the integration and the Jenkins plugin, there doesn't seem to be a way to control what action should be taken on an alert. On the Jenkins side I'm trying this in both pipeline and freestyle jobs, same behavior on both.
The only other issue similar to this one I found was https://community.atlassian.com/t5/Opsgenie-questions/Opsgenie-delayed-incomingData/qaq-p/1648853 but it appears unrelated.
I figured I would ask the community about this before opening a ticket. Has anyone seen similar behavior before?
Hi @taylor.kirkpatrick ,
That other post could be somewhat related, but not entirely sure without checking the logs. What I would suggest is reviewing the data being parsed in the payload of the Processed Log:
^ There should be a dropdown to the right side of this log, then also drop down the Incoming Data + Parsed Data:
Here you can check what data is being sent from Jenkins >> Opsgenie. Then you'll want to compare it with the integration's Create Alert action(s) - and what data needs to match in order for an alert to be created. The actions can be reviewed under an integration's Advanced tab:
Note this tab is only available for the Standard and Enterprise plans. By default the integration will have a few actions already defined.
The behavior you mentioned - "As far as I can tell, the Jenkins integration is telling OpsGenie to close an alert without ever actually creating it" - is most likely due to the filters of the Create Alert action(s) not matching with what's being sent from Jenkins >> Opsgenie.
This would explain why it appears the Close Alert actions are being reviewed. The actions of an integration will be reviewed from top >> down until Opsgenie finds a matching filter / set of conditions, then execute that action. First reviewing the Ignore actions, Create actions, etc.
The Create Alert actions are where you can also define what requests will create alerts such as both pipeline and freestyle jobs. I hope this helps troubleshoot your issue!
Please let us know if you have any additional questions, issues, etc.
Thank you! I was running my tests in the main part of the build. It seems the Integration optimistically assumes the build is a success if it isn't running post build, and alerts aren't created by default on successful builds. Changing the advanced settings of my integration fixed the issue.