Uploaded image for project: 'Opsgenie'
  1. Opsgenie
  2. OPSGENIE-1755

Opsgenie to return the 4xx error response to AlertManager for failed create alert calls

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem statement:

      Currently, Alertmanager is capable of responding to responses from the server at https://github.com/prometheus/alertmanager/blob/7cdecbf6ee97951d3ba1430fae6598a1fe9defe1/notify/util.go#L292.

      // GetFailureReasonFromStatusCode returns the reason for the failure based on the status code provided.
      func GetFailureReasonFromStatusCode(statusCode int) Reason {
      	if statusCode/100 == 4 {
      		return ClientErrorReason
      	}
      	if statusCode/100 == 5 {
      		return ServerErrorReason
      	}
      
      	return DefaultReason
      }
      

      Suggested solution:

      If Opsgenie can return a 4xx to Alertmanager for all alerts failing for creation, the customer can react based on the metrics from Alertmanager for those misses.

      Workaround:
      Read the error field in the current response payload to determine if alert creation has failed in Opsgenie.

            [OPSGENIE-1755] Opsgenie to return the 4xx error response to AlertManager for failed create alert calls

            There are no comments yet on this issue.

              Unassigned Unassigned
              99350e2fbebe Shashwat Khare
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: