Skip to content

Commit

Permalink
Merge pull request #3 from postmates/dak/elasticsearch-patch
Browse files Browse the repository at this point in the history
Update elasticsearch server response check
  • Loading branch information
dvdklnr authored Nov 21, 2017
2 parents f9cd551 + fdd1d33 commit 330145f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/oxstash
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def build_doc(options, evt):
# This appears to be the default timestamp key logstash/kibana looks for.
evt['@timestamp'] = timestamp.isoformat() + 'Z'

action = {'_index': index, '_type': evt_type, '_source': evt,}
action = {'_index': index, '_type': evt_type, '_source': evt}

return elasticsearch.helpers.expand_action(action)

Expand Down Expand Up @@ -129,7 +129,7 @@ def main():

for result in bulk_streamer:
batch_ok, item = result
if item['create'].get('ok') is not True:
if not item['index']['created']:
print item


Expand Down

0 comments on commit 330145f

Please sign in to comment.