Check for connection errors during event transit in elasticsearch and webhook (#8273)

master
Praveen raj Mani 5 years ago committed by Harshavardhana
parent 0e1408844b
commit dc0dce9beb
  1. 3
      pkg/event/target/elasticsearch.go
  2. 3
      pkg/event/target/webhook.go

@ -171,6 +171,9 @@ func (target *ElasticsearchTarget) Send(eventKey string) error {
} }
if err := target.send(eventData); err != nil { if err := target.send(eventData); err != nil {
if xnet.IsNetworkOrHostDown(err) {
return errNotConnected
}
return err return err
} }

@ -155,6 +155,9 @@ func (target *WebhookTarget) Send(eventKey string) error {
} }
if err := target.send(eventData); err != nil { if err := target.send(eventData); err != nil {
if xnet.IsNetworkOrHostDown(err) {
return errNotConnected
}
return err return err
} }

Loading…
Cancel
Save