diff --git a/backend/eventd/entity.go b/backend/eventd/entity.go index 5783378312..b972d66a3f 100644 --- a/backend/eventd/entity.go +++ b/backend/eventd/entity.go @@ -15,6 +15,8 @@ func createProxyEntity(event *corev2.Event, s store.EntityStore) error { // Override the entity name with proxy_entity_name if it was provided if event.HasCheck() && event.Check.ProxyEntityName != "" { entityName = event.Check.ProxyEntityName + } else if event.Entity.EntityClass == corev2.EntityAgentClass { + return nil } // Determine if the entity exists diff --git a/backend/eventd/eventd.go b/backend/eventd/eventd.go index a200fdec84..44733a464c 100644 --- a/backend/eventd/eventd.go +++ b/backend/eventd/eventd.go @@ -246,7 +246,8 @@ func (e *Eventd) handleMessage(msg interface{}) error { ctx := context.WithValue(context.Background(), corev2.NamespaceKey, event.Entity.Namespace) - // Create a proxy entity if required and update the event's entity with it + // Create a proxy entity if required and update the event's entity with it, + // but only if the event's entity is not an agent. if err := createProxyEntity(event, e.store); err != nil { return err }