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 |