Ver Fonte

do not alert for unknown root cause messages

Mohammed Nafees há 4 anos atrás
pai
commit
b017c12c2e
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      api/server/handlers/kube_events/create.go

+ 3 - 1
api/server/handlers/kube_events/create.go

@@ -90,7 +90,9 @@ func (c *CreateKubeEventHandler) ServeHTTP(w http.ResponseWriter, r *http.Reques
 
 	w.WriteHeader(http.StatusCreated)
 
-	if strings.ToLower(string(request.EventType)) == "critical" && strings.ToLower(request.ResourceType) == "pod" {
+	if strings.ToLower(string(request.EventType)) == "critical" &&
+		strings.ToLower(request.ResourceType) == "pod" &&
+		request.Message != "Unable to determine the root cause of the error" {
 		agent, err := c.GetAgent(r, cluster, request.Namespace)
 
 		if err != nil {