From 804d248f9b8148bc8a10c8f71e2b0f082b291c8f Mon Sep 17 00:00:00 2001 From: Tudor Golubenco Date: Tue, 17 Nov 2015 19:04:13 +0100 Subject: [PATCH] Update to most recent libbeat version and shared files --- Godeps/Godeps.json | 76 +++++++++---------- .../libbeat/outputs/elasticsearch/client.go | 9 ++- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 3dbc2b68390..ea7d10dfd2a 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -7,98 +7,98 @@ "Deps": [ { "ImportPath": "github.com/elastic/libbeat/beat", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/cfgfile", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/common", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/logp", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/outputs", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/publisher", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/service", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/cfgfile", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/common", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/logp", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/outputs", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/publisher", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/service", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/cfgfile", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/common", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/logp", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/outputs", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/publisher", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/elastic/libbeat/service", - "Comment": "v1.0.0-rc1-66-g2500a0a", - "Rev": "2500a0a7e40bdb07df4990003eb93a6099765318" + "Comment": "v1.0.0-rc1-68-g5313047", + "Rev": "531304787e67d86f958ca96e2e1516c4f1bc7c5c" }, { "ImportPath": "github.com/garyburd/redigo/internal", diff --git a/Godeps/_workspace/src/github.com/elastic/libbeat/outputs/elasticsearch/client.go b/Godeps/_workspace/src/github.com/elastic/libbeat/outputs/elasticsearch/client.go index b1d962494fa..0dd9f7d59f5 100644 --- a/Godeps/_workspace/src/github.com/elastic/libbeat/outputs/elasticsearch/client.go +++ b/Godeps/_workspace/src/github.com/elastic/libbeat/outputs/elasticsearch/client.go @@ -174,8 +174,8 @@ func bulkCollectPublishFails( func itemStatus(m json.RawMessage) (int, string, error) { var item map[string]struct { - Status int `json:"status"` - Error string `json:"error"` + Status int `json:"status"` + Error json.RawMessage `json:"error"` } err := json.Unmarshal(m, &item) @@ -185,7 +185,10 @@ func itemStatus(m json.RawMessage) (int, string, error) { } for _, r := range item { - return r.Status, r.Error, nil + if len(r.Error) > 0 { + return r.Status, string(r.Error), nil + } + return r.Status, "", nil } err = ErrResponseRead