Skip to content

Instantly share code, notes, and snippets.

@g-eorge
Last active January 2, 2016 17:39
Show Gist options
  • Save g-eorge/8338132 to your computer and use it in GitHub Desktop.
Save g-eorge/8338132 to your computer and use it in GitHub Desktop.
Send a directory of files containing a single json object to flume via http

Assuming flume is listening on 6666 and your data files are in ./sample-data

Example:

find ./sample-data -type f -exec ./httpsend.sh {} \;
#!/bin/bash
event=$(< "$1")
echo "$1"
curl -H "Content-Type: application/json" -X POST -d "[$event]" http://127.0.0.1:6666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment